Design patterns
Design patterns are programming language independent strategies for solving the common object-oriented design problems. That means, a design pattern represents an idea, not a particular implementation.
Problem Given: Suppose you want to create a class for which only a single instance (or object) should be created and that single object can be used by all other classes.
Solution: Singleton design pattern is the best solution of above specific problem. So, every design pattern has some specification or set of rules for solving the problems.
When should we use the design patterns?
We must use the design patterns during the analysis and requirement phase of SDLC(Software Development Life Cycle).
Categorization of design patterns:
- Core Java (or JSE) Design Patterns.
- JEE Design Patterns.
Core Java Design Patterns
In core java, there are mainly three types of design patterns, which are further divided into their sub-parts:
1. Creational Design Pattern: These design patterns are all about class instantiation or object creation.
- Factory Pattern
- Abstract Factory Pattern
- Singleton Pattern
- Prototype Pattern
- Builder Pattern.
- Object Pool Pattern
2. Structural Design Pattern: These design patterns are about organising different classes and objects to form larger structures and provide new functionality.
- Adapter Pattern
- Bridge Pattern
- Composite Pattern
- Decorator Pattern
- Facade Pattern
- Flyweight Pattern
- Proxy Pattern
3. Behavioural Design Pattern: Behavioural patterns are about identifying common communication patterns between objects and realise these patterns.
- Chain Of Responsibility Pattern
- Command Pattern
- Interpreter Pattern
- Iterator Pattern
- Mediator Pattern
- Memento Pattern
- Observer Pattern
- State Pattern
- Strategy Pattern
- Template Pattern
- Visitor Pattern
- Null Object Pattern
J2EE Design Patterns
J2EE design patterns are built for the developing the Enterprise Web-based Applications.
In J2EE , there are mainly three types of design patterns, which are further divided into their sub-parts:
1. Presentation Layer Design Pattern
- Intercepting Filter Pattern
- Front Controller Pattern
- View Helper Pattern
- Composite View Pattern
2. Business Layer Design Pattern
- Business Delegate Pattern
- Service Locator Pattern
- Session Facade Pattern
- Transfer Object Pattern
3. Integration Layer Design Pattern
- Data Access Object Pattern
- Web Service Broker Pattern
Comments
Post a Comment