CSCE 315 Lecture 26

From Notes
Jump to navigation Jump to search

« previous | Wednesday, March 4, 2012 | next »


Design Patterns

Finally!

Based on architectural patterns of problems that have been solved before.

Design Patterns: Elements of Object-Oriented Software by the Gang of Four (have it)

Organization

Purposes: Creational, Structural, Behavioral (GoF organization)

Examples

Factory Method
Use a method that can be overridden to create an object of a certain class
Adapter
Create an intermediate interface that clients expect to work with another interface
Composite
Tree structure in which all nodes extend from a base node
Iterator
Access an aggregate object in an easy-to-use order
Observer
one-to-many dependency between abjects so that when data changes, dependant objects are notified and updated automatically