A Hybrid Approach
When writing a brand-new application, developers can directly follow the microservices architecture principles and blueprint to build the software application, as we have discussed. Developers sometimes follow a kind of hybrid approach of microservices and monolithic. In this case, they can develop part of their application as microservices and the rest following standard SOA/MVC practices based on certain criteria. The idea is that not all the components of the application may qualify as microservices.
As we discussed in Chapter 3, microservices offer lot of flexibility, but this flexibility comes at some cost. The hybrid approach is to balance the flexibility and cost aspects with the understanding that, over time, components can be pulled out of the monolithic part and converted to microservices on an as-needed basis. The key is to keep both approaches in mind, along with microservices criteria, during this transition.