Skip to Content
Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition
book

Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition

by Alan Shalloway, James R. Trott
October 2004
Beginner
480 pages
8h 43m
English
Addison-Wesley Professional
Content preview from Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition

Chapter 17. The Decorator Pattern

Overview

This chapter concludes the e-commerce case study introduced in Chapter 9, “The Strategy Pattern.”

This chapter

•   Describes a new requirement for the case study: Add header and footer information to the printed sales ticket.

•   Shows how the Decorator pattern handles the requirement flexibly.

•   Discusses how the Decorator pattern can be used to handle input/output (especially Java I/O).

•   Describes the key features of the Decorator pattern.

•   Describes some of my experience using the Decorator pattern in practice.

•   Describes how the essence of the Decorator pattern is not a linked list, but a collection of optional, decorating objects.

A Little More Detail

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Design Patterns Explained: A New Perspective on Object-Oriented Design

Design Patterns Explained: A New Perspective on Object-Oriented Design

Alan Shalloway, James R. Trott
Design It!

Design It!

Michael Keeling

Publisher Resources

ISBN: 0321247140Purchase book