Friday 23 March 2012

difference builder Vs decorator pattern

Builder 
         Sequence of steps to construct an object
             -During creation.
             -Elements are must.
             -If its fails object incomplete.

Decorator pattern
         On constructed Object adding extra/more functionality.
             -After object created.
             -Elements are optional.
             -It will not affect the basic behavior.
            -Allows new/additional behaviour to be added to an existing object dynamically. 

No comments:

Post a Comment