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 Adkisson

Part 1 - Question 2

Design patterns describe generally applicable solutions to common design issues
in software engineering. A book which helped popularize design patterns,
Design Patterns by Gamma, et al., commonly known as the "gang of four book,"
groups design patterns into three general categories based on the types of
issues the design patterns solve:

Creational patterns handle the dynamic creation of objects. Normal object
creation can be a problem when a program needs to create different classes of
objects in different situations, so creational patterns provide a way to handle
that decision.

Structural patterns describe ways to compose a potentially complicated object
structure using a collection of simpler objects. Benefits of such structure
include extendibility and flexibility.

Behavioral patterns solve more algorithmic problems among objects such as
what flow control, collaboration, and communication mechanisms to use in which
situations.

Sources:
http://www.python.org/workshops/1997-10/proceedings/savikko.html
http://www.eng.mu.edu/corlissg/168Search.03F/n_patterns_creational.html
http://my.execpc.com/~gopalan/design/behavorial.html
http://c2.com/cgi-bin/wiki?DesignPatterns
http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29



Part 2

The flyweight pattern is a structural pattern that removes common data from a
class, using a reference to that data for each common instance rather than each
instance having its own copy. This helps to reduce memory consumption and
creates some flexibility. I could see using this pattern in graphics
applications: many primitives in a scene are likely to have the same material
properties, such as groups of triangles in the tiling of a surface. That
material information could be stored in a separate object that is referenced by
the primitive.

Sources:
http://en.wikipedia.org/wiki/Flyweight_pattern

Links to this Page