What is the design pattern?If a problem occurs over and over again, a solution to that problem has been used effectively. That solution is described as a pattern. The design patterns are language-independent strategies for solving common object-oriented design problems. When you make a design, you should know the names of some common solutions. Learning design patterns is good for people to communicate each other effectively. In fact, you may have been familiar with some design patterns, you may not use well-known names to describe them. SUN suggests GOF (Gang Of Four--four pioneer guys who wrote a book named "Design Patterns"- Elements of Reusable Object-Oriented Software), so we use that book as our guide to describe solutions. Please make you be familiar with these terms and learn how other people solve the code problems.
How many design patterns?Many. A site says at least 250 existing patterns are used in OO world, including Spaghetti which refers to poor coding habits. The 23 design patterns by GOF are well known, and more are to be discovered on the way.
|1. Creational Patterns||2. Structural Patterns||3. Behavioral Patterns||4. J2EE Patterns|
|--- Abstract Factory||--- Adapter||--- Chain of Responsibility||--- MVC|
|--- Builder||--- Bridge||--- Command||--- Business Delegate|
|--- Factory Method||--- Composite||--- Interpreter||--- Composite Entity|
|--- Prototype||--- Decorator||--- Iterator||--- Data Access Object|
|--- Singleton||--- Façade||--- Mediator||--- Front Controller|
|--- Memento||--- Intercepting Filter|
|--- Service Locator|
|--- Transfer Object|