Using design patterns is to reuse the ways that past designers discovered without efforts of rediscovering it. MVC or Model view contoller triad is a classical example of design pattern. It was introduced 1980 in the Smalltalk system.
The book that introduced the term design pattern to software development, Design Patterns: elements of reusable object-oriented software or GoF says:
- [Design patterns] solve specific design problems and make object-oriented desings more flexiblem elegant, and ultimately reusable. They help designers reuse successful designs by basing new designs on prior experience. A designer who is familiar with such patterns can apply them immediately to design problems without having to rediscover them.
In computer programming, the incredible gap in productivity between amateurs and experts is partly a difference in experience. Experts have weathered a variety of problems repeatedly. Typically experts end up with the same pattern to solve the problems as each other's. That is a design pattern. (GoF)
Each pattern comes up with the problem that happens again and again among programmers. Then it shows a typical solution for such a problem, if not the best solution, along with the trade-off, which is a convenient assessment to make prior to applying a potentially costly solution. It is important that patterns accompany a name because it makes possible to describe problems, solutions and talk about them with other folks.
For example the classical MVC pattern is actually a combination of three patterns listed below - Observer, Composite and Strategy. It is broadly used today.
See also anti-pattern, amelioration pattern
Fundamental patterns
Creational patterns
- Abstract factory pattern
- Builder pattern
- Factory method pattern
- Prototype pattern
- Singleton pattern - an object which is unique in it's kind in the whole system
Structural patterns
- Adapter pattern
- Bridge pattern
- Composite pattern - a pattern to build large structures
- Decorator pattern
- Facade pattern
- Flyweight pattern
- Proxy pattern
Behavioral patterns
- Chain of responsibility pattern
- Command pattern
- Interpreter pattern
- Iterator pattern
- Mediator pattern
- Memento pattern
- Observer pattern - one object acts when some value of another objects changes
- State pattern
- Strategy pattern - make an algorithm pluggable
- Template method pattern
- Visitor pattern
- Hierarchical visitor pattern
Concurrency patterns
- Balking pattern
- Guarded suspension
- Scheduler pattern
- Read write lock pattern
- Double checked locking pattern
- Disable job requests while running job pattern
RealTime patterns
Life cycle patterns
Social
Related Topics
External Links
Credit
- The list of design patterns is entirely based on a wiki page http://c2.com/cgi/wiki?CategoryPattern.
- The definition of design pattern is based on GoF.
- Many design patterns are described in mgrand's book