The intent of Proxy Pattern is to provide a placeholder for an object to control access to it, and add a wrapper and delegation to protect the real component from undue complexity. Continue reading
Category Archives: Design Patterns
Command Pattern
Command pattern encapsulates a request under an object as command, and passed to invoker object. It allows the parameterization of clients with different requests, queue or log requests. Continue reading
Template Method Pattern
Template Method pattern defines the skeleton of an algorithm, and defer some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm’s structure. Continue reading
Façade Pattern
Façade pattern hides the complexities of the system, and provides a simpler interface to clients. Façade wraps a complicated subsystem with a simpler interface, and decouples the subsystems from its clients. Continue reading
Prototype Pattern
Prototype pattern implements a prototype interface which tells to create a clone of the current object. This pattern is used when creation of object directly is costly. Continue reading
Abstract Factory Pattern
Abstract Factory Pattern provides an interface for creating a factory of related objects without explicitly specifying their classes. In other words, the Abstract Factory is a super-factory which creates other factories (Factory of factories). Continue reading
Factory Pattern
Factory pattern is one of most used design pattern in Java, and it defines an interface to create the object without exposing the creation logic to the client, and has internal logic to decide which class to instantiate. Continue reading
Strategy Pattern
The intent of Strategy pattern is to define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets a class behavior or its algorithm can be changed at run time. It captures the abstraction in an interface, and provides implementation details in derived classes. Continue reading
Singleton Pattern
Singleton pattern is a creational design pattern. It ensures a class has only one instance created, and provides a global point of access to it. The implementation includes just-in-time initialization and initialization on first use.
Continue reading
Decorator Pattern
Decorator pattern a design pattern that allows behavior to be added to an individual object without affecting the behavior of other objects from the same class. Decorators provide a flexible alternative to subclass for extending functionality. Continue reading