Thursday, February 2, 2017

Design Patterns in Java

S.O.L.I.D Principle

  • The Open Closed Principle
    • The article describes the open closed principle which is one of the object oriented design principles.
  • Don’t Repeat Yourself
    • The article explains and demonstrates don’t repeat yourself principle with the help of a real life example
  • Single Responsibility Principle
    • The article explains the concept of single responsibility principle with the help of an example and how to identify and apply it to code
  • Liskov Substitution Principle
    • if class A is a subtype of class B, we should be able to replace with without disrupting the behavior of our program.
  • Aggregation Example
    • An example of aggregation association is provided with clear explaination of the concept
  • Composition Example
    • Concept of composition is explained using simple real life example along with corresponding java classes.

Design Pattern:




Creational Patterns:

  • Singleton:
    • The article gives singleton design pattern implementation using enums in java. It explains advantages of enums demonstrates with simple example
  • Factory Method :
    • The article provides factory method implementation as defined by GoF and Head First Design Patterns book. It elaborates factory method with concrete example
  • Abstract Factory:
    • The article gives abstract factory pattern implementation in java with comprehensive definition and example. It is elaborate with lucid example and diagrams.
  • Prototype:
    • This article helps understand prototype design pattern implementation using java with the help of cloneable interface in java.
  • Builder:
    • The article describes builder design pattern and illustrates it with detailed and simple example. Diagram for bulider design pattern is explained in detail.

Behavioral Patterns:

  • Chain Of Responsibilities:
    • This article illustrates chain of responsibilities pattern implementation with the help of simple example and self explanatory class diagram.
  • Command:
    • The article helps understand command design pattern implementation in java and elaborates with self explanatory class diagram for both pattern and example.
  • Mediator
    • The article helps understand mediator design pattern implementation with the help of its generic diagram and a simple example of chat application.
  • Observer:
    • The article provides a short and real life example of observer pattern implementation along with elaborate diagram for both design pattern and example.
  • Strategy :
    • The article provides strategy pattern implementation along with definition and a simple example.Class diagram for pattern as well as example is demonstrated
  • Template Method :
    • This article helps understand template method implementation with a simple example along with generic class diagram with everyday life example
  • Visitor:
    • This article provides visitor design pattern implementation along with a generic class diagram and example class diagram.

Structural Patterns:

  • Adapter:
    • This article helps us understand adapter design pattern implementation with the help of a generic class diagram and another with a simple example
  • Bridge:
    • The article helps understand bridge design pattern implementation with self explanatory generic as well as example class diagram.
  • Composite:
    • Provides composite design pattern implementation with the help of generic as well as example class diagram and easy to understand example
  • Decorator:
    • The article covers yet another creational design pattern. It gives decorator pattern implementation in java along with class diagram and its example
  • Flyweight :
    • This article helps understand flyweight design pattern implementation and elaborates it with simple example along with its class diagram
  • Facade:
    • The article helps understand facade design pattern conceptually and with the help of class diagram and real life coding example.
  • Memento:
    • This article gives an interesting example of memento design pattern implementation along with its generic class diagram and elaborate example.
  • Proxy :
    • proxy design pattern implementation is explained thoroughly in this article with the help of simple generic class diagram and separate for example.
  • State:
    • The article gives a very interesting example of battle game soldiers and tries to explain state design pattern implementation along with class diagram

1 comment:

Interview Prep: Java full stack

 SOLID principle :  https://www.educative.io/answers/what-are-the-solid-principles-in-java Design Pattern:  Creational:  https://medium.com...