Content deleted Content added
moving div tags |
changing heading levels |
||
Line 5:
"The critical design tool for software development is a mind well educated in design principles. It is not the UML or any other technology" (Larman, Craig. ''Applying UML and Patterns - Third Edition''. [http://authors.phptr.com/larman/uml_ooad/index.html]). Thus, GRASP is really just a toolset, a learning aid to help in the design of object oriented software.
==Patterns==
<div id="informationexpert"/>
===Information Expert===
The '''Information Expert''' pattern provides the general principles associated with the assignment of responsibilities to objects. The information expert pattern states that responsibility should be assigned to the '''information expert'''—the class that has all the necessary information. Systems which appropriatley utilize the information expert pattern are easier to under, maintain and expand as well as increase the possibilitiy the an element can be reused in future development.<ref name="larman294">(Larman 294)</ref>
===Creator===
The '''Creator''' pattern deals with assigning the responsibility of creating new objects (instances of classes). New instances of class ''Class'' should be created by a class such that:
* it aggregates instances of ''Class'', or;
Line 18:
* it has the necessary information for creating the new instance of ''Class''.
===Controller===
The '''Controller''' pattern assigns the responsibility of dealing with system events to a non-[[User Interface|UI]] class that represent the overall system or a [[use case]] scenario. A use case controller should be used to deal with ''all'' system events of a use case, and may be used for more than one use case (for instance, for use cases ''Create User'' and ''Delete User'', one can have one ''UserController'', instead of two separate use case controllers);
===Low Coupling===
'''Low Coupling''' is an evaluative pattern, which dictates how to assign responsibilities to support:
* low dependency between classes;
Line 27:
* high reuse potential;
===Factory===
This pattern helps determine who should be responsible for creating objects when there are special considerations, such as complex creation logic. This is achieved by creating a '''Pure Fabrication''' object, called '''Factory''' that handles the creation.
<div id="highcohesion"/>
===High Cohesion===
'''High Cohesion''' is an evaluative pattern that attempts to keep objects appropriatley focused, manageable and understandable. High cohesion is genereally used in support of Low Coupling. High cohesion means that the responsibilities of a given element are strongly related and highly focused. Breaking programs into classes and subsystems is an example of activies that increase the cohesive properties of a system. Alternativley, low cohesion is a situation in which a given element has too many unrelated responsibilites. Elements with low cohesion offer suffer from being hard to comprehend, hard to reuse, hard to maintain and adverse to change.<ref name="larman314">(Larman 314-315)</ref>
===Polymorphism===
According to the '''Polymorphism''' pattern, responsibility of defining the variation of behaviors based on type is assigned to the types for which this variation happens. This is achieved using [[Polymorphism (computer science)|polymorphic]] operations.
===Pure Fabrication===
A '''pure fabrication''' is a class that does not represent a concept in the problem ___domain, specially made up to achieve low coupling, high cohesion, and the reuse potential thereof derived (when a solution presented by the ''Information Expert'' pattern does not).
===Indirection===
The '''Indirection''' pattern supports low coupling (and reuse potential) between two elements by assigning the responsibility of mediation between them to an intermediate object.
===Protected Variations===
The '''Protected Variations''' pattern protects elements from the variations on other elements (objects, systems, subsystems) by wrapping the focus of instability with an [[Interface (computer science)|interface]] and using [[Polymorphism (computer science)|polymorphism]] to create various implementations of this interface.
|