Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Discussion 2 - Peter Kinnaird
- How do design patterns and a pattern languages differ? What is the use of each?
- Design Patterns are essentially canned solutions to common coding problems. Many programmers and program designers find themselved dealing with similar problems over and over again. Thus the birth of Design Patterns. Design patterns are general solutions to these common problems.
- Pattern Languages, however, provide a method for tying together multiple patterns into a larger structure. Good and useful pattern languages are those that provide the designer the ability to weave together multiple patterns in a unified way while still allowing the designer the freedom to easily tailor the solution to their specific problem.
- Describe a Design Pattern
- Facade is an extremely useful and prevalent design pattern in object oriented design and languages. It's primary functionality is that it is a simplified interface. For example, in Java, Graphics2D has a lot more functionality than Graphics. The implementation of Graphics is a facade. Graphics provides an easier interface to Graphics2D. It allows the coder to be unaware of the details of implementation by providing simplified methods for the most commonly used Graphics operations.
- Other uses of Facade are:
- make a software library easier to use and understand, since the facade has convenient methods for common tasks;
- make code that uses the library more readable, for the same reason;
- reduce dependencies of outside code on the inner workings of a library, since most code uses the facade, thus allowing more flexibility in developing the system;
- wrap a poorly designed collection of APIs with a single well-designed API.
My old CS teacher from high school, Ed Kim, who taught us about Facade, MVC, Factory, and DAO
Link to this Page