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 - Emily Ewald

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

Reference : http://www.developer.com/design/article.php/10925_3325211_2

Creational patterns, rather than having to create your own objects, create them for you allowing for flexibility in object creation. Structural patterns place groups of objects in a larger planned structure or design, allowing for better organization and scalability. Behavioral patterns organize the communication between objects, controlling the flow of information throughout the system or program.


Part 2)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? If so, what for? If not, why not?

Reference: http://www.dofactory.com/Patterns/PatternComposite.aspx#_self2

A composite structural pattern organizes the system into a tree structure, where each individual element can be easily accessed. The tree structure is composed of interfaces, leaves, and composites. The interface defines the behavior common to all classes, a leaf defines its own methods, and a composite defines those behaviors common to itself and all subclasses. This way of structuring the classes around common behaviors seems useful. It allows the program to be cleaner, because all child classes simply have the same behavior as the parent, in addition to their own unique methods. I might use this in my coding to help organize the structure of my classes. If I have a system with groups of the same type of objects, I may organize them by using a composite class, having a composite element contain multiple leafs.






back to Emily Ewald

Links to this Page