Connexions

Sections
You are here: Home » Content » Decorator Design Pattern

About: Decorator Design Pattern

Module by: Stephen Wong. E-mail the author

View the content: Decorator Design Pattern

Metadata

Name: Decorator Design Pattern
ID: m26102
Language: English (en)
Summary: The Decorator Pattern is used for adding additional functionality to a particular object as opposed to a class of objects. It is easy to add functionality to an entire class of objects by subclassing an object, but it is impossible to extend a single object this way. With the Decorator Pattern, you can add functionality to a single object and leave others like it unmodified.
Subject: Science and Technology
Keywords: decorator, design, Object-oriented, pattern, programming
License: Creative Commons Attribution License CC-BY 3.0

Authors: Stephen Wong (swong@rice.edu)
Copyright Holders: Stephen Wong (swong@rice.edu)
Maintainers: Stephen Wong (swong@rice.edu)

Latest version: 1.1 (history)
First publication date: Jun 26, 2009 11:15 am GMT-5
Last revision to module: Jun 26, 2009 1:58 pm GMT-5

Downloads

PDF: m26102_1.1.pdf PDF file, for viewing content offline and printing. Learn more.
EPUB: m26102_1.1.epub Electronic publication file, for viewing in handheld devices. Learn more.
XML: m26102_1.1.cnxml XML that defines the structure and contents of the module, minus any included media files. Can be reimported in the editing interface. Learn more.
Source Export ZIP: m26102_1.1.zip ZIP containing the module XML plus any included media files. Can be reimported in the editing interface. Learn more.
Offline ZIP: m26102_1.1_offline.zip An offline HTML copy of the content. Also includes XML, included media files, and other support files. Learn more.

Version History

Version: 1.1 Jun 26, 2009 1:58 pm GMT-5 by Stephen Wong
Changes:
initial publication

How to Reuse and Attribute This Content

If you derive a copy of this content using a Connexions account and publish your version, proper attribution of the original work will be automatically done for you.

If you reuse this work elsewhere, in order to comply with the attribution requirements of the license (CC-BY 3.0), you must include

  • the authors' names: Stephen Wong
  • the title of the work: Decorator Design Pattern
  • the Connexions URL where the work can be found: http://cnx.org/content/m26102/1.1/

See the citation section below for examples you can copy.

How to Cite and Attribute This Content

The following citation styles comply with the attribution requirements for the license (CC-BY 3.0) of this work:

American Chemical Society (ACS) Style Guide:

Wong, S. Decorator Design Pattern, Connexions Web site. http://cnx.org/content/m26102/1.1/, Jun 26, 2009.

American Medical Assocation (AMA) Manual of Style:

Wong S. Decorator Design Pattern [Connexions Web site]. June 26, 2009. Available at: http://cnx.org/content/m26102/1.1/.

American Psychological Assocation (APA) Publication Manual:

Wong, S. (2009, June 26). Decorator Design Pattern. Retrieved from the Connexions Web site: http://cnx.org/content/m26102/1.1/

Chicago Manual of Style (Bibliography):

Wong, Stephen. "Decorator Design Pattern." Connexions. June 26, 2009. http://cnx.org/content/m26102/1.1/.

Chicago Manual of Style (Note):

Stephen Wong, "Decorator Design Pattern," Connexions, June 26, 2009, http://cnx.org/content/m26102/1.1/.

Chicago Manual of Style (Reference, in Author-Date style):

Wong, S. 2009. Decorator Design Pattern. Connexions, June 26, 2009. http://cnx.org/content/m26102/1.1/.

Modern Languages Association (MLA) Style Manual:

Wong, Stephen. Decorator Design Pattern. Connexions. 26 June 2009 <http://cnx.org/content/m26102/1.1/>.