Chapter 30. Other Structural Patterns
Besides the patterns covered in previous chapters, there are other structural patterns we can cover: flyweight, model-view-controller (MVC), and proxy.
What is the flyweight pattern? Object-oriented systems can face performance issues due to the overhead of object creation. Performance issues usually appear in embedded systems with limited resources, such as smartphones and tablets. They can also appear in large and complex systems where we need to create a very large number of objects (and possibly users) that need to coexist at the same time. The flyweight pattern teaches programmers how to minimize memory usage by sharing resources with similar objects as much as possible.
The MVC pattern is useful mainly in application development and helps developers improve the maintainability of their applications by avoiding mixing the business logic with the user interface.
In some applications, we want to execute one or more important actions before accessing...