Download presentation
Presentation is loading. Please wait.
1
TK2023 Object-Oriented Software Engineering
CHAPTER 13 Introduction to Design Patterns and GRASP
2
INTRODUCTION TO DESIGN PATTERNS
Experienced OO developers normally build up a collection of both general principles and idiomatic solutions that guide them in the creation of software. In OO design, a (design) pattern is a named description of a problem and solution that can be applied to new contexts. It advises the reader on how to apply it in novel situations and discusses its trade-offs, implementations, variations and so on.
3
Example of a pattern: Pattern name: Information Expert
Problem: What is a basic principle by which to assign responsibilities to objects? Solution: Assign a responsibility to the class that has the information needed to fulfill it.
4
The name of a design pattern is important for the following reasons:
It supports chunking and incorporating that concept into our understanding and memory. It facilitates communication. Jill: “Hey Jack, for the persistence subsystem, let’s expose the services with a Façade. We’ll use an Abstract Factory for Mappers, and Proxies for lazy materialization.” Jack: “Huh?”
5
It is important to understand that patterns do not describe new ideas
It is important to understand that patterns do not describe new ideas. They describe existing tried-and-true knowledge, idioms, and principles. Examples of patterns: GOF patterns, GRASP
6
INTRODUCTION TO GRASP General Responsibility Assignment Software Patterns (GRASP) is a set of patterns that defines nine basic OO design principles. Larman, in his book, uses GRASP as a tool to help master the basics of OO design and understand responsibility assignment in object design.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.