Through the instruction and exercises offered in Design Patterns Java(TM) Workbook , you can fully understand the role of design patterns in Java application development, and enhance [r]
(1)(2)Design Patterns Java™ Workbook
Steven John Metsker Publisher: Addison Wesley
March 25, 2002
ISBN: 0-201-74397-3, 496 pages
Java programmers, you now have the resource you need to harness the considerable power of design patterns This unique book presents examples, exercises, and challenges that will help you apply design pattern theory to real-world problems Steve Metsker's learn-by-doing approach helps you enhance your practical skills and build the confidence you need to use design patterns effectively in mission-critical applications
Design Patterns Java(TM) Workbook features the twenty-three foundational design patterns introduced in the classic book Design Patterns (Addison-Wesley, 1995) In this new, hands-on workbook, the patterns are organized into five major categories: interfaces, responsibility, construction, operations, and extensions Each category begins with a chapter that reviews and challenges your ability to apply facilities built into Java These introductory sections are followed by chapters that explain a particular pattern in detail, demonstrate the pattern in use with UML diagrams and Java code, and provide programming problems for you to solve With this book you will build expertise in important areas such as:
Adapting domain data to Swing components Creating a FACADE for Swing
Handling recursion in composites
Understanding the role of BRIDGE in Java database connectivity
Making the connection between Model/View/Controller and OBSERVER Maintaining relational integrity with a mediator
Using proxies to communicate between computers
Letting a service provider decide which class to instantiate Supporting undo operations with MEMENTO
Prototyping with clones
Using COMMAND to supply a service Developing thread-safe iterators
Extending classes with DECORATOR and VISITOR
Solutions to the design pattern challenges appear in the back of the book, so you can compare your own work to expert approaches A brief guide to UML explains the modeling notation, and an accompanying Web site provides all the code examples from the book
(3)Copyright
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and Addison-Wesley was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein
The publisher offers discounts on this book when ordered in quantity for special sales For more information, please contact:
Pearson Education Corporate Sales Division 201 W 103rd Street
Indianapolis, IN 46290 (800) 428-5331
corpsales@pearsoned.com
Visit Addison-Wesley on the Web: www.aw.com/cseng/
Library of Congress Cataloging-in-Publication Data
Metsker, Steven John
Design patterns Java workbook / Steven John Metsker p cm.—(The Software patterns series)
Includes bibliographical references and index ISBN 0-201-74397-3
1 Java (Computer program language) I Title II Series QA76.73.J38 M483 2002
005.13'3—dc21 2002018313
(4)All rights reserved No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher Printed in the United States of America Published simultaneously in Canada
For information on obtaining permission for use of material from this work, please submit a written request to:
Pearson Education, Inc
Rights and Contracts Department 75 Arlington Street, Suite 300 Boston, MA 02116
Fax: (617) 848-7047
Text printed on recycled paper
(5)Dedication
To Alison
Who fills our house with glimmering light With her loving, cozy fire
And Emma-Kate and Sarah-Jane Our precious elves, beloved sprites Who hop as light as bird from brier
Through the house give glimmering light By the dead and drowsy fire;
Every elf and fairy sprite Hop as light as bird from brier;
—William Shakespeare
(6)Bibliography
386
Coplien, James O., and Douglas C Schmidt, eds Pattern Languages of Program Design 1995 Reading, MA: Addison-Wesley
Cormen, Thomas H., Charles E Leiserson, and Ronald L Rivest 1990 Introduction to Algorithms Cambridge, MA: The MIT Press
Flanagan, David 1997 Java™ Examples in a Nutshell Sebastapol, CA: O'Reilly
Flanagan, David 1999a Java™ Foundation Classes in a Nutshell Sebastapol, CA: O'Reilly Flanagan, David 1999b Java™ in a Nutshell, 3rd ed Sebastapol, CA: O'Reilly
Flanagan, David, Jim Farley, William Crawford, and Kris Magnusson 1999 Java™ Enterprise in a Nutshell Sebastapol, CA: O'Reilly
Fowler, Martin 1996 Analysis Patterns: Reusable Object Models Reading, MA: Addison-Wesley
Fowler, Martin, with Kendall Scott 2000 UML Distilled, Second Edition Boston, MA: Addison-Wesley
Fowler, Martin, Kent Beck, John Brant, William Opdyke, and Don Roberts 1999
Refactoring Reading, MA: Addison-Wesley
Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides Design Patterns 1995 Reading, MA: Addison-Wesley
Gosling, James, Bill Joy, Guy Steele, and Gilad Bracha 2000 The Java™ Language Specification, Second Edition Boston, MA: Addison-Wesley
Grand, Mark 1998 Patterns in Java™ New York: John Wiley
Hamilton, Graham, Rick Cattell, and Maydene Fisher 1997 JDBC™ Database Access with Java™ Reading, MA: Addison-Wesley
Harrison, Neil, Brian Foote, and Hans Rohnert 1999 Pattern Languages of Program Design 4 Reading, MA: Addison-Wesley
Honderich, Ted, ed 1995 The Oxford Companion to Philosophy New York: Oxford University Press
Larman, Craig 2002 Applying UML and Patterns, Second Edition Upper Saddle River, NJ: Prentice-Hall
Lea, Doug 2000 Concurrent Programming in Java™, Second Edition Boston, MA: Addison-Wesley
(7)Bibliography
387
Martin, James, and James J Odell 1995 Object Oriented Methods—A Foundation Englewood Cliffs, NJ: Prentice-Hall
Martin, Robert C., Dirk Riehle, and Frank Buschmann, eds 1997 Pattern Languages of Program Design 3 Reading, MA: Addison-Wesley
Metsker, Steven J 2001 Building Parsers with Java™ Boston, MA: Addison-Wesley Mowbray, Thomas J, and Raphael C Malveau 1997 CORBA Design Patterns New York: John Wiley & Sons
Plato 1991 The Republic of Plato, Second Edition Allan Bloom, ed New York: Basic Books
Pree, Wolfgang 1994 Design Patterns for Object-Oriented Software Development Reading, MA: Addison-Wesley
Rising, Linda 2000 The Pattern Almanac 2000 Boston, MA: Addison-Wesley
Russell, Michael S 2000 The Chemistry of Fireworks Cambridge, England: Royal Society of Chemistry
Schmidt, Douglas, Michael Stal, Hans Rohnert, and Frank Buschmann 2000 Pattern-Oriented Software Architecture, Volume 2, Patterns for Concurrent and Networked Objects New York: John Wiley & Sons
Vlissides, John 1998 Pattern Hatching Reading, MA: Addison-Wesley
Vlissides, John M., James O Coplien, and Norman Kerth, eds Pattern Languages of Program Design 2 1996 Reading, MA: Addison-Wesley
Weast, Robert C., ed 1983 CRC Handbook of Chemistry and Physics, 63rd ed Boca Raton, FL: CRC Press