Basic category of design patterns

 

The design patterns are broadly categorized into 3. Creational Patterns, Structural pattern and Behavioral Pattern

Creational pattern

Creational pattern abstracts the creation process. It helps the system makes independent of how the object is created, composed and represented. It works best with object composition than inheritance and better control over the object creation by avoiding the hard-coded logics. The abstract interfaces make the objects creation more flexible. It gives the user an opportunity to define what, who and how the objects are created.

Structural patterns

Structural patterns are dealing with creating large structures with objects and classes. It’s dealing mostly with inheritance. The final object will be inherited from different classes.

Behavioral pattern

Behavioral pattern mainly concerned with the logic (algorithm) and assignment of responsibilities between objects. It’s also used to define the communication between them. These kind of patterns use object composition rather than inheritance. However inheritance is used to distribute the behavior of the objects. In some cases, we have many objects to carry out single task where we need to ensure a good communication between objects and at the same time it’s required to reduce the coupling between the objects. It’s one of the core competencies of these kinds of patterns.

Above I just briefed any new things but some common things about design patterns. We shall try each every pattern in the coming posts.

One of the major purposes of the patterns is to making an analysis model into and implementation model. The patterns and its related vocabularies can be used as learning and communication tools to express the design problems. It helps us to refactor, reorganize for a better solution.

Object oriented software has mainly 3 phases. (1) Prototyping of requirements. (2) Expanding/Optimizing the design and finally (3) Consolidate or finalize the design. This process could repeat again and again to achieve a refined solution for the problem or the perfect solution for the system.