View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 2 - David Sponaas

Sources:
P1: http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29
P2: http://en.wikipedia.org/wiki/Singleton_pattern

The differences between creational, structural, and behavioral patterns
could best be described by describing what they are. For example, creational
patterns differ from structural and behavioral patterns in that creational patterns
deal with the creation of objects whereas the other two do not. Similarly,
structural patterns are patterns concerned with the way objects are interrelated,
whereas the other two are not concerned with such things. Finally, behavioral
patterns are patterns that solve problems arising in the way objects communicate
with each other whereas the other patterns don't address communication.

A pattern I find particularly interesting is the Singleton pattern.
The Singleton pattern is a creational pattern as it is a method for managing
object creation to ensure that no more than one of an object may ever exist at
one point in time. This is extraordinarily useful in situations that logically
require only one of an object. For instance, if you were writing a program
that had a message handling center class that processed and sent messages between
objects, it would make sense that there should only ever be one of these for
the whole program and that all the other objects in the program should have
certain access to it (i.e. putting messages in the mailbox). Essentially
this pattern makes great sense to me to use for managing classes such as
network handlers, communication handlers, UI interaction, and so on.

Link to this Page