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 - Brandyn Roemer

Part 1 - What are the differences between creational, structural, and behavioral patterns?

Creational - Design patterns that focus on the creation of object instances. They describe different ways in which objects can be created, one or more of which may be more ideal for a given situation than another. Some examples include the Factory, Builder, and Singleton patterns.

Structural - Design patterns that focus on how objects/classes can be combined to form more complex structures. They make the realization of relationships easier. Some examples include the Adapter, Bridge, Proxy, and Facade patterns.

Behavioral - Design patterns that focus on communication/interaction patterns among objects with the aim of increasing flexibility. It can help to avoid otherwise unecessary hard-coding and dependencies. Some examples include the Chain of Responsibility, Mediator, and State patterns.

Part 2 - Describe an Interesting Pattern

One of the patterns that I found interesting is the Chain of Responsibility pattern. This pattern allows for the chaining of together of a number of classes in order to handle data/messages/etc. The first class in the chain receives data, handles all, part, or none of it, and then, if applicable, hands part or all of the data off to the next class in the chain. This continues until there is nothing left to be handled or there are no more classes left in the chain. I can definately see using this in coding that involves handling network protocols, where one protocol may contain higher level data/protocols in its payload.


Link to this Page