Content deleted Content added
→Controller: Typo Tags: Mobile edit Mobile web edit |
Jens Meiert (talk | contribs) m Added spaces after commas |
||
Line 5:
'''General Responsibility Assignment Software Patterns''' (or '''Principles'''), abbreviated '''GRASP''', consist of guidelines for assigning responsibility to classes and objects in [[object-oriented design]].<ref>https://dzone.com/articles/solid-grasp-and-other-basic-principles-of-object-o</ref> It is not related to the [[SOLID]] design principle.
The different patterns and principles used in GRASP are controller, creator, indirection, information expert, low [[coupling (computer science)|coupling]], high [[cohesion (computer science)|cohesion]],
Computer scientist [[Craig Larman]] states that "the critical design tool for software development is a mind well educated in design principles. It is not [[Unified Modeling Language|UML]] or any other technology."{{sfn|Larman|2005|p = 272}} Thus, GRASP are really a mental toolset, a learning aid to help in the design of object-oriented software.
Line 11:
== Patterns ==
In OO design, a pattern is a named description of a problem and solution that can be applied in new contexts; ideally, a pattern advises us on how to apply its solution in varying circumstances and considers the forces and trade-offs. Many patterns, given a specific category of problem, guide the assignment of responsibilities to objects.
===Information expert===
Line 37 ⟶ 36:
* Instances of <code>B</code> closely use instances of <code>A</code>
* Instances of <code>B</code> have the initializing information for instances of <code>A</code> and pass it on creation.<ref>{{Harvnb|Larman|2005}} chapter 16, section 16.7</ref>
'''Related Pattern or Principle''': Low Coupling, [[Factory pattern]]
|