General Responsibility Assignment Software Patterns or Principles , abbreviated GRASP , consist of guidelines for assigning responsibility to classes and objects in object-oriented design. The different patterns and principles used in GRASP are controller, creator, indirection, information expert, high cohesion , low coupling , polymorphism , protected variations, and pure fabrication. All these patterns answer some software problems, and these problems are common to almost every software development project. 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. Computer scientist Craig Larman states that "the critical design tool for software development is a mind well educated in design principles.
|Published (Last):||5 December 2004|
|PDF File Size:||5.98 Mb|
|ePub File Size:||6.36 Mb|
|Price:||Free* [*Free Regsitration Required]|
Start on. Show related SlideShares at end. WordPress Shortcode. Published in: Engineering. Full Name Comment goes here. Are you sure you want to Yes No. Aisha Ingram Grace a 46 year old mom of 3, was close to giving up She had struggled for over a decade to lose weight She'd tried everything That is, until she found this "odd" morning hack and dropped 62lbs in less than 8 weeks!
Claim your copy right now! No Downloads. Views Total views. Actions Shares. Embeds 0 No embeds. No notes for slide. Ooad applying uml-and-patterns 1. En Const. Cn Trans. Process Sale 1. Customer arrives Cashier makes new sale. Captured-on 2. Assign a responsibility to the information expert — the class that has the information necessary to fulfill the responsibility.
Creator Who creates? Note that Factory is a common alternate solution. Assign class B the responsibility to create an instance of class A if one of these is true: 1. B contains A 4. B records A 2. B aggregates A 5. B closely uses A 3. B has the initializing data for A Controller Who handles a system event?
Assign the responsibility for handling a system event message to a class representing one of these choices: 1. Represents the overall system, device, or a subsystem facade controller. Represents a use case scenario within which the system event occurs use-case or session controller Low Coupling evaluative How to support low dependency and increased reuse?
Assign responsibilities so that unnecessary coupling remains low. High Cohesion evaluative How to keep complexity manageable? Assign responsibilities so that cohesion remains high. Polymorphism Who is responsible when behavior varies by type? 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.
Pure Fabrication Who is responsible when you are desperate, and do not want to violate high cohesion and low coupling? Assign a highly cohesive set of responsibilities to an artificial or convenience "behavior" class that does not represent a problem domain concept — something made up, in order to support high cohesion, low coupling, and reuse.
Indirection How to assign responsibilities to avoid direct coupling? Assign the responsibility to an intermediate object to mediate between other components or services, so that they are not directly coupled. Protected Variations How to assign responsibilities to objects, subsystems, and systems so that the variations or instability in these elements do not have an undesirable impact on other elements?
Identify points of predicted variation or instability; assign responsibilities to create a stable "interface" around them. Contracts vs. Use Cases? No, Not Exactly.
In between the nice ideas, the requirements or the "vision," and a working software product, there is much more than programming. Analysis and design, defining how to solve the problem, what to program, capturing this design in ways that are easy to communicate, to review, to implement, and to evolve is what lies at the core of this book.
This is what you will learn. UML is the visual language used to convey design ideas throughout this book, which emphasizes how developers really apply frequently used UML elements, rather than obscure features of the language.
The importance of patterns in crafting complex systems has long been recog- nized in other disciplines. Software design patterns are what allow us to describe design fragments, and reuse design ideas, helping developers leverage the expertise of others.
Patterns give a name and form to abstract heuristics, rules and best practices of object-oriented techniques. No reasonable engineer wants to start from a blank slate, and this book offers a palette of readily usable design patterns. But software design looks a bit dry and mysterious when not presented in the context of a software engineering process. And on this topic, I am delighted that for his second edition, Craig Larman has chosen to embrace and introduce the Unified Process, showing how it can be applied in a relatively simple and low-ceremony way.
By presenting the case study in an iterative, risk-driven, architecture-centric process, Craig's advice has realistic context; he exposes the dynamics of what really happens in software development, and shows the external forces at play. The design activities are connected to other tasks, and they no longer appear as a purely cerebral activity of systematic transformations or creative intuition.
And Craig and I are convinced of the benefits of iterative development, which you will see abundantly illustrated throughout. So for me, this book has the right mix of ingredients. Craig describes the method in the context of the Uni- xv He gradually presents more sophisticated design patterns—this will make the book very handy when you are faced with real-world design challenges. And he uses the most widely accepted notation. I'm honored to have had the opportunity to work directly with the author of this major book.
I enjoyed reading the first edition, and was delighted when he asked me to review the draft of his second edition. We met several times and exchanged many e-mails.
I have learned much from Craig, even about our own process work on the Unified Process and how to improve it and position it in various organizational contexts. And, like me, you will find yourself going back to it, to refresh your memory, or to gain further insights from Craig's explanations and experience.
In an iterative process, the result of the second iteration improves on the first. Similarly, the writing matures, I suppose; even if you have the first edition, you'll enjoy and benefit from the second one. Happy reading!
Follow a roadmap through require- ments, analysis, design, and coding. Use the UML to illustrate analysis and design models. Learn efficiently by following a refined presentation. Learn from a realistic exercise. Thank you for reading this book! Therefore, this second edition builds upon and refines—rather than replaces—the content in the first.
I want to sincerely thank all the readers of the first edition. Here is how the book will benefit you. Third, the Unified Modeling Language UML has emerged as the standard notation for modeling; so it is useful for you to be conversant in it. Fourth, design patterns communicate the "best practice" idioms and solutions that object-oriented design experts apply in order to create systems.
GRASP (object-oriented design)
Book Applying UML and Patterns