artima.com - a resource for Java and Jini developers
Artima | Search | Java | Design | JVM | Jini | Books | Seminars | Subscribe 


Objects & Patterns: Five Days of Java Design
A Hands-on Intensive Workshop Taught by Bruce Eckel & Bill Venners
December 11 to December 15, 2000 in San Diego, California

Click Here to Register

The goal of this exercise-based workshop is to give you a set of tools covering the design aspects of the software-building life cycle, which will be presented in two parts:

  1. Java design idioms and programming techniques
  2. Practical understanding and application of Design Patterns

The workshop combines lectures, guided exercises, and team-based independent work to demonstrate how object-oriented design with patterns and idioms can work in a production environment. As with all Bruce Eckel's seminars, the emphasis will be on getting you "thinking in" objects.


Comments From Students

  • This course helped our project team discuss and understand design patterns. It provided a good opportunity for us to take a step back and review what we've done, discuss what we want to adopt into our development process, and consider changes we could mkae to improve our designs. Overall the course teaches fundamental skills necessary to apply object-oriented design in a variety of situations. Kurt Welker, INEEL
  • Patterns exercises & pair programming really illuminate the patterns and intent. Best description of double (multiple) dispatch I've ever heard. Bill's clarity, patience and rigor as an instructor were uncommonly strong. Paul Bouzide, Navigation Technologies
  • The best part of the course is that it is highly interactive and the hands-on exercises help you to practically see how/why things can be designed in a particular way. Lade Praveen
  • The course is well-designed and the teaching style is excellent. It was illuminating to have two experts, Bruce Eckel and Bill Venners, to discuss each question or issue that arose. Highly recommended! Mark Barton, Navigation Technologies
  • The course content was just right for me. The best week of conceptual thinking I've done in a while. Couldn't have done it after the usual work day. Bruce Campbell, University of Washington Research Scientist, bdc@hitl.washington.edu
  • Very worthwhile, very enjoyable. Helped me see relationships between various programming concepts that I hadn't seen before. Ted Hill, Software Engineer, Berbee Information Networks, hill@berbee.com
  • This course gave me a very good insight into design patterns and their application. I shall be using what I learned here to implement some of these concepts in our non-java COM/DCOM/COM+ World. I recommend this course to all design architects, java-based or non-java-based. Gopinath Meghashyam, Sr. Engineer
  • I liked the lecture-discussion-exercise cycle. Immediate exercises give me a chance to better internalize the subject. I also enjoyed the pair programming concept.
  • Very helpful seminar for understanding design patterns and Java programming techniques. Jim Taylor, Amgen

Object Design Workshop

An important part of good object-oriented design is well-designed objects. The first half of the seminar, which is called the Object Design Workshop, focuses on guidelines and idioms that will help you create well-designed objects. Each guideline and idiom will be explained and justified, and then discussed by the attendees. This discussion is an integral part of the workshop, aimed at facilitating a conversation about design among peers that can help everyone to learn from each other's experiences and perspectives. At the end of the Object Design Workshop, you will walk away with a specfic set of practical guidelines and concrete idioms that you can draw upon in your future object designs.

The Object Design Workshop also includes a hands-on design project. Periodically, the attendees of the workshop will break up into small groups, each of which is assigned an API design project. Each group will document their design with UML and/or javadoc HTML pages, and present their design to the rest of the class, who will critique it mercilessly. The point of the design reviews is the same as the discussions -- to draw out the experience and perspectives of the entire group, and enable everyone to learn from each other.

The Object Design Workshop focuses heavily on the designing with Java. Although many of the guidelines are applicable to any object-oriented language, all examples are shown in Java. Most of the idioms, by contrast, are specific to Java. In addition, the end result of each API design project will be a Java package.

Here's a list of the guidelines and idioms that will be covered during the Object Design Workshop: (Each title is linked to an online copy of the lecture handout.):

Designing with Objects

  • Appreciate the significance of the object.
  • See objects as bundles of services, not bundles of data.
  • In general, design objects that are State Machines.
  • Pattern: The State Pattern.
  • Use Messengers to transmit information.
  • Use Immutables to represent values of abstract data types.
  • Separate interface from implementation.
  • Idiom: The Event Generator

Designing with Composition and Inheritance

  • Use classes to say "What objects are."
  • Use class extension to model permanent IS-A relationships.
  • Prefer polymorphism over instanceof or reflection.
  • Use composition to enlist the help of other objects.
  • Understand the difference between inheritance and composition.
  • Be aware of composition and inheritance in design patterns

Designing with Interfaces

  • Appreciate the significance of the interface.
  • Use interfaces to say "What objects can do," or occasionally, "What can be done to an object."
  • Use interface extension to model INCLUDES-A relationships.
  • Consider creating convenience implementations of your interfaces.
  • Use abstract classes to provide default behavior or communicate limits.

Designing Object Semantics

  • Appreciate the significance of semantics.
  • Keep objects focused.
  • Minimize the number of methods in object interfaces.
  • Make object semantics as easy to understand as possible.
  • Describe object semantics as explicitly as possible.
  • Make sure subtypes fulfill the semantic contract of their supertypes.
  • Avoid optional clauses in semantic contracts.
  • Provide compatibility tests for your APIs

Guideline Grab Bag

  • Throw exceptions on abnormal conditions.
  • Use a checked exception to get the attention of clients.
  • Throw a different exception type for each abnormal condition.
  • Idiom: The Thread-Safe Object
  • Idiom: The Hygienic Object
  • Idiom: The Canonical Object

Articles covering most of these topics are posted at:

http://www.artima.com/designtechniques/index.html


Design Patterns

Probably the most important step forward in object-oriented design is the "design patterns" movement, chronicled in Design Patterns, by Gamma, Helm, Johnson & Vlissides (Addison-Wesley 1995). That book shows 23 different solutions to particular classes of problems. In this section, the basic concepts of design patterns will be introduced along with examples. This should whet your appetite to read Design Patterns (a source of what has now become an essential, almost mandatory, vocabulary for OOP programmers).

The material in this section shows design patterns that have been used in the Java Standard Libraries, and also follows the Design Patterns chapter in Thinking in Java. Much of the presentation is an example of the design evolution process, starting with an initial solution and moving through the logic and process of evolving the solution to more appropriate designs. The last project shown (a trash recycling simulation) has evolved over time, and you can look at that evolution as a prototype for the way your own design can start as an adequate solution to a particular problem and evolve into a flexible approach to a class of problems.

  • Dramatically increase the flexibility of your designs
  • Build in extensibility and reusability
  • Create denser communications about designs using the language of patterns

Following each lecture there will be a set of patterns exercises for you to solve, where you are guided to write code to apply particular patterns to the solution of programming problems.


Prerequisites

A high degree of comfort with object-oriented terminology. Implementation experience with Java.

Thinking in Java, Bruce Eckel ($31.96 from Amazon) or
Bruce Eckel's Hands-On Java CD ($50 from MindView)


Recommended Reading (before the seminar)

Interface Design: Best Practices in Object-Oriented API Design in Java, by Bill Venners (free download)

Chapter 1 of Design Patterns: Elements of Reusable Object-Oriented Software, by Gamma et al.

The Design Patterns chapter of the online 2nd edition of Thinking in Java (this chapter will be evolving over time).


What you should bring

Your notebook computer with the Java 2 development environment of your choice loaded and tested.

A willingness to actively participate in group activities.


Click Here to Register

The first iteration of this seminar, which took place August 9 to 13, 1999, in Crested Butte, Colorado, was a big success. Here's a picture of Bruce, Bill, and a few seminar attendees on top of Mount Crested Butte, the nearby 12,000 foot peak that several of us climbed during one four hour afternoon break. We're all smiling so glowingly in this picture because we'd been having so much fun designing software.

If you have any questions about this seminar, please e-mail Bill Venners at bv@artima.com or Bruce Eckel at bruce@eckelobject.com.

Bruce Eckel's Home Page: http://www.eckelobjects.com/

Amazon.com


Last Updated: Friday, November 10, 2000
Copyright © 1996-2000 Bill Venners. All Rights Reserved.
URL: http://www.artima.com/javaseminars/public/OOEckelDec2000.html
Trouble with this page? Contact: webmaster@artima.com