I am really confused about the difference between GOF and GRASP patterns? even both contribute to improved Object oriented practices
What is GoF in design patterns? GoF is actually a commonly used acronym that stand for Gang of Four. The Gang of Four refers to the four authors of the popular book on design patterns called “Design Patterns: Elements of Reusable Object-Oriented Software”.
GRASP (General Responsibility Assignment Software Patterns) is a design pattern in object-oriented software development used to assign responsibilities for different modules of code.
Since its release in 1994, the Design Patterns book continues to be a seminal work in building software. The book created a new shared vocabulary and named these repeated solutions we see all over different codebases.
Short Answer:
GoF are mentioned to Design Patterns. And GRASP are Design Principles. Design Principles are so abstract than Design Patterns.
Long Answer:
The main purpose of Software Engineering is developing a proper software. SDLC presents the steps of Software Engineering in top level. Software Design is one of SLDC steps. And Object Oriented Software Design is a popular approach of Software Design.
To perform an Object Oriented Software Design, there are many kind of resources (in Books, Tutorials and Papers) with different names such as: Guidelines, Principles, Heuristics, Patterns, Styles and etc.
The differences between these names are the Abstraction of them. Top Level is the main principles and other levels are details that help to reach these main principles.
At the top level, tutorials present Main Principles. (based on Object-Oriented Analysis and Design with Applications, Grady Booch, et al. 1991)
Object Oriented Main Principles
All subsequent principles and patterns is related to this main principles and try to support and improve them.
In the second level of resource there are Principles and trying to support and improve Main Principles of Object Orientation.
This level of resources called Design Patters. Gof (Gang of Four) have the first book about Design Patterns. There is 23 Design Patterns to support main principles and other principles of Object Oriented Design.
After GoF, many books written about using Design Patterns in specific programming language and specific frameworks (e.g. J2EE Deign Patterns, JQuery Design Patterns and etc.)
Design Patterns are more detailed and so close to programming language. However, Main Principles (at Top Level) and Principles (at Second Level) is so abstract.
In this level, resources called : Heuristics.
The resource of this level are so detailed and very specific than other groups.
The best resource is Object Oriented Design Heuristics (72 Heuristics) , Book by Arthur J. Riel, 1996
At the final level, there are Guideline.
All Do It, Don't Do it, Avoid, ... guidelines in the books can be gather in this group.
GOF are patterns i.e. proven design solutions to recurring problems. GRASP are principles and are not tied to any specific problem domain hence true in any scenario
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With