In this chapter, we learned how to use some of the classical object-oriented patterns that are applicable, and useful, for reusable and easy-to-maintain/extend real-world applications. The MVC was adapted to Angular and expanded to enable highly reusable business logic between different applications. Then, we saw how to control the creation of our object with the singleton with and without Dependency Injection and the prototype coupled to a pool to limit the number of expensive objects in the system. Finally, we learned how to use the factory patterns to avoid the traps in JSON-to-TypeScript automatic (and partial) object conversion and saw how to perform undo operations with the memento pattern.
If you want to learn even more about patterns to improve your performance, operations costs, and maintainability, you can check out the upcoming Angular Design Patterns and Best...