Posts

Showing posts from January, 2019

Creational design patterns

Image
1. Abstract factory pattern 2. Builder pattern 3. Factory method pattern 4. Prototype pattern 5. Singleton pattern  Factory method pattern -                                              we create object without exposing the creation logic to the client. We're going to create a Shape interface and concrete classes implementing the Shape interface. A factory class ShapeFactory is defined as a next step. Abstract factory pattern -                                 Abstract Factory patterns work around a super-factory which creates other factories. This factory is also called as factory of factories. One more label wrapper of factory pattern Builder patte...

Type of Design pattern

Gangs of 4 created design pattern into 3 types 1.        Creational 2.        Structure 3.        Behavior Creational design pattern:                                                Creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. Creational design patterns are composed of two dominant ideas. One is  encapsulating  knowledge about which concrete classes the system uses. Another is hiding how  instances  of these concrete classes are created and combined. Structure  design pattern:                                           ...

What Are Design Patterns and Why Do We Need Them

What Are Design Patterns and Why Do We Need Them? Software professionals may be familiar with the term "Design Patterns," but many have no idea of where they come from and what they truly are. Consequently, some do not see the value and benefits design patterns bring to the software development process, especially in the areas of maintenance and code reuse. This article will bridge this gap by defining design patterns from a historical perspective. It will also summarize the salient features of a typical design pattern and arrive at a working definition so that you will know what they are and what to expect when you incorporate them into your designs What is Design Patterns Design patterns are commonly defined as time-tested solutions to recurring design problems. The term refers to both the description of a solution that you can read, and an instance of that solution as used to solve a particular problem. History   Design patterns have their roots in the ...