Skip to main content

Types of Design Patterns

Types of Design Patterns

Creational Pattern:
This design pattern covers the different ways to create an object. We will discuss all of them in the later posts of this blog:
  • Builder
  • Abstract Factory
  • Factory Method
  • Object Pool
  • Prototype
  • Singleton

Structural Pattern:
Once an object is created, the next job is to create a relationship between the different objects and it can be done using a structural design pattern. The different types of structural design patterns that we will discuss in the future posts are:
  • Adapter
  • Aggregate
  • Bridge
  • Composite
  • Decorator
  • Extensibility
  • Facade
  • FlyWeight
  • Marker
  • Pipes and Filter
  • Opaque Pointer
  • Proxy

Behavioral Pattern:
In the last two patterns, we have created an object and established a relationship between different objects. Now, we need to figure out ways to communicate with the different objects. Behavioral design pattern helps us in channelizing the communication between the newly created objects. The different types of behavioral design patterns are:
  • Chain of responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Null Object
  • Observer
  • State
  • Strategy
  • Template method
  • Visitor
In the next post, we will start the discussion with builder design pattern.

Comments

Popular posts from this blog

Design Pattern in Java

Why Design Pattern In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson und John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software which initiated the concept of Design Pattern in Software development. The idea was to compile a list of common design patterns which can be used by programmers while designing the complex software. All the design patterns in this book are based on the two principles: • Program to an interface, not an implementation. • Favor object composition over inheritance. Let's discuss these two principles in detail. Program to an interface, not an implementation: This principle means that when we create an object, we should create an object for the interface and not the implementation. Example: ArrayList myList = new ArrayList(); //Bad List myList = new ArrayList(); //Good List myList = new TreeList(); // Good In this example...

Java Virtual Machine

Java Virtual Machine I will start this blog with the details of Java Virtual Machine. This will help us understand the other important details of Java language in the coming posts. History: Java was developed by James Gosling  along with his peers at Sun MicroSystems in June 1991. The idea was to develop a language which allows an application programmer to write the code once and run it on different platforms without changing the source code. The problem with C/C++ languages is they follow the write once and compile anywhere philosophy which means you can write your source code once but it can be compiled on different machines. The issue is it can be compiled on the different machine but it cannot run on all the machines because the code is written to a specific operating system in mind. This problem is solved by Java Virtual machine which acts as an operating system to the application program and converts it into Java bytecode. This bytecode can run on any machine with any ...