Just Another Teaching of Software Engineering (2006-07)

This website archives the teaching and learning of a Software Engineering course. It supports teaching and learning during the course of study (September 2006 to May 2007). After the course, it is an archive for reference and sharing.

Lecture#10: Design Patterns

In this lecture, you will learn the following commonly-used software design patterns.

Factory Method: Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. [GoF, p107]

Abstract Factory: Provide an interface for creating families of related or dependent objects without specifying their concrete classes. [GoF, p87]

Adapter: Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces. [GoF, p139]

Bridge: Decouple an abstraction from its implementation so that the two can vary independently. [GoF, p151]

Facade: Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. [GoF, p185]

Strategy: “Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from the clients that use it.” [Gamma, p315]

References:

Huston Design Patterns. It contains demos and examples (in C++ and Java) to explain various design patterns. A good resource for learning by example.

The Design Patterns Java Companion is a free online book on Java Design Patterns.

Design Patterns, a Java resource from cs.rice.edu

Java Design Patterns Reference and Examples by FluffyCat.com

* * *

No comments yet

Comments RSS

Sorry, the comment form is closed at this time.

All Posts in Category Lectures

* * *