Design Patterns
Design Patterns
Types of Design Patterns:
- Creational
- Structural
- Behavioural
- Enterprise Application Architecture
Strategy Design Pattern
Define a family of algorithms, encapsulate each one, and make them interchangeable.
Strategy lets the algorithm vary independently from the clients that use it. Capture the abstraction in an interface, bury implementation details in derived classes.
Differentiate between a Factory Pattern and Abstract Factory Pattern.
Factory Pattern
- Creates objects through inheritance
- Produces only one product
- Implements code in the abstract creator that make use of the concrete type that sub class produces.
Abstract Factory Pattern
- Creates object through composition
- Produces families of products
- Concretes factories implements factory method to create product
Front Controller
A controller that handles all requests for a Web site.