A self-learning java design pattern with short introduce, diagram, practical example and source code (include testing with JUnit and Mockito).
- Creational
- Singleton (One instance at anytime)
- Factory Method (Create object type base on the given parameter)
- Abstract Factory (Abstract layer for Factory pattern)
- Builder (Separate the construction of complex object)
- Prototype (Create new object copy from itself)
- Structural
- Adapter (Reuse existing class that is not compatible with current interface)
- Bridge (Decouple an abstractions from its implementation)
- Composite (Compose objects into tree structure)
- Decorator (Add additional features dynamically)
- Facade (Hide complexity by providing simplify interface)
- Flyweight (Sharing objects for minimizing memory usage)
- Proxy (Provide a holder of another object to control access to it)
- Behavior
- Observer (Notify state change)
- State (Change behavior with internal state)
- Strategy (Encapsulate algorithm)
- Template (Define a skeleton on abstraction)
- Visitor (Separate algorithm from object structure)
- Chain Of Responsibility (Chain of processing unit)
- Command (Encapsulate all information to execute an action)
- Interpreter (Grammar rule - evaluate expressions)
- Iterator (Provide access through the elements of a container)
- Mediator (Encapsulate object's interactions)
- Memento (Restore object's state)
Bug & issues can be post in issues tracker
Email: [email protected]