Scheduled sessions (click to sign up):
OO Structure and Design Patterns
(Learning Design Patterns by Looking at Code, the Class.)
Synopsis
This two-day seminar teaches you design patterns and object-oriented architecture by analyzing real-world code, not trivial examples. We'll look at the Game of Life and SQL interpreter in Allen's book as well as a server-side UI framework (that's not in the book). This approach shows you how patterns actually appear in the real world, so gives you a real-world understanding that you can't get from the more typical catalog-of-patterns approach. You'll come out of this seminar understanding good OO architecture and knowing, not only what the patterns are, but how to apply them effectively.
This class is an ideal follow-on to the OO Workshop.
Description
To be a competent object-oriented designer, you have to master both OO structure (like interface-based programming and implementation hiding) and architecture (such as the "Gang of Four" design patterns).
Most books and classes on these subjects are structured in such a way that you have no idea how to apply your knowledge, however. For example, they catalog the design patterns for you, but provide trivial examples that give you no real understanding of how the patterns work in the real world. The examples don't show you the complex interactions between patterns, or the myriad ways that a pattern can be realized.
This class showings you how to move your analysis-level design to an implemenentation-level design. We cover OO structure in depth, looking at topics ranging from class-hierarcy design and the proper use of interfaces to the "Gang of Four" design patterns, but we do this in the context of real code.
This class takes the radical approach of teaching design patterns and structure by in-depth analysis of two Java programs---a Game of Life implementation and a small embedded SQL interpreter--- in terms of the design patterns used to implement the programs.
Taken together, these programs show you all of the "Gang of Four" design patterns in context and also provide examples of good OO structure. You can see how the patterns work and how they interact. You can see how they're actually used in nontrivial applications.
We also discuss object-oriented-programming principles and how they apply to the patterns, so that you can understand why the patterns do what they do.
You will come away from this class understanding...
- how to move from OO analysis into the design phase and how to turn analysis documents into something from which a program can be constructed.
- problems associated with OO/procedural hybrid systems: fragile base classes, overuse of the getter/setter idiom, etc.
- interface-based programming
- all the "Gang-of-Four" design patterns and how they are used in the real world.
- the real-world compromises and modifications needed to implement good OO design.
Preparation
This course is for professional programmers and technical managers who have at least a "reading" knowledge of Java, C++, or C#. (The examples are in Java, but C++ and C# programmers should have no problem following along.)
A basic understanding of OO Design principles, the analysis process, and the UML notation is assumed. This material is presented in OO Workshop, and can also be presented as a separate, 2-day lecture-only class.
Course Outline
- A quick review of basic OO Concepts
- What is an object?
- Characteristics of OO systems.
- Class-Hierarchy Design
- Inheritance
- Interface-based programming
- Fragile Base Classes
- Interface inheritance
- Implementation Hiding
- Eliminating get/set methods.
- The Game of Life
- Overview
- Emergent behavior and the role emergence plays in OO
- The SQL Interpreter
- Overview
- A lightning-fast introduction to SQL
- The Design Patterns
- Creation Patterns
- Abstract Factory
- Builder
- Factory Method
- Prototype
- Singletons
- Structural Patterns
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
- Behavioral Patterns
- Chain of Responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor (Mobile Agent)
- Creation Patterns
- Object-Oriented UI Architecture
- Why Model/View/Controller Doesn't Work
- Presentation/Abstraction/Control
- Analyzing a server-side PAC/UI implementation.
Books, Cost, Etc.
We provide in-house presentations of this class for eight or more students at the cost of $795/student. For in-house classes, we offer a 10% discount for payment in full in advance. Add travel expenses for classes taught outside the San Francisco Bay Area.
The textbook for this class is Holub on Patterns: Learning Design patterns by Looking at Code (Berekeley: APress, 2004 [ISBN: 159059388X]). The book is required (we use as class notes). Given a couple weeks notice, we can purchace copies for you at 30% off list ($35/copy). You can also purchase copies directly from the publisher.
We can arrange a class for groups smaller than eight at our offices in Berkeley, CA. The cost is $795/student, payable in advance by check or credit card.
Public versions of this class are offered periodically by the University of California, Berkeley, Extension under the title "OO Design II." (See the course catalog for dates.) The cost through the Extension is $1095/student.
