• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Decorator Pattern ??

 
Nikita Deshmukh
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anybody heard of something called as a decorator pattern. I am still using the older version of 310-080 study kit ....
 
Stefan Guilhen
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Decorator pattern is a well known pattern written by the Gang of Four (GoF). You can find further information about this and other very useful patterns checking their book:

Design Patterns - Elements of Reusable Object-Oriented Software
Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides
Addison Wesley

This pattern provide an alternative to subclassing for extending functionality, that is, you can add responsabilities to an object that can be withdrawn later without using subclassing. The decorator acts as a wrapper that forwards requests to the decorated object and may optionally perform additional operations before or after forwarding the request.

Regards,
Stefan
 
Sanjay pts
Ranch Hand
Posts: 357
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Decorator Pattern = WrapperClasses
 
Nikita Deshmukh
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You so much for your detailed response ... That really helped.
 
bhilla ratna
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with you Gang of Four is a good book for patterns. I also find Head First Design patterns makes the concepts more clear

Pranathi
 
Kristin Stromberg
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a big fan of the Head First series myself. You can review a sample chapter from their Design Patterns book here. As luck would have it, this chapter is all about the Decorator pattern. Hopefully you'll like this chapter so much that you'll go out and buy the book like I did!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic