encyclopegia.org

GRASP (object-oriented design)

General responsibility assignment software patterns (or principles), abbreviated GRASP, is a set of "nine fundamental principles in object design and responsibility assignment" first published by Craig Larman in his 1997 book Applying UML and Patterns.[src] The different patterns and principles used in GRASP are controller, creator, indirection, information expert, low coupling, high cohesion, polymorphism, protected variations, and pure fabrication.[src] All these patterns solve some software problems common to many software development projects.[src] These techniques have not been invented to create new ways of working, but to better document and standardize old, tried-and-tested programming principles in object-oriented design.[src] Larman states that "the critical design tool for software development is a mind well educated in design principles.[src] It is not UML or any other technology." Thus, the GRASP principles are really a mental toolset, a learning aid to help in the design of object-oriented software.[src]

General responsibility assignment software patterns (or principles), abbreviated GRASP, is a set of "nine fundamental principles in object design and responsibility assignment" first published by Craig Larman in his 1997 book Applying UML and Patterns.[src] The different patterns and principles used in GRASP are controller, creator, indirection, information expert, low coupling, high cohesion, polymorphism, protected variations, and pure fabrication.[src] All these patterns solve some software problems common to many software development projects.[src] These techniques have not been invented to create new ways of working, but to better document and standardize old, tried-and-tested programming principles in object-oriented design.[src] Larman states that "the critical design tool for software development is a mind well educated in design principles.[src] It is not UML or any other technology." Thus, the GRASP principles are really a mental toolset, a learning aid to help in the design of object-oriented software.[src] ==Patterns== In object-oriented 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.[src] Many patterns, given a specific category of problem, guide the assignment of responsibilities to objects.[src] ===Information expert=== Problem: What is a basic principle by which to assign responsibilities to objects?[src] Solution: Assign responsibility to the class that has the information needed to fulfill it.[src] Information expert (also expert or the expert principle) is a principle used to determine where to delegate responsibilities such as methods, computed fields, and so on.[src] Using the principle of information expert, a general approach to assigning responsibilities is to look at a given responsibility, determine the information needed to fulfill it, and then determine where that information is stored.[src] This will lead to placing the responsibility on the class with the most information required to fulfill it.[src] Related pattern or principle: low coupling, high cohesion ===Creator=== The creation of objects is one of the most common activities in an object-oriented system.[src] Which class is responsible for creating objects is a fundamental property of the relationship between objects of particular classes.[src] Problem: Who creates object A ?[src] Solution: In general, assign class B the responsibility to create object A if one, or preferably more, of the following apply: Instances of B contain or compositely aggregate instances of A Instances of B record instances of A Instances of B closely use instances of A Instances of B have the initializing information for instances of A and pass it on creation.[src] Related pattern or principle: low coupling, factory ===Indirection=== The indirection pattern supports low coupling and reuses potential between two elements by assigning the responsibility of mediation between them to an intermediate object.[src] An example of this is the introduction of a controller component for mediation between data (model) and its representation (view) in the model-view-controller pattern.[src] This ensures that coupling between them remains low.[src] Problem: Where to assign responsibility, to avoid direct coupling between two (or more) things?[src] How to de-couple objects so that low coupling is supported and reuse potential remains higher?[src] Solution: Assign the responsibility to an intermediate object to mediate between other components or services so that they are not directly coupled.[src] The intermediary creates an indirection between the other components.[src] ===Low coupling=== Coupling is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements.[src] Low coupling is an evaluative pattern that dictates how to assign responsibilities for the following benefits: lower dependency between the classes, change in one class having a lower impact on other classes, higher reuse potential.[src] ===High cohesion=== High cohesion is an evaluative pattern that attempts to keep objects appropriately focused, manageable and understandable.[src] High cohesion is generally used in support of low coupling.[src] High cohesion means that the responsibilities of a given set of elements are strongly related and highly focused on a rather specific topic.[src] Breaking programs into classes and subsystems, if correctly done, is an example of activities that increase the cohesive properties of named classes and subsystems.[src] Alternatively, low cohesion is a situation in which a set of elements, of e.g., a subsystem, has too many unrelated responsibilities.[src] Subsystems with low cohesion between their constituent elements often suffer from being hard to comprehend, reuse, maintain and change as a whole.[src] ===Polymorphism=== According to the polymorphism principle, responsibility for defining the variation of behaviors based on type is assigned to the type for which this variation happens.[src] This is achieved using polymorphic operations.[src] The user of the type should use polymorphic operations instead of explicit branching based on type.[src] Problem: How to handle alternatives based on type?[src] How to create pluggable software components?[src] Solution: When related alternatives or behaviors vary by type (class), assign responsibility for the behavior—using polymorphic operations—to the types for which the behavior varies.[src] (Polymorphism has several related meanings.[src] In this context, it means "giving the same name to services in different objects".) ===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 and using polymorphism to create various implementations of this interface.[src] Problem: How to design objects, subsystems, and systems so that the variations or instability in these elements do not have an undesirable impact on other elements?[src] Solution: Identify points of predicted variation or instability; assign responsibilities to create a stable interface around them.[src] ===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).[src] This kind of class is called a "service" in domain-driven design.[src] Related patterns and principles: low coupling, high cohesion.[src] ==See also== Anemic domain model Design pattern (computer science) Design Patterns (book) SOLID (object-oriented design) ==References==[src]

52 sentences · 52 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"GRASP (object-oriented design)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/grasp-object-oriented-design. Accessed 29 November 2026.

Chicago

"GRASP (object-oriented design)." encyclopegia.org. Accessed November 29, 2026. https://encyclopegia.org/wiki/grasp-object-oriented-design.

APA

encyclopegia.org. (2026). GRASP (object-oriented design). Retrieved November 29, 2026, from https://encyclopegia.org/wiki/grasp-object-oriented-design

Accessed November 29, 2026 · CC BY-SA 4.0 · citation page · JSON

Claims

PredicateValueSource
publication date1997Wikipedia

Related articles

Digital Object Identifier

article · references available

Electronic Object Identifier

article · references available

trans-Neptunian object

stub · references available

Messier object

stub · references available

return-oriented programming

stub · references available

object

stub · references available

plain old Java object

stub · references available

Object Data Management Group

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1375424183 · 0.5 · snapshot enwiki-001375424183

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.