Structural Pattern

The Structural design pattern gives a blueprint for how different classes and objects are combined to form larger structures. The resulting structure should be flexible and extensible. So when one of the parts needs changes, the entire structure need not be changed. The structural design pattern also specifies the methods that connect objects, how data is arranged in the structure and how data moves through the pattern.

Structural class patterns use inheritance to combine the interfaces or implementations of multiple classes. Structural object patterns use object composition to combine the implementations of multiple objects.

Advantages of structural patterns are increased efficiency, enhanced reusability, separating implementation from the interface and reducing complexity by providing cleaner, simpler interfaces to a system that is easier for client programmers to understand.

The common structural patterns are
(1) Adapter pattern - provides a wrapper for a class or object that uses a different interface.
(2) Bridge pattern - decouples the interface from the implementation without using inheritance.
(3) Composite pattern - describes a tree like structure in which individual parts have the same interface as the whole pattern.
(4) Decorator pattern - adds responsibilities to individual objects by wrapping them in a class that exposes their original interface, but includes some new methods and functionality as well.
(5) Facade pattern - combines a group of diverse classes with complicated interrelations into a single, simple unified interface that handles the needs of most client classes.
(6) Proxy pattern - is one with a surrogate object which stands between the client classes and the actual object but uses the same interface.

What is a Design Pattern?
Creational Design Pattern
Structural Design Pattern
Behavioral Design Pattern
Why use Design Patterns?
Want to learn more?

About Us | Contact Us | Disclaimer | Privacy Policy | ©2008 thewebguru.com