Summary
In this chapter, we analyzed the SOLID principles, a set of five OOP Design principles that help to create more scalable and maintainable software. Although these principles were born for classical OOP languages, they are suitable also for a dynamic language such as JavaScript. In order to show this, we explored the five principles by providing examples of their application in JavaScript.
We saw that the Single Responsibility Principle is about designing software architecture with components that have a clear and simple behavior.
The Open/Closed Principle is about class design and feature extensions.
The Liskov Substitution Principle is about subtyping and inheritance.
The Interface Segregation Principle is about interface definition exposed to clients.
The Dependency Inversion Principle concerns the management of dependency among the application's components.
In the next chapter, we will continue the design topic by exploring modern architectures of JavaScript applications.