Summary
In this chapter, we explored some concepts about modern architectures for JavaScript applications. We started analyzing the evolution of JavaScript and the growth of its role not only for web applications but also for other kinds of applications that can run on various environments. We analyzed the main principles that any architecture must follow in order to get not only a working application, but also to be extensible and maintainable.
We compared old-style web application with Single Page Application architectures and showed the peculiarities and benefits. Then, we described the Zakas/Osmani architecture for scalable JavaScript applications. This architecture tries to apply the SOLID principles in order to create applications that are easier to maintain, thanks to a clear separation of concerns. We examined the components of the architecture and the patterns that can be used to reduce coupling. In particular, we introduced the facade pattern and the mediator pattern.
We also discussed...