• Seminar about Design Patterns. Seminar .

  • Schedule with dates and topics for presentation Schedule .

Introduction to Design Patterns


We start with a short introduction to design patterns. The main resources like c2.com are explained. After that everybody picks one or more patterns which she will demonstrate in a short presentation. Experienced students usually pick more architecture level patterns like frameworks (EJB, J2EE) or system oriented pattern for concurrency and distribution. Not so experienced students select patterns from the "Gang-of-four" (GOF) book.

Demonstrations start with simple patterns from GOF. This way we lay a foundation of standard patterns. You will quickly recognize that they show up in many more complicated architectural patterns later on.

Here is a short list of topic we have covered:


Patterns describing frequent mistakes like the big ball of mud, god classes, analysis-paralysis. Interestingly every anti-pattern as a strong social or organisational component. Real life experinces make for a lively session. BTW. There are several books on anti-patterns like "Anti patterns", "Bitter Java" etc.


With J2EE desing being so popular this session tries to cover the major pitfalls and workarounds in the EJB area. Some architectural desing problems from J2EE itself like the connector architecture are also dealt with. There are good books available. Look at the resources section in the session on J2EE.


We had several session on advanced frameworking where generative approaches e.g. for OO-relational mapping or Value Object generation where shown. Sometimes students bring frameworks from their company and we have a look at them. E.g. a game framework or an EJB tooling framework.

Game patterns

Narrative and gestural patterns used in game designs to communicate events to the user. Very nice. Proof of patterns being truly universal

Plug-in concepts

We have discussed plug-in technology, e.g. 3dstudiomax and how patterns help in this area (template-hook, adapter etc.) I'd love to take a look at the eclipse plug-in technology. Michael Taege is using it heavily in his diploma project and will give us a talk.

Many many more

Model-view-controller, observer to MOM systems, GUI patterns and idioms. Next session a student will bring a particulary ugly piece of code which we will try to refactor. Feel free to bring your own monsters.


I am looking for a good piece of demonstration code that either can be refactored easily using patterns or which already contains easily detectable patterns. Some students want to get practical and I can understand them. Unfortunately the short seminar time leaves litte room for it.

Non-technical Patterns:

Cold Reading Patterns - when profiling meets the astro channel, more..

I had lots of fun lately with an issue of cryptogramm. Schneier mentioned an article that described the patterns of explanation used by criminal profilers as cold reading patterns. In other words: language pattens destined to create vagueness and to avoid being caught with a wrong statement? Who would have thought that profilers use those?

Political Patterns, more

Looks like the "soft" sciences are getting more and more important in computer science. Usability needs a lot of psychology. Security needs a lot of psychology as well. As IT is becoming truly ubiquitous knowledge of the patterns of political manipulation is becoming more and more important.

New Ideas for this Term:

I have got a lot of ideas for this term: Spring and its new style of handling context through dependency injection and inversion of control needs to be investigated. We will be more critical of patterns as well: show that behind many iterator/visitor patterns is simply the need for higher-order function support which is still missing in many OO languages. Prototype concepts need to be known better. We will discuss "Emancipating Instances from the Tyranny of Classes in Information Modeling by JEFFREY PARSONS and YAIR WAND in the context of data access patterns. The observer pattern can be used to show the evolution of a simple (and not really implementable pattern) into high-speed event mechanisms and enterprise message bus technology. Java NIO is still not mainstream knowledge of many developers and we need to show the differences compared to the old mechanism. Can design patterns form an executable language? see the discussion at Design Patterns as Higher-Order Datatype-Generic Programs. Jeremy Gibbons (2006).

The huge number of participants again forced a change in style and content. The hopes for fewer participants have not come true as we are right now in the middle of the diplom/bachelor/master change. This cannot be helped and we will try our best. This is what I would like to do:

For a first participants which pick a pattern for presentation will have to show its use in some software project - preferably from Sourceforge. This way students will learn how to deal with source code AND concentrate on the architectural solution that is provided through the specific pattern..

A next step would be to focus primarily on the problem aspect and let the students decide which patterns they would use to solve a problem. This would mean we need not a list of patterns but a list of specific problems, e.g. when and how to use "context" or when and how to achieve decoupling between objects, components etc. At the end we would get another catalog. This time not on patterns but on complete architectural solutions for standard problems. One could perhaps call this a catalog of applied pattern systems.

Another idea is to focus on eclipse only and uncover all the patterns used in its architecture.

And finally a list of patterns I would like to see explored better:

  1. System Patterns (concurrency etc.) from operating system and server designs. Especially the New I/O patterns in Java (Unix select etc.) are important.

  2. Patterns used in enterprise application design (e.g. based on Ted Newards new book on enterprise java architectures).

  3. Social patterns and patterns form other areas (like game design, movie making, animation, story telling). This could fit nicely together with topics from our sister faculty audiovisual media.

  4. Performance Patterns. What makes software fast? Java performance myths.

  5. Architectural Meta-pattern (like the system design guidelines from Butler Lampson). Not to confuse with architectural patterns

  6. Complex architectural patterns like bureaucracy. The patterns behind application servers. Resource Management patterns.

  7. Lifecycle patterns and everything to do with managing the lifecycle of software or objects.

  8. Generational Patterns from Bettin/Voelter. How to model and generate. With process instructions.

  9. Special security patterns: isolation, closure, inversion of control. What could we do to make browsers safer?

  10. Event based patterns: active objects (Symbian OS) vs. threads.

  11. Data access patterns from the book with the same name. Something new in O/R mapping world?

  12. Extension Patterns: how to extend software (interceptors, virtual adapters, plug-ins, hot configuration)

  13. high-end business patterns (mandantenfähigkeit, bi-temporal storage, stellvertreter)

  14. Communication patterns (transport, format, communication)

  15. Context pattern(directories, parameter, environmental acquisition, inversion of control, closures)

This was last term

I guess I am going to change the seminar slightly. After the usual first phase of introducing a number of basic patterns I'd like to dig into eclipse source to show the patterns in action. How is extensibility realized? How does observer work in eclipse? etc. Base will be the new book by Erich Gamma et.al. on Eclipse. It does not provide much more than the web information on eclipse but it structures and brings order to the whole. The section on patterns is especially nice.

I also like the "rule" approach in this book and would like to discuss it with the students.

Other things I'd like to touch this term:

  1. Environmental acquisition - concept and implementation

  2. Generative patterns

  3. Architectural patterns like the Java Connector architecture

  4. A glance at prototype based languages to break the C++/Java mold.

  5. Perhaps some bits from the book "data model/access patterns" which I got for the library last term.

I don't want to promise too much at that time but I will try to get Claus Gittinger, on of the worlds leading smalltalk experts who happens to be an old friend of mine to join us for a session on patterns and architectures in other languages

Design and Architecture Issues

A discussion of architecture problems and how they can be solved.

How to design an API, more ...

Some tips if you need to design a new API e.g. for bluetooth wands.

Why software doesn't adapt, more...

Sometimes a student comes back with a thesis and the result is a real surprise. Or what would you say if the result is that none of over a hundred standard software packages for project management would be fit for his company?. I started a small article series on the reasons why software doesn't adapt. It will also cover the open source project www.eclipse.org as an example of adaptive software.

Evolving Java-based APIs by Jim des Rivieres, OTI.

Learn which changes break compatibility and how to avoid this. What is the advantage behind abstract base classes as default implementations and not letting customers derive from interfaces directly? If you don't know - read the article.

Examining the Validity of Inversion of control by Sony Mathew.

Learn which changes break compatibility and how to avoid this. What is the advantage behind abstract base classes as default implementations and not letting customers derive from interfaces directly? If you don't know - read the article.

Erich Gamma, Kent Beck: Contributing to Eclipse, more...?

If you thought that OO and Java must be slow - learn to apply design patterns for performance and still produce extensible software.

Examining the Validity of Inversion of control by Sony Mathew.

Mirrors: Design Principles for Meta-level Facilities of Object-Oriented Programming Languages Gilad Bracha, David Ungar Sun Microsystems

Patterns in Software by Richard Gabriel

The term is almost over and you are desperately looking for some computer science book to read at the beach - if they weren't so darn expensive. Get this classic from Richard Gabriel for free.

Computer System Design

Hints for Computer System Design Butler W. Lampson Computer Science Laboratory Xerox Palo Alto Research Center Palo Alto, CA 94304

DIP and MANY other OO design principles from objectmentor.com

Dependendy Inversion Principle by Robert Martin (C++ Report)

The many faces of publish/subscribe

On observer and message patterns

Event Systems

Event Systems How to Have Your Cake and Eat It Too P. Th. Eugster1, P. Felber2, R. Guerraoui1, S. B. Handurukande1, 1 Distributed Programming Laboratory, Swiss Federal Institute of Technology in Lausanne. 2 Bell Labs, Lucent Technologies, 600 Mountain Ave,

Event Delivery

Java Event Delivery Patterns, Paul Monday