Desgin Patterns
Core Java“Design Patternâ€, what is this word?
In a very simple language we can say “A general solution to a variety of similar problemsâ€
But for software engineering, a design pattern is†a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into codeâ€.
There are different kinds of Design Patterns in Java.
Like:
(1) Creational
(2) Structural
(3) Structural
Let’s talk about these in details.
Creational Patterns
These are those patterns which help in creating a instance of a object. As we all know in java we create a new object using ‘new’ keyword. Like ….
Animal objAnimal= new Animal ();
What is the great thing that we can achieve by this pattern? Is there anything that we can do more? Any guess? Yes you are absolutely right we can create a instance dynamically. But the question is how? How can we achieve this? There are N numbers of different ways to do this. Which will suite to us? This Design Pattern can help us by providing 5 different Patterns to do.
Those are
(1) Factory Pattern
(2) Abstract Factory Pattern
(3) Builder Pattern
(4) Prototype Pattern
(5) Singleton Pattern
Factory Pattern
Structural Patterns
Behavioral Patterns



