View this PageEdit this Page (locked)Attachments 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 - Eric Amy

What are the differences between creational, structural, and behavioral patterns?
Creational patterns emphasize dynamic instantiation. Like the Factory design, where a 'Factory' class decides what objects it needs to create instead of the programmer writing out every case for an object instantiation where it would be used in the code.
Structural patterns group objects into large structures such as: front-end/back-end, data model/user interface. This allows for a 'big picture' yielding a better understanding of an object's role.
Behavioural patterns center around communication. Such as the event driven Observer pattern, an object's role is defined by how it interacts with other objects. Everything is done by sending 'messages'. An Observer object waits for a message from one of its observed objects to trigger functions. In this way a programmer can organize any function by what messages need to be sent in a situation.

Describe one design pattern or pattern language in your own words. Again, reference your sources. Explain what interests you about this pattern. Does it make sense to you? Can you see using it in your coding?
The Observer pattern has objects that are subscribers and have subscribers which are 'listeners' for events. When an event is published because some condition is met the subscribers all recieve messages updating them of this condition. Each can respond to an even accordingly. This is great for dealing with a user because of the great difference in timing between the user's perception and the program's. Observer objects can sit and wait for the user to generate an input, and then through the subscriber network necessary actions can be performed in any number of objects from the cascading messages.

Short Introduction: 

Links to this Page