# 120 - Learning the Decorator Pattern


6/23/2009
Level: Intermediate
Tags: Design Patterns
Comments: (5)
Author:
Derik Whittaker


In this episode we will take at how we can use the Decorator Pattern in our application.

The decorator pattern is a structural pattern which allows you to attach new or additional actions to an object dynamically. Using the decorator pattern provides a very clean and flexible alternative to subclassing (via inheritance) your object and thus creating an unwanted inheritance tree
Click here to Watch this Episode

Download (11.33) (9:06) (1440x900)
Download (8.03) (9:06) (960x600)

Links/Resources:


Comments: (5)

Tom Pester said....

Love these short little tutorials

* I want to show a nice Resharper feature that can speed up delegating responsiblity which the Decorater pattern uses heavily 

http://screencast.com/t/MKoRxlTzbTr

"Delegating Members" is one of those R# feafture that can come in realy handy in a lot of contexts

* A bit of nitpicking :) The bot blocks an attack every 11 th time and not 10 th right ?

* A use of the decorator pattern in the .NET framework is where you can wrap a stream and add compression to it(zip/deflate) or encrypy/decrypt it.

 

 


6/23/2009 1:25:15 PM

Dmitri said....

A while ago I wrote a vs add-in for generating decorators from the existing code base. It can be found here: http://www.codeproject.com/KB/codegen/decorators.aspx


6/25/2009 3:13:46 AM

Josh Hardspace said....

I hadn't quite got my head around the Decorator so thanks for the vid. It's much appreciated.


8/4/2009 8:42:32 PM

Mark said....

Is it Resharper that is allowing you to fly through all of that with the cuttign and pasting of specialized things? While I am not new, I am barely novice and that seems awesome. I do have Resharper avilable for my use, but haven't dug into it much yet. In fact I seem to turn it off. I see there are some vids up for it, so maybe they can walk through with its use... or at least give someone such as myself some more insight. My intent was to watch the cool video and the series for design patterns, but got thrown off with that magic. So again, if it wasa something other than resharper, please inform. Thanks much for all the great vids and hard work!


8/17/2009 4:48:19 AM

prettyreplica said....

Replica Watches Collection

Bvlgari Watches Replica, Swiss Rolex Watch Collection, Best Fake Watch ,Cartier Watches ,Discount Watches , Fashion Watches , Wristwatch, Fake Watch, Wholesale Watches, Jewelry Watches, Replica Jewelry Watches. How to choose Sales Replica Watches the perfect Rolex Watch IWC Fake Watch for you. Buying a Rolex Jewelery Watches watch is certainly a large Jacob & Co. Watch Replica investment, as Rolex Replica Watches watches certainly cost Emporio Armani Replica Watches more than the average wristwatch. Most Rolex watches such as the Rolex yacht master, cost Replica Watch thousands of dollars. Chopard Watch Replica However, Replica Breguet Watches be aware Fake Franck Muller that you will be buying a watch of TAG Heuer Watches that will not Replica Watches ,Jaeger LeCoultre Replica Watches only Ebel Watches Replica work your whole lifetime, it will also look pretty Replica Watch good doing it. However, a Zenith Replica new Replica Mont Blanc Watches Rolex watch may simply be too much money for some people. Wholesale Replica Watches If that is Replica Bvlgari the Replica Handbag case, Jacob & Co. Watch Replica consider buying a Ebel Wristwatch pre-owned Rolex watch Luxury Vacheron Constantin instead. Whether you buy a new or used Rolex watch, you will definitely enjoy the Rado Replica Watches use of Patek Philippe Mens Watches a finely made watch made by the Fake Chopard Watches finest watch company in the last one hundred Replica Watch years. A Gucci Replica Watch Rolex, watch, Replica Patek Philippe Watches omega or cartier wristwatch Luxury Audemars Piguet are all good investments,Ulysse Nardin Watches but the Swiss Luxury Watches Rolex is simply the best Special Watches .

watches brand | Luxury watches | replica hangbag | Luxury watches | replica watch | Very Nice Bag | Real Replica Watches

A Lange&Sohne Watches     Aigner Watches     Alain Silberstein Watches     Audemars Piguet Watches     Bell&Ross Watches     Breguet Watches     Breitling Watches     Bvlgari Watches Replica     Cartier Watches     Chanel Watches Replica     Chopard Watches Replica     Concord Watches     Corum Watches     D&G Watches     Dior Watches Replica     Ebel Replica Watches     Emporio Armani Watches     Ferrari Watches     Franck Muller Watches     Glashutte Watches     Gucci Watches     Hermes Watches     Hublot Watches     IWC Watches     Jacob&Co Watches     Jaeger LeCoultre watches     Longines Watches     Louis Vuitton Watches     Michele Watches     Montblanc Watches     Movado Watches     Omega Watches     Oris Watches     Panerai Watches Replica     Patek Philippe Watches     Philip Stein Watches     Piaget Watches     Porsche Design Watches     Rado Replica Watches     Raymond Weil Watches     Richard Mille Watches     Roger Dubuis Watches     Rolex Japan Watches     Rolex Swiss Watches     Sarcar Watches     Swiss Watch International     TAG Heuer Watches     Tissot Watches     Tudor Watches     Ulysse Nardin Watches     Vacheron Constantin Watches     Versace Replica Watches     Victorinox Swiss Watches     Zenith Watches  

Balenciaga ;   Bally     Burberry     Chanel     Chloe     Christian Dior     Coach     D&G     Fendi     Gucci Handbags     Hermes     Jimmy Choo Handbags     Loewe Handbags     Louis Vuitton Bags     Marc Jacobs Handbags     Miu Miu Handbags     Mulberry Handbags     Prada     Thomas Wylde Handbags     Versace Handbags     YSL Handbag  

A Lange&Sohne Watches     Aigner Watches     Alain Silberstein Watches     Audemars Piguet Watches     Bell&Ross Watches     Breguet Watches     Breitling Watches     Bvlgari Watches     Cartier Watches     Chanel Watches     Chopard Watches     Concord Watches     Corum Watches     Dior Watches     Dolce&Gabbana Watches     Ebel Watches     Emporio Armani Watches     Ferrari Watches     Franck Muller Watches     Glashutte Watches     Gucci Watches     Hermes Watches     Hublot Watches     IWC Watches     Jacob&Co Watches     Jaeger LeCoultre watches     Longines Watches     Louis Vuitton Watches     Michele Watches     Mont Blanc Watches     Movado Watches     Omega Watches     Oris Watches     Panerai Watches     Patek Philippe Watches     Philip Stein Watches     Piaget Watches     Porsche Design Watches     Rado Watches     Raymond Weil Watches     Richard Mille Watches     Roger Dubuis Watches     Rolex Japan Watches     Rolex Swiss Watches     Sarcar Watches     Swiss Watch International     TAG Heuer Watches     Tissot Watches     Tudor Watches     Ulysse Nardin Watches     Vacheron Constantin Watches     Versace Watches     Victorinox Swiss Watches     Zenith Watches  


2/1/2010 7:33:34 PM


Name: *
Email (not displayed): *
Url:
Comments: *



So, you Human...?



Submit this story to DotNetKicks
Shout it