There are seven patterns that make up the structural group, each with the role
of building flexibility, longevity, and security into computer software. The names of
the patterns are important, so I’ll introduce them immediately. They are:
• Decorator
• Proxy
• Bridge
• Composite
• Flyweight
• Adapter
• Façade
Structural patterns are concerned with how classes and objects are composed to form
larger structures. Of the many purposes of the seven structural patterns, here are 10:
• Add new functionality dynamically to existing objects, or remove it (Decorator).
• Control access to an object (Proxy).
• Create expensive objects on demand (Proxy).
• Enable development of the interface and implementation of a component to proceed
independently (Bridge).
• Match otherwise incompatible interfaces (Adapter).
• Reduce the cost of working with large numbers of very small objects (Flyweight).
• Reorganize a system with many subsystems into identifiable layers with single
entry points (Façade).
• Select or switch implementations at runtime (Bridge).
• Simplify the interface to a complex subsystem (Façade).
• Treat single objects and composite objects in the same way (Composite).
No comments:
Post a Comment