| Author |
Decorator Pattern ??
|
Nikita Deshmukh
Ranch Hand
Joined: Jun 08, 2005
Posts: 38
|
|
|
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
Joined: Jul 31, 2004
Posts: 61
|
|
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
|
SCJP 1.4, SCBCD 1.3<br />IBM 141, 484, 486
|
 |
Sanjay pts
Ranch Hand
Joined: Nov 07, 2000
Posts: 357
|
|
|
Decorator Pattern = WrapperClasses
|
Eat JAVA, Drink JAVA, Sleep Java
|
 |
Nikita Deshmukh
Ranch Hand
Joined: Jun 08, 2005
Posts: 38
|
|
|
Thank You so much for your detailed response ... That really helped.
|
 |
bhilla ratna
Ranch Hand
Joined: Jun 01, 2005
Posts: 59
|
|
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
|
Ratna bhilla<br />SCJP 1.4, SCBCD 1.3, SCWCD 1.4
|
 |
Kristin Stromberg
Ranch Hand
Joined: May 17, 2005
Posts: 91
|
|
|
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!
|
 |
 |
|
|
subject: Decorator Pattern ??
|
|
|