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 - Elspeth Watson

Part 1
What are the differences between creational, structural, and behavioral patterns?
All design patterns created so far can be put into one of the three groups: creational, structural and behavioral. Creational does what the name implies it is about the process of object creation. So Singleton (the pattern that I chose for part 2 below) is part of the creational group. Structural patterns is about what is in a class or object. So Adapter, which is a structural pattern, allows classes that are not compatible work together. Behavioral patterns is about how classes and objects interact and who has what responsibility. Template Method, a behavioral pattern, is the most simple and a pattern that one learns early on when learning CS. It create a structure but allows subclasses define specifics. Unusually the names (creational, structural and behavioral) actually depict what the group encapsulates. So yay for easy names so that you can understand what the gruop means.

Part 2:
Singleton is a pattern that seems very highly used. A singleton class is a class that has only one instance of it that everyone can access. If you have a class that handles the information of all the servers then you would want only one. I can see how this can be very useful. My group for 2335 used this pattern in our project. I guess this pattern interests me because so much of object oriented programming is making lots of instances but if you have Singleton then it is unique.

Links to this Page