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 Figlar)

David Figlar - Assignment 2

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

Just to setup a basis of contrast, a design pattern is defined as a solution to a recurring design problem. Creational patterns involve the optimal method to go about creating instances of objects based on the current situation. Structural patterns deal with assessing correlations between groups and creating larger structures from those groups. Behavioral patterns help distinguish communication between objects.

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?

The factory method uses a method for creating objects so subclasses can generate instances of objects that pertain to themselves. It's interesting because it allows for robust creation of objects from a framework. This is useful because one doesn't have to hardcode the specific objects in the main class. I would definitely use this in coding say, for example, in a toolkit that I created for the graphical user interface that would be used in a legacy of games.

Works Cited
Design Pattern (computer science). Wikipedia. 30 Aug. 2005.

Cooper, James W. What Are Design Patterns?