CSC/ECE 517 Fall 2007/wiki3 5 ld: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 4: Line 4:
= Introduction =
= Introduction =
== GRASP ==
== GRASP ==
Most design patterns are used by programmers to better the code structure and facilitate their coding and maintenance. However, Creator Pattern belongs to a different kind of design pattern: the process pattern.
Most design patterns are used by programmers to better the code structure and facilitate their coding and maintenance. However, Creator Pattern belongs to a different kind of design pattern: the process pattern. The purpose of the process patterns is to describe a proper way to perform tasks.
 
The [http://en.wikipedia.org/wiki/GRASP_(Object_Oriented_Design) GRASP] pattern was first described by Craig Larman in his book: Applying UML and Patterns, 3ed. GRASP stands for General Responsibility Assignment Software Patterns. He mentioned that "The critical design tool for software development is a mind well educated in design principles. It is not the UML or any other technology". Hence GRASP is more like a toolset to aid programmers in designing object-oriented programs.
 
Examples of different patterns/principles used in GRASP are:
#Information Expert
#Creator
#Controller
#Low Coupling
#High Cohesion
#Polymorphism
#Pure Fabrication
#Indirection
#Protected Variations
All these patterns answer some software problem, and in almost every case these problems are common to most every software development project, thus they don't exist to facilitate new information but to better document and standardize old, tried-and-true programming principles in object oriented design.


= Pros and Cons =  
= Pros and Cons =  

Revision as of 23:37, 19 November 2007

Topic

Take the Creator pattern and catalog the information on it available on the Web. Explain how it is different from the Factory pattern. Find good descriptions and good, concise, understandable examples. Tell which you consider the best to present to a class.

Introduction

GRASP

Most design patterns are used by programmers to better the code structure and facilitate their coding and maintenance. However, Creator Pattern belongs to a different kind of design pattern: the process pattern. The purpose of the process patterns is to describe a proper way to perform tasks.

The GRASP pattern was first described by Craig Larman in his book: Applying UML and Patterns, 3ed. GRASP stands for General Responsibility Assignment Software Patterns. He mentioned that "The critical design tool for software development is a mind well educated in design principles. It is not the UML or any other technology". Hence GRASP is more like a toolset to aid programmers in designing object-oriented programs.

Examples of different patterns/principles used in GRASP are:

  1. Information Expert
  2. Creator
  3. Controller
  4. Low Coupling
  5. High Cohesion
  6. Polymorphism
  7. Pure Fabrication
  8. Indirection
  9. Protected Variations

All these patterns answer some software problem, and in almost every case these problems are common to most every software development project, thus they don't exist to facilitate new information but to better document and standardize old, tried-and-true programming principles in object oriented design.

Pros and Cons

Example of Creator Pattern

Comparison with Factory Pattern

Examples for Both Creator and Factory

Reference

  1. GRASP Wikipedia
  2. Applying GRASP to Object Design
  3. Patterns - GRASP