Observer Pattern

This pattern will notify change to various classes.

Leave a Comment

Singleton Pattern

Need to create only one object and make sure no other object will create again the object of same class but it can share the same object  created once.

A Singleton Pattern ensures a class has only one object or instance and provides a global point of access to it.

Leave a Comment

Builder Pattern

The builder pattern encapsulate or separate the construction of a complex object from its representation so that the same construction process can create different representations.

The Builder Pattern

The Builder Pattern

Leave a Comment

Abstract Factory Pattern

Objects creates the objects of releated classes without specifying the concrete classes.

Abstract Factory Pattern

Abstract Factory Pattern

Leave a Comment

Abstract Factory Pattern

Provides an interface for creating families of  related or dependent objects without specifying their concrete classes

Leave a Comment

Factory Pattern

Object is basically instace of  there prototype called class. There are lot of ways to create the object in various technologies. But ultimately we need to create an object.

What is the strategy of creating objects. weather we use “new” key word to create an object or we are using the method to get the created object.

Factory pattern defines a way and handle creation the objects. It is basically talks about the obtects which are helpful to create the object without knowing the class of the object.Factory pattern encapsulate object creation.

How do we implement Factory pattern?

Accroding to GOF

Define an interface for creating an object but let subclasses decide which class to instanciate. Factory method lets a class difer instantiation to subclass.

Leave a Comment

Creational Patterns

In object oriented technologies we need to create the objects. But how, what is the process? what is the best way to create an object? Do we create object using or explicitly calling the constructor or we need to use any kind of  patterns used to create the objects. So the object creation patterns help us to explain the different kind of object creations methodologies and there intent and pros and cons.

So we have popular patterns such as Singleton, Factory, Abstract Factory, Builder, Prototype etc. we will see these and discuss in details in next posts

Leave a Comment

Interface and Abstract class pattern

Client classes are independent of the classes that implement the behavior of the class and make sure that there is consistent behavior of the classes which implement the interface.

The abstract class implement the interface and the concrete classes extends the behaviour of the abstract class.

Don’t  chose only between interface and abstract class. Let abstract class implement the interface and the concrete classes extend the abstract class.

Interfaces can be used to hide the specific class that implement the behavior from the client classes

Organize the classes that provide related behavior common the the abstract super class helps to ensure consistency of implementation

Using both interface and abstract class pattern helps the object desing to get the benefit of both the interface and abstract classes.

interface-abstract-class-pattern

Leave a Comment

Design as a thought

Design is an ART of designer. Various thoughts are combined to originate a design. When those thoughts of designer are accepted by the community, then it becomes a pattern which is tested and followed and implemented.

We are focused most on the technological design and design pattern applied for architecting the software application. Irrespective of technology we discuss here most importantly the intent, advantages and disadvantages of the design patterns.  Please join hands with us to contribute to this cause to make this blog helpful for those who really wants to understand the design pattern and apply in there daily life.

Leave a Comment