Design Patterns - SPLessons

Java Design Pattern

Chapter 2

SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Java Design Pattern

Java Design Pattern

shape Introduction

In the previous chapter, we have explained how Java Design Pattern helps software developers. This chapter explains about Java Design Pattern and its types.

Creational pattern, Behavioral pattern and Structural pattern are sub divided into different patterns.

shape Conceptual
figure

Creational Pattern

shape Description

Creational Pattern deals with object creation and is mainly used to make a decision while creating an object for a class. Creational pattern controls the creation of object.

Creational Pattern is divided into 6 patterns:

Singleton Pattern

Singleton Pattern can increase the memory and efficiency of an object. Only one instance can be created for singleton pattern.

Prototype Pattern

Prototype Pattern is used for object cloning and can create a duplicate object.

Factory Method Pattern

Factory Method Pattern is used to create instances for derived classes.

Abstract Factory Pattern

Abstract Factory Pattern can create instances for family of classes.

Builder Pattern

Builder Pattern is used to separate the construction of an object from its representation.

Object Pool Pattern

Object Pool Pattern can enhance the performance of the system by recycling the unused objects.

shape Conceptual
figure

Behavioral Pattern

shape Description

Behavioral Pattern allows objects to interact in a much better way. The interactions must be loosely coupled so that they communicate with each other. Behavioral Pattern is divided into 12 patterns, they are:

Structural Pattern

shape Description

Structural patterns can be used to identify the relationship between various structures. Structural pattern focuses on how classes are inherited from one another. Structural Pattern is again divided into 7 patterns, they are:

Summary

shape Key Points

  • Java Design Pattern are mostly used in Software Designing.
  • Design and analysis iterations can be reduced using Java Design Pattern.