View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Courtland Goodson - Discussion 2

Courtland Goodson
Gtg502q

Part 1: Question 1

A pattern language is a method which names a common problem in design, gives a solution based on a goal, helps the designer move through problems logically, and allows a designer to be creative. Pattern languages are a way for experienced designers to give helpful tips to novice designers without giving an entire solution. Basically, a pattern language is a recipe for design that doesn’t give only one solution.

A design pattern is a template on how to solve a problem that can lead to several different design solutions. In OOP, design patterns usually show relationships between classes or objects without specifying the exact ones which are used. A design pattern is generally divided into one of five categories depending on the type of problem it solves. Those categories are: Fundamental patterns, Creational patterns, Structural patterns, Behavioral patterns, and Concurrency patterns.

The difference between the two is that a pattern language is usually more specific than a design pattern. Additionally, design patterns are more like templates whereas pattern languages are more like recipes. Both help users solve problem, but each one has its own way of doing it.

Part 2

The pattern I choose to write about was Formula Objects. This pattern helps its user create a report application. The application is suppose to allow the user to enter information and get other information based on formulas. For instance, PROFIT is calculated based on EXPENSES and INCOME. However, the user should be allowed to create or edit formulas. The problem comes with being able to edit and maintain these formulas.
One option would be to use methods for each formula, but this would require that the programmer be available each time a formula is created or modified. The next option would be to have the user input the formula each time they run the applications. This option would be time consuming since some formulas don’t need to be changed at run time.
The solution would be to define an object that represents the results of the formula. This object should be the same type as the object(s) used to create it. Afterwards, define basic formula options that would easily create the Formula Objects (e.g +, -, , and /). There is only one problem with using this method: the solution creates extra objects that could be a problem in the application when more complex formulas are used.
The interesting thing about this pattern is that it reminds me of Excel. Since I deal with Excel on a normal basis, the pattern makes sense because in Excel, a user can define functions and have the application carry them out.
If I had to create an application that called for the use of editable formulas, I would consider using this pattern because it helps break down the problem in a way that makes it easier to program. Additionally, since I wouldn’t have to worry about maintaining the formulas, even less programming has to be done to achieve a reliable product.


Wikipedia: Pattern Languages
http://en.wikipedia.org/wiki/Pattern_language#Usage

Wikipedia: Design Pattern
http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29

John Brant and Joseph Yoder: Creating Reports with Query Objects
http://www.joeyoder.com/papers/patterns/Reports/




Link to this Page