Java Design Patterns
- 19 September
Bridge design pattern in java
As stated by Gof: “Decouple an abstraction from its implementation so that the two can vary independently”.When there are inheritance hierarchies in both interface and implementation then you loose coupling because of interdependence.In other words,Decoupling interface from implementation and hiding implementation detail of abstraction from client is main objectives of bridge design pattern. Also known […]
- 12 July
Decorator Design Pattern
The Decorator design pattern attach additional responsibilities to an object dynamically.It is wrap up at another object.It will extend functionality of object without affecting any other object.Decorators provide a alternative to subclassing for extending functionality. Also known as: Wrapper When to use it: Use Decoraotor to add responsibilities to individual objects dynamically without affecting other […]