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 … More 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 … More 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 … More Builder Design Pattern

@SpringBootApplication Annotation

@SpringBootApplication attribute is used to enable auto-configuration, component scan and to define extra configuration in a single application class. @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } } Though the same things can be achieved using following annotations individually @EnableAutoConfiguration: enable Spring Boot’s auto-configuration mechanism automatically configure your Spring application based … More @SpringBootApplication Annotation

Cloneable in Java

Cloneable interface is one of the mistake in design in Java. At least I think so 🙂 A class should be implementing Cloneable interface if that class wants to be cloned along with overriding clone() method from Object class. This combination of compulsion makes it quite unusual to implement. Code below: public class Student implements … More Cloneable in Java