Showing posts with label creational. Show all posts
Showing posts with label creational. Show all posts

January 13, 2014

Categories of Patterns - Design Pattern

Types of Design Patterns

As mentioned in earlier post, there are 3 categories of deign patterns.
  1. Creational Patterns
  2. Structural patterns
  3. Behavioral Patterns
Creational patterns
The names creational itself conveys, that the design patterns under this category, all revolve around object creation in terms of who, what, how and when. Creational patterns all the systems separate the process of object creation, composition and representation. Creational pattern hide the detail of how the object / instance of classes are created.


Patterns falling under this category are:
  • Singleton pattern
  • Factory pattern
  • Abstract factory pattern
  • Prototype and 
  • Builder pattern
Structural patterns
Structural patterns revolve around the class and object composition, what I mean is it helps us to understand how different classes in a system are glued together in a extensible and flexible manner. The object composition shows ways to compose objects to obtain new functionality.

Patterns falling under this category are
  • Adapter pattern
  • Bridge
  • Composite
  • Façade
  • Proxy
  • Flyweight
  • Decorator
Behavioral pattern
Describe the way object and classes behave / interact and divide the responsibility among them. Thee pattern are more concerned with the communication between objects and classes.

Pattern falling under this category are:
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Observer
  • State
In the next post I will tart explaining in detail patterns falling under Creational pattern


Thanks,
Husain Patel

January 2, 2014

Design patterns – Introduction


Design Patterns
Every one who is in the software industry has heard it about design pattern,have worked on it (knowingly an unknowingly) . Software engineers with 1-2 years of experience gets impressed with people, who is talking on design patterns and explaining one or two patterns. Everyone is interested in learning and knowing design patterns, a single search in Google would give 1000 of search pages, explaining design but for some reason it never been explained in a simple or lucid way. At least the type of material available make it more complex and second most important is the time invested in understanding them and trying to implement them.
In this and future post I will explain what design patterns are in an easy and simple language (avoiding the jargon). 

Take an example.. while making a recipe /cooking, we do one of the two things, 1. start cooking (if we know cooking ) or 2. search on the web for recipes before we start to cook, so that we can get help and make make a dish.. We try following exactly the same steps, use the same same ingredients and quantity, so that recipe comes out good, a lot of them succeed in getting the recipe to the mark and this continues.. people follow it..
Design pattern are some what, recipes – they were tried and tested solutions and now they have been documented for other to use. Design pattern are not a complete solution to software problem, but guide you to in getting started to solve the problem..
The 3 mains areas where in design pattern are in creating objects.., defining structure of software solution/ Architectural and defining communication between objects. This clearly indicates design patterns revolve around object creation, architectural structure and object communication..
They are broadly classified..
1. Creational
2. Structural
3. Behavioral.

Thanks,
Hussain