tk2023 object-oriented software engineering

6
TK2023 Object- Oriented Software Engineering CHAPTER 13 Introduction to Design Patterns and GRASP

Upload: xantha-mccarthy

Post on 02-Jan-2016

35 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: TK2023 Object-Oriented Software Engineering

TK2023 Object-Oriented Software Engineering

CHAPTER 13

Introduction to Design Patterns and GRASP

Page 2: TK2023 Object-Oriented Software Engineering

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.

Page 3: TK2023 Object-Oriented Software Engineering

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.

Page 4: TK2023 Object-Oriented Software Engineering

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?”

Page 5: TK2023 Object-Oriented Software Engineering

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

Page 6: TK2023 Object-Oriented Software Engineering

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.