BN.com Gift Guide

Java Design Patterns: A Tutorial / Edition 1

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 95%)
Other sellers (Paperback)
  • All (26) from $1.99   
  • New (5) from $6.45   
  • Used (21) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$6.45
Seller since 2007

Feedback rating:

(180)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand New. Remainder mark. Ship daily. Pack carefully. E-mail when shipped. 16B -- $1 OFF IF YOU BUY 2 OR MORE BOOKS. USE CODE TVHQ68XV

Ships from: Denver, CO

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$11.01
Seller since 2014

Feedback rating:

(34)

Condition: New
2000-02-13 Paperback New Fastshipment, az231Get it fast.

Ships from: austin, TX

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$35.38
Seller since 2008

Feedback rating:

(17854)

Condition: New
Brand New, Perfect Condition, Please allow 4-14 business days for delivery. 100% Money Back Guarantee, Over 1,000,000 customers served.

Ships from: Westminster, MD

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$35.39
Seller since 2007

Feedback rating:

(23568)

Condition: New
BRAND NEW

Ships from: Avenel, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$61.72
Seller since 2014

Feedback rating:

(6)

Condition: New
New

Ships from: Idyllwild, CA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing All
Close
Sort by

Overview

Design patterns have become a staple of object-oriented design and programming by providing elegant, easy-to-reuse, and maintainable solutions to commonly encountered programming challenges. However, many busy Java programmers have yet to learn about design patterns and incorporate this powerful technology into their work.

Java™ Design Patterns is exactly the tutorial resource you need. Accessible and clearly written, it helps you understand the nature and purpose of design patterns. It also serves as a practical guide to using design patterns to create sophisticated, robust Java programs.

This book presents the 23 patterns cataloged in the flagship book Design Patterns by Gamma, Helm, Johnson, and Vlissides. In Java™ Design Patterns, each of these patterns is illustrated by at least one complete visual Java program. This practical approach makes design pattern concepts more concrete and easier to grasp, brings Java programmers up to speed quickly, and enables you to take practical advantage of the power of design patterns.

Key features include:

  • Introductory overviews of design patterns, the Java Foundation Classes (JFC), and the Unified Modeling Language (UML)
  • Screen shots of each of the programs
  • UML diagrams illustrating interactions between the classes, along with the original JVISION diagram files
  • An explanation of the Java Foundation Classes that illustrates numerous design patterns
  • Case studies demonstrating the usefulness of design patterns in solving Java programming problems

After reading this tutorial, you will be comfortable with the basics of design patterns and will be able to start using them effectively in your day-to-day Java programming work.

0201485397B04062001

Read More Show Less

Editorial Reviews

Booknews
A tutorial that explains the process of reusing object oriented code between projects and programmers. The material covers creational, structural, and behavioral patterns. Each chapter explains the basics of a certain pattern and then builds the code for a program demonstrating the use of that pattern. The CD-ROM contains all the programs presented as examples in the text. Annotation c. Book News, Inc., Portland, OR booknews.com
Read More Show Less

Product Details

  • ISBN-13: 9780201485394
  • Publisher: Addison-Wesley
  • Publication date: 4/12/2000
  • Edition description: BK&CD ROM
  • Edition number: 1
  • Pages: 352
  • Product dimensions: 7.20 (w) x 9.00 (h) x 0.80 (d)

Meet the Author

James W. Cooper is a research staff member in the Advanced Information Retrieval and Analysis Department at the IBM Thomas J. Watson Research Center. He is also a columnist for Java Pro magazine and a reviewer for Visual Basic Programmer's Journal. He has published 14 books, which include Principles of Object-Oriented Programming Using Java 1.1 (Ventana) and The Visual Basic Programmer's Guide to Java (Ventana).

0201485397AB05132002

Read More Show Less

Read an Excerpt

This is a practical book that tells you how to write Java programs using some of the most common design patterns. It is structured as a series of short chapters, each describing a design pattern and giving one or more complete, working, visual example programs that use that pattern. Each chapter also includes Unified Modeling Language (UML) diagrams illustrating how the classes interact.

This book is not a "companion" book to the well-known Design Patterns text Gamma, 1995 by the "Gang of Four." Rather, it is a tutorial for people who want to learn what design patterns are about and how to use them in their work. You need not have read Design Patterns to gain from reading this book, but when you are done here you might want to read or reread that book to gain additional insights.

In this book, you will learn that design patterns are a common way to organize objects in your programs to make those programs easier to write and modify. You'll also see that by familiarizing yourself with these design patterns, you will gain a valuable vocabulary for discussing how your programs are constructed.

People come to appreciate design patterns in different ways—from the highly theoretical to the intensely practical—and when they finally see the great power of these patterns, they experience an "Aha!" moment. Usually this moment means that you suddenly had an internal picture of how that pattern can help you in your work.

In this book, we try to help you form that conceptual idea, or gestalt, by describing the pattern in as many ways as possible. The book is organized into six main sections:

  • An introductory description
  • A description of patterns grouped into three sections: Creational, Structural, and Behavioral
  • A description of the Java Foundation Classes (JFC) showing the patterns they illustrate
  • A set of case studies where patterns have been helpful

For each pattern, we start with a brief verbal description and then build simple example programs. Each example is a visual program that you can run and examine so as to make the pattern as concrete as possible. All of the example programs and their variations are on the CD-ROM that accompanies this book. In that way, you can run them, change them, and see how the variations that you create work.

All of the programs are based on Java 1.2, and most use the JFC. If you haven't taken the time to learn how to use these classes, there is a tutorial covering the basics in Appendix A where we also discuss some of the patterns that they illustrate.

Since each of the examples consists of a number of Java files for each of the classes we use in that example, we also provide a Visual SlickEdit project file for each example and place each example in a separate subdirectory to prevent any confusion.

As you leaf through the book, you'll see screen shots of the programs we developed to illustrate the design patterns; these provide yet another way to reinforce your learning of these patterns. You'll also see UML diagrams of these programs that illustrate the interactions between classes in yet another way. UML diagrams are just simple box and arrow illustrations of classes and their inheritance structure, with the arrows pointing to parent classes and dotted arrows pointing to interfaces. If you are unfamiliar with UML, we provide a simple introduction in the first chapter.

Finally, since we used JVISION to create the UML diagrams in each chapter, we provide the original JVISION diagram files for each pattern as well, so you can use your own copy of JVISION to play with them.

When you finish this book, you'll be comfortable with the basics of design patterns and will be able to start using them in your day to day Java programming work.

James W. Cooper Wilton, CT Nantucket, MA November, 1999

Read More Show Less

Table of Contents

Preface.

Acknowledgments.

I. WHAT ARE DESIGN PATTERNS?

1. Introduction.

Defining Design Patterns.

The Learning Process.

Studying Design Patterns.

Notes on Object-Oriented Approaches.

The Java Foundation Classes.

Java Design Patterns.

2. UML Diagrams.

Inheritance.

Interfaces.

Composition.

Annotation.

JVISION UML Diagrams.

Visual SlickEdit Project Files.

II. CREATIONAL PATTERNS.

3. The Factory Pattern.

How a Factory Works.

Sample Code.

The Two Subclasses.

Building the SimpleFactory.

Factory Patterns in Math Computation.

Thought Questions.

4. The Factory Method.

The Swimmer Class.

The Event Classes.

Straight Seeding.

Our Seeding Program.

Other Factories.

When to Use a Factory Method.

Thought Question.

5. The Abstract Factory Pattern.

A GardenMaker Factory.

How the User Interface Works.

Adding More Classes.

Consequences of the Abstract Factory Pattern.

Thought Question.

6. The Singleton Pattern.

Creating a Singleton Using a Static Method.

Exceptions and Instances.

Throwing an Exception.

Creating an Instance of the Class.

Providing a Global Point of Access to a Singleton Pattern.

The javax.comm Package as a Singleton.

Other Consequences of the Singleton Pattern.

Thought Question.

7. The Builder Pattern.

An Investment Tracker.

Calling the Builders.

The List Box Builder.

The Check Box Builder.

Consequences of the Builder Pattern.

Thought Questions.

8. The Prototype Pattern.

Cloning in Java.

Using the Prototype.

Using the Prototype Pattern.

Prototype Managers.

Cloning Using Serialization.

Consequences of the Prototype Pattern.

Thought Question.

Summary of Creational Patterns.

III. STRUCTURAL PATTERNS.

9. The Adapter Pattern.

Moving Data between Lists.

Using the JFC JList Class.

Two-Way Adapters.

Pluggable Adapters.

Adapters in Java.

Thought Question.

10. The Bridge Pattern.

The Class Diagram.

Extending the Bridge.

Java Beans as Bridges.

Consequences of the Bridge Pattern.

Thought Question.

11. The Composite Pattern.

An Implementation of a Composite.

Computing Salaries.

The Employee Classes.

The Boss Class.

Building the Employee Tree.

Self-Promotion.

Doubly Linked List.

Consequences of the Composite Pattern.

A Simple Composite.

Composites in Java.

Other Implementation Issues.

Thought Questions.

12. The Decorator Pattern.

Decorating a CoolButton.

Using a Decorator.

The Class Diagram.

Decorating Borders in Java.

Nonvisual Decorators.

Decorators, Adapters, and Composites.

Consequences of the Decorator Pattern.

Thought Questions.

13. The Faade Pattern.

Building the Faade Classes.

Consequences of the Faade Pattern.

Notes on Installing and Running the dbFrame Program.

Thought Question.

14. The Flyweight Pattern.

Discussion.

Example Code.

Flyweight Uses in Java.

Sharable Objects.

Copy-on-Write Objects.

Thought Question.

15. The Proxy Pattern.

Sample Code.

Copy-on-Write.

Enterprise Java Beans.

Comparison with Related Patterns.

Thought Question.

Summary of Structural Patterns.

IV. BEHAVIORAL PATTERNS.

16. Chain of Responsibility Pattern.

Applicability.

Sample Code.

The List Boxes.

Programming a Help System.

A Chain or a Tree?

Kinds of Requests.

Examples in Java.

Consequences of the Chain of Responsibility.

Thought Questions.

17. The Command Pattern.

Motivation.

Command Objects.

Building Command Objects.

The Command Pattern.

The Command Pattern in the Java Language.

Consequences of the Command Pattern.

Providing Undo.

Thought Questions.

18. The Interpreter Pattern.

Motivation.

Applicability.

Simple Report Example.

Interpreting the Language.

Objects Used in Parsing.

Reducing the Parsed Stack.

Implementing the Interpreter Pattern.

Consequences of the Interpreter Pattern.

Thought Question.

19. The Iterator Pattern.

Motivation.

Enumerations in Java.

Sample Code.

Filtered Iterators.

Consequence of the Iterator Pattern.

Composites and Iterators.

Iterators in Java 1.2.

Thought Question.

20. The Mediator Pattern.

An Example System.

Interactions between Controls.

Sample Code.

Mediators and Command Objects.

Consequences of the Mediator Pattern.

Single Interface Mediators.

Implementation Issues.

21. The Memento Pattern.

Motivation.

Implementation.

Sample Code.

Consequences of the Memento Pattern.

Thought Question.

22. The Observer Pattern.

Watching Colors Change.

The Message to the Media.

The JList as an Observer.

The MVC Architecture as an Observer.

The Observer Interface and Observable Class.

Consequences of the Observer Pattern.

Thought Questions.

23. The State Pattern.

Sample Code.

Switching between States.

How the Mediator Interacts with the StateManager.

State Transitions.

Mediators and the God Class.

Consequences of the State Pattern.

Thought Questions.

24. The Strategy Pattern.

Motivation.

Sample Code.

The Context Class.

The Program Commands.

The Line and Bar Graph Strategies.

Drawing Plots in Java.

Consequences of the Strategy Pattern.

Thought Question.

25. The Template Pattern.

Motivation.

Kinds of Methods in a Template Class.

Template Method Patterns in Java.

Sample Code.

Templates and Callbacks.

Consequences of the Template Pattern.

Thought Question.

26. The Visitor Pattern.

Motivation.

When to Use the Visitor Pattern.

Sample Code.

Visiting the Classes.

Visiting Several Classes.

Bosses are Employees, Too.

Catch-All Operations Using Visitors.

Double Dispatching.

Traversing a Series of Classes.

Consequence of the Visitor Pattern.

Thought Question.

V. DESIGN PATTERNS AND THE JAVA FOUNDATION CLASSES.

27. The JFC, or Swing.

Installing and Using Swing.

Ideas behind Swing.

The Swing Class Hierarchy.

28. Writing a Simple JFC Program.

Setting the Look and Feel.

Setting the Window Close Box.

Making a JxFrame Class.

A Simple Two-Button Program.

More on JButton.

29. Radio Buttons and Toolbars.

Radio Buttons.

The JToolBar.

JToggleButton.

A Sample Button Program.

30. Menus and Actions.

Action Objects.

Design Patterns in the Action Object.

31. The JList Class.

List Selections and Events.

Changing a List Display Dynamically.

A Sorted JList with a ListModel.

Sorting More-Complicated Objects.

Getting Database Keys.

Adding Pictures in List Boxes.

Programs on the CD-ROM.

32. The JTable Class.

A Simple JTable Program.

Cell Renderers.

Rendering Other Kinds of Classes.

Selecting Cells in a Table.

Patterns Used in This Image Table.

33. The JTree Class.

The TreeModel Interface.

Summary.

IV. CASE STUDIES.

34. Sandy and the Mediator.

35. Herb's Text Processing Tangle.

36. Mary's Dilemma.

Bibliography.

Read More Show Less

Preface

This is a practical book that tells you how to write Java programs using some of the most common design patterns. It is structured as a series of short chapters, each describing a design pattern and giving one or more complete, working, visual example programs that use that pattern. Each chapter also includes Unified Modeling Language (UML) diagrams illustrating how the classes interact.

This book is not a "companion" book to the well-known Design Patterns text Gamma, 1995 by the "Gang of Four." Rather, it is a tutorial for people who want to learn what design patterns are about and how to use them in their work. You need not have read Design Patterns to gain from reading this book, but when you are done here you might want to read or reread that book to gain additional insights.

In this book, you will learn that design patterns are a common way to organize objects in your programs to make those programs easier to write and modify. You'll also see that by familiarizing yourself with these design patterns, you will gain a valuable vocabulary for discussing how your programs are constructed.

People come to appreciate design patterns in different ways--from the highly theoretical to the intensely practical--and when they finally see the great power of these patterns, they experience an "Aha!" moment. Usually this moment means that you suddenly had an internal picture of how that pattern can help you in your work.

In this book, we try to help you form that conceptual idea, or gestalt, by describing the pattern in as many ways as possible. The book is organized into six main sections:

  • An introductory description
  • A description of patterns grouped into three sections: Creational, Structural, and Behavioral
  • A description of the Java Foundation Classes (JFC) showing the patterns they illustrate
  • A set of case studies where patterns have been helpful

For each pattern, we start with a brief verbal description and then build simple example programs. Each example is a visual program that you can run and examine so as to make the pattern as concrete as possible. All of the example programs and their variations are on the CD-ROM that accompanies this book. In that way, you can run them, change them, and see how the variations that you create work.

All of the programs are based on Java 1.2, and most use the JFC. If you haven't taken the time to learn how to use these classes, there is a tutorial covering the basics in Appendix A where we also discuss some of the patterns that they illustrate.

Since each of the examples consists of a number of Java files for each of the classes we use in that example, we also provide a Visual SlickEdit project file for each example and place each example in a separate subdirectory to prevent any confusion.

As you leaf through the book, you'll see screen shots of the programs we developed to illustrate the design patterns; these provide yet another way to reinforce your learning of these patterns. You'll also see UML diagrams of these programs that illustrate the interactions between classes in yet another way. UML diagrams are just simple box and arrow illustrations of classes and their inheritance structure, with the arrows pointing to parent classes and dotted arrows pointing to interfaces. If you are unfamiliar with UML, we provide a simple introduction in the first chapter.

Finally, since we used JVISION to create the UML diagrams in each chapter, we provide the original JVISION diagram files for each pattern as well, so you can use your own copy of JVISION to play with them.

When you finish this book, you'll be comfortable with the basics of design patterns and will be able to start using them in your day to day Java programming work.

James W. Cooper
Wilton, CT
Nantucket, MA
November, 1999

0201485397P04062001

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 3 Customer Reviews
  • Anonymous

    Posted August 20, 2002

    too many GUI examples

    This is a good book to start. But as you read it you will find that it has too many GUI samples rather than real life samples.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted April 16, 2002

    Could have been much better

    I can't find anything about this book that I really liked. There are a lot of typos and mistakes in the code presented in the book, I guess the ones on the CD are fine but don't try typing in the ones in the book and compiling those. Over all the book is fairly easy to read but that's because the design patterns presented in the book are pretty easy, even when the author isn't very clear. I really don't recommend this book.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 24, 2001

    A book on Patterns and Swing

    I believe as more books are published on the subject of Java and patterns this one will not make the all time greats list. I do give the author credit for including code that actually compiles (Unlike Mark Grand and his series!) Things I Liked... 1) The patterns were extremely simplified and easy to follow. 2) The book follows the GOF style and makes a decent reference manual. 3)The author does a good job of explaining how the patterns are used in a composite fashion to build more elaborate patterns. Things I did not like... 1) The first few patterns were examplified using a swim meet as the problem domain. I spent more time trying to understand circle seeding vs straight seeding than I did studying his example of the factory method. He could have chosen a more common problem to model. 2) Most of the other patterns were examplified using GUI design problems. 3) The last 50 pages were on Swing, virtually nothing to do with patterns! 4) The case studies at the end of the book were as hideous as the Swing Tutorial. Would I buy it again, maybe! I would definitely check to see if any new books have been published on the subject first.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 3 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)