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

Discussion 2 - David Eakes

Discussion 2

Describe the Portland Form. Why is it useful?

Wikipedia's page on the Portland Pattern Repository describes it as part of the Web site of Portland-based company Cunningham and Cunningham. It stores "computer programming patterns that are part of pattern languages, with an increasing emphasis on extreme programming." The repository is a big Wiki, so it is updated frequently with the newest and most revised information. The basic idea is that the patterns on the repository provide a standard "vocabulary" to discuss work of programs and programming languages.

Composite Pattern

"Intent: Compose objects into tree structures that represent whole-part hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. A leaf has the same interface as a node."

For example, Java Swing classes, in theory, implement a Composite Pattern since they all extend java.awt.Component, but in reality only JPanel and JTabbedPane act like composites. (source) Trees are an easy and fairly simple way to organize things. The Windows File Manager is organized in a tree and exhibits the Composite Pattern.(source) Since trees are simple, it can be a good data stucture for classes and objects. In Java I've already used trees to organize data involving threads on a newsgroup. As far as objects are concerned, I haven't been in a big enough project to use a Composite Pattern effectively, but I imagine when there is a lot of inheritance going on in a class structure that a Composite pattern tree would be a smart way to organize methods and variables within Objects.

Links to this Page