Domain Driven Design

Domain driven design is a software development approach where you start segregating responsibilities between domain and every domain serve set of services. What is a Domain: – Domains in Domain Driven Design is a group of services which handle specific types of requests. Now lets talk in simple example. Say, You are working in one company and you have query about your salary or last … Continue reading Domain Driven Design

Prototype Design Pattern

Builder design pattern belongs to creational design pattern family and this Prototype design pattern is used when we dont want to use either the new operator or create another factory class. i.e. we clone existing objects to create new ones. But How:  To implement the pattern, declare an abstract base class or interface that specifies a virtual clone() method. Any class that needs an object without using new operation, can derive … Continue reading Prototype Design Pattern

Builder Design Pattern

Builder design pattern belongs to creational design pattern family and this pattern is used to hide the complexity of object creation or the intent of the Builder design pattern is to separate the construction of a complex object from its representation. Example: When you buy a car, you have to go to showroom of the car. But the actual development (assembly) happens in somewhere in the factory … Continue reading Builder Design Pattern

Factory Design Pattern

Factory design pattern belong to the Creational design pattern category which explain how the objects are created. Factory Design Pattern comes with different flavors and we use the flavor as per our convenience. The very common example of Factory design pattern can be found in Spring. Creation of beans in Spring container is done using Factory design pattern only. The implementation is really simple. Create … Continue reading Factory Design Pattern

Singleton Design Pattern

Singleton Design Pattern belong to creational design pattern family and singleton design pattern is used when there is a need of only one instance of class in one container. Like one organization can have only one CEO in company. The singleton pattern is one of the simplest design patterns. It contains only one class which is responsible to instantiate itself and it make sure it creates … Continue reading Singleton Design Pattern