We talked about various architectural styles in this chapter, starting from layered architecture, MVC architecture, service-oriented architecture, microservices, and, finally, serverless architecture. One obvious question that comes to mind is: Which is the best among these styles of designing an application. The answer to this question is also pretty obvious—it depends on the problem at hand. Well, if there was one architecture that could apply to all the problems, everyone would have been using that, and we would have talked only about that particular architecture style.
An important thing to note here is that these architectural styles are not mutually exclusive; in fact, they complement one another. So, most of the time, you may end up using a hybrid of these architectural styles. For example, if we are working on a service-oriented architecture-based design, we may see that the internal implementation of these services may be done based on layered or MVC architectures. Also,...