Results 1 to 6 of 6

Thread: What is the Decorator Pattern?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    6

    Question What is the Decorator Pattern?

    Hi.

    I am learning design patterns and I don;t understand the Decorator pattern, can anyone please explain it to me or link me to an article about it.
    an example when to use it and why would be great.

    thanks.

  2. #2
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: What is the Decorator Pattern?

    Google is your friend Type in "Decorator Pattern"... click search... VOILA! Plenty of hits on the first page

  3. #3
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

    Re: What is the Decorator Pattern?

    I didn't Google, so I'm not sure what you'd find, but it's easy to get lost and/or get a technical explanation without really understanding what the heck a pattern can be used for in the real world.

    If you're just starting out learning patterns, I recommend the book Head First Design Patterns from O'Reily. Its really an excellent book, in more ways than one. The decorator pattern is explained in detail, with excellent examples or why you'd use that pattern rather than subclassing.

    The Head First series comes from the Java world, but there's very little Java code in there, and design principles apply to any object orientated language.

    Anyway, buy the book. It retails for about $45. Well worth the money. I've got literally thousands of dollars of software books, and this is one of my favorites.

    Mike

  4. #4
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: What is the Decorator Pattern?

    Quote Originally Posted by dorraba
    Hi.

    I am learning design patterns and I don;t understand the Decorator pattern, can anyone please explain it to me or link me to an article about it.
    an example when to use it and why would be great.

    thanks.
    Hi,

    Found a link via Google like gigemboy suggested.

    See this link:

    http://www.castle-cadenza.demon.co.uk/decorate.htm

    Hope it helps for your explaination.

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  5. #5
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Re: What is the Decorator Pattern?

    Hi Dorraba, I highly recommend "Addison Wesley: C# Design Patterns, A Tutorial", you can find it searching in the emule the CHM and the examples both in C# and VB.net.

    Regards,
    Tribo

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Re: What is the Decorator Pattern?

    Here is one more - specifically for the Decorator pattern with example code:
    http://www.dofactory.com/patterns/Pa...or.aspx#_self2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width