Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Discussion 2 - William Blatt
Part 1: (comparing behavioral, structural, and creational patterns)
Although dozens of design patterns exist in the realm of software engineering, most of them fall into one of three major categories: behavioral, structural, and creational. Behavioral patterns include design patterns intended to affect the way objects in your system communicate and operate with each other. Some examples of behavioral patterns include the Mediator pattern, which involves creating a class to communicate state changes in another class, and the Snapshot pattern where the programmer creates a class that can store the state of another class to be used later. Structural patterns address the ways objects are structured and combined together. The Facade pattern, which creates one class that can be used to communicate with a larger set of related classes, is one example of a structural pattern. Creational patterns are used to control object creation in a way that simplifies issues for the programmer. Some creational patterns include the Singleton pattern, which allows only one instance of an object to be created, and the Lazy Initialization practice, where the instantiation of an object is delayed until it is needed.
The Mediator design pattern is a behavioral pattern that reduces the amount of direct communication needed between objects by establishing one class to control the logic of many other objects in the project. After having done large projects in the past, I know that it is often difficult to coordinate all communication between different parts of a program, so I thought the idea of centralizing the logic in a program was an interesting idea. I can definitely see it being useful in my programs, particularly when dealing with how changes affect the user interface.
Link to this Page