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 - Andrew Calvin

Part 1 - Answer One Question
2) What are the differences between creational, structural, and behavioral patterns?

A design pattern is a solution to typical programming difficulties and this can shorten software creation time since these design patterns exist as proven techniques for the developer. Behavioral design patterns find routine interaction patterns amongst objects and also recognize those patterns to provide greater adaptability for the objects that are interacting. Creational design patterns deal with object generation in a fashion that fits the circumstances. The creational design pattern handles object generation to avoid design difficulties and needless complexity. Structural design patterns seek to define an easy route to recognize interactions amongst targets of interest.

Part 2 - Describe an Interesting Pattern
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?

A singleton pattern is a common, creational pattern used when it is desirable for just one instance of a class to be generated. Any object that communicates with an instance of that class is communicating with that single instance. Interestingly, a Singleton is "functionally similar to a Cache that only contains one object." Some feel that the Singleton is the antipattern because of the “static nature and public availability” allowing components to connect with other components in an unclear manner. Though, I feel that there is merit to the simple, design pattern. A good design principle is to make sure the sole instance is accessible to other objects without needless complexity. The Singleton pattern is used with synchronization when dealing with multiple threads. A Singleton would be useful in networking for restricting use of sockets or database connections.

http://picocontainer.org/Singleton+antipattern
http://en.wikipedia.org/wiki/Creational_pattern
http://en.wikipedia.org/wiki/Behavioral_pattern
http://en.wikipedia.org/wiki/Structural_pattern
http://www.mindspring.com/~mgrand/pattern_synopses.htm
http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29

Links to this Page