tk2023 object-oriented software engineering
DESCRIPTION
TK2023 Object-Oriented Software Engineering. CHAPTER 13 Introduction to Design Patterns and GRASP. 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. - PowerPoint PPT PresentationTRANSCRIPT
TK2023 Object-Oriented Software Engineering
CHAPTER 13
Introduction to Design Patterns and GRASP
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.
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.
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?”
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
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.