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 - Kevin Legette

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

The differences between these design patterns primarily lie in what's emphasized in the object creation and design process. Primarily, these patterns are used in the design of a system, providing the framework for how object will be handled once specific system objects/methods are designed and implemented.

The creational pattern focuses on the creation of objects by your program. It defines initialization rules for these objects as well as determining the lifecycle of these objects. The benifit of this design approach is that it takes most of the object creation process out of the programmer's hands and equips the program with the ability to know when and how to create any objects that are necessary or will be necessary for design implementation.

The structural pattern may be described as a building block approach to object design. It's focus is to outline ways in which objects can be combined or grouped together to form larger and more robust system elements. So, rather than using one large object with a large number of responsibilities, this design pattern would use many smaller objects (with individual duties) to form a larger structure that operates through the interaction of these smaller objects. A good benefit of using an approach like this would be object reusability, in that the objects can be composed in different combinations to create different structures with different capabilities, allowing for more robust design.

The behavioral pattern basically defines the behavior of different objects and how they will interact with each other. By using this design pattern, communication methods are clearly defined amongst all objects, making it easy to define and/or determine program flow.

Sources:
http://www.developer.com/design/print.php/3309461
http://www.developer.com/design/article.php/10925_3325211_2

Part 2 - Describe an Interesting Pattern
One pattern that I found interesting was the Proxy pattern. This is a structural pattern where instead of direct communication with certain objects, communication takes place with substitutes for the actual object. At first glance, my initial thought was that using a proxy/substitute object for communication is a bit redundant, a waste of resources and time that could be saved by using direct communication. However, after a little bit more research into the pattern, you find that it does have many benefits. For example, there are situations where certain objects need to be protected and/or direct access to these objects needs to be limited. Prime examples of these situations would be in web and network interactions where security could be an issue. Another benefit for using the proxy pattern would be in situations where you need to communicate with a very large object. The passing around of this object could be very draining to system resources, however using a proxy object to simulate certain aspects of this object and facilitate communication is a much better option, especially in that this proxy object will be much smaller in size than the original. Once I stumbled across those practical uses of the pattern, it's usefulness became clear to me and i was able to see ways in which I could use it in my coding. With my background in Java programming, this pattern many uses in web application development as well as certain swing applications, making it incredibly useful.

Sources:
http://www.developer.com/design/print.php/3309461
http://www.javaworld.com/javaworld/jw-02-2002/jw-0222-designpatterns-p3.html

Links to this Page