Pattern Oriented Design Chain of Responsibility From:Design Patterns Gamma. Johnson Helm. Vlissides (GoF) Present: F8906082 楊汝康 R9306008 徐德皓 R9306016 高稚翔.

Slides:



Advertisements
Similar presentations
Chain of Responsibility Pattern Gof pp Yuyang Chen.
Advertisements

18-1 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors.
DESIGN PATTERNS OZGUR RAHMI DONMEZ.
Matt Klein 7/2/2009.  Intent  Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request.
Design Patterns Yes, they are important Robert Cotton April 23, 2009.
05/26/2004www.indyjug.net1 Indy Java User’s Group June Knowledge Services, Inc.
What is the Chain? It’s a behavioral design pattern. It deals with how objects make requests and how they are handled.
(c) 2009 University of California, Irvine – André van der Hoek1June 13, 2015 – 21:42:16 Informatics 122 Software Design II Lecture 8 André van der Hoek.
Zaki Alasadi Supervisor:Dr noorhosseini.
BehavioralCmpE196G1 Behavioral Patterns Chain of Responsibility (requests through a chain of candidates) Command (encapsulates a request) Interpreter (grammar.
Design Patterns CS is not simply about programming
Design Patterns. What are design patterns? A general reusable solution to a commonly occurring problem. A description or template for how to solve a problem.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
March R McFadyen1 GoF (Gang of Four): Gamma, Johnson, Helm & Vlissides Book: Design Patterns: Elements of Reusable Object-Oriented Software.
Software Engineering I Object-Oriented Design Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science.
Algorithm Programming Behavioral Design Patterns Bar-Ilan University תשס " ו by Moshe Fresko.
(c) 2010 University of California, Irvine – André van der Hoek1June 29, 2015 – 08:55:05 Informatics 122 Software Design II Lecture 8 André van der Hoek.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
Behavioral Patterns C h a p t e r 5 – P a g e 128 BehavioralPatterns Design patterns that identify and realize common interactions between objects Chain.
BY VEDASHREE GOVINDA GOWDA
BDP Behavioral Pattern. BDP-2 Behavioral Patters Concerned with algorithms & assignment of responsibilities Patterns of Communication between Objects.
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
樣式導向設計 (Pattern-Oriented Design) 課程簡介 Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering.
CSSE 374: Introduction to Gang of Four Design Patterns
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Behavioral Design Patterns Morteza Yousefi University Of Science & Technology Of Mazandaran 1of 27Behavioral Design Patterns.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Chain of Responsibility Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
CSE 403 Lecture 14 Design Patterns. Today’s educational objective Understand the basics of design patterns Be able to distinguish them from design approaches.
ECE450S – Software Engineering II
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns VIII Chain of Responsibility, Strategy, State.
1 Design Patterns Object-Oriented Design. 2 Design Patterns 4Reuse of design knowledge and experience 4Common in many engineering disciplines 4Avoids.
Creational Patterns
FacadeDesign Pattern Provide a unified interface to a set of interfaces in a subsystem. Defines a high level interface that makes the subsystem easier.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
CS616: Software Engineering Spring 2009 Design Patterns Sami Taha.
Design Patterns David Talby. This Lecture Re-routing method calls Chain of Responsibility Coding partial algorithms Template Method The Singleton Pattern.
Behavioral Patterns1 Nour El Kadri SEG 3202 Software Design and Architecture Notes based on U of T Design Patterns class.
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
Chain of Responsibility Behavioral Pattern. Defination Avoid coupling between the sender and receiver by giving more than one object a chance to handle.
Chain of Responsibility A graphical user interface and a user that needs help; a security system with multiple sensors; a banking automated coin storage.
Design Patterns Introduction
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 31. Review Creational Design Patterns – Singleton Pattern – Builder Pattern.
Design Patterns Introduction “Patterns are discovered, not invented” Richard Helm.
The Chain of Responsibility Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Overview of Behavioral Patterns ©SoftMoore ConsultingSlide 1.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Software Design Refinement Using Design Patterns
The Object-Oriented Thought Process Chapter 15
Chapter 10 Design Patterns.
樣式導向設計 (Pattern-Oriented Design) 課程簡介
GoF Patterns (GoF) popo.
MPCS – Advanced java Programming
Introduction to Design Patterns
Design Patterns Introduction
Instructor: Dr. Hany H. Ammar
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
Design Patterns Satya Puvvada Satya Puvvada.
Informatics 122 Software Design II
Behavioral Patterns Part-I introduction UNIT-VI
Behavioral Design Pattern
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
Informatics 122 Software Design II
Composite Design Pattern By Aravind Reddy Patlola.
Presentation transcript:

Pattern Oriented Design Chain of Responsibility From:Design Patterns Gamma. Johnson Helm. Vlissides (GoF) Present: F 楊汝康 R 徐德皓 R 高稚翔 R 陳錫樺 R 葉冠良 R 謝漢風 2004/Dec/21

2 Outline Introduction 高稚翔 Structure Example 高稚翔 Object Example 葉冠良 Object Diagram 葉冠良 Non-software 葉冠良 UI Operation Example 陳錫樺 Interaction Diagram 陳錫樺 Successor 謝漢風 Class Diagram 謝漢風 Structure 徐德皓 Collaborations 徐德皓 Consequences of Behavior Patterns 楊汝康

2004/Dec/213 Introduction 3 majors  1.Creational Patterns Abstract factory 、 builder…. Etc.  2.Structural Patterns adapter 、 facade 、 proxy…etc.  3.Behavioral Patterns Chain of responsibility 、 command 、 memento…etc.

2004/Dec/214 Introduction Chain of Responsibility  Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.

2004/Dec/215 Structure Example if(/* 符合請求條件一 */) // 執行請求一 else if(/* 符合請求條件二 */) // 執行請求二 else // 執行預設請求或顯示訊息

2004/Dec/216 Object Example Consider a context-sensitive help facility for a graphical user interface. The user can obtain help information on any part of the interface just by clicking on it(F1)

2004/Dec/217 Object Diagram The goal is avoid the coupling

2004/Dec/218 Non-software Domia n Domain Domia n Domain Host A

2004/Dec/219 Interaction Diagram Neither aPrintButtom nor aPrintDialog handles the request; it stops at anApplication, which can handle it or ignore it.

2004/Dec/2110 UI Operation Example

2004/Dec/2111 UI Operation Example

2004/Dec/2112 Successor To forward the request along the chain, and to ensure receivers remain implicit, each object on the chain shares a common interface for handling requests and for accessing its successor on the chain 123

2004/Dec/2113 Class Diagram Super class

2004/Dec/2114 Structure Handler  HelpHandler ConcreteHandler  PrintButtom, PrintDailog Client

2004/Dec/2115 Collaborations When a client issues a request, the request propagates along the chain until a ConcreteHandler object takes responsibility for handling it.

2004/Dec/2116 Consequences Has the following benefits and liabilities  Advantage Reduced coupling. Added flexibility in assigning responsibility to objects  disadvantage Receipt isn’t guaranteed

2004/Dec/2117 Consequences of Behavior Patterns Separate the sender receiver  Command  Observer  Mediator  Chain of Responsibility

2004/Dec/2118 End Any questions?