Summary
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access