Mediator A Behavioral Design Pattern for the New Millennium Cory Nugent.

Slides:



Advertisements
Similar presentations
UMBC Some Additional Patterns CMSC 432. UMBC More Patterns2 Introduction Over the next few lectures we’ll have an introduction to a number of patterns.
Advertisements

Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory 1 Mediator Abbas Rasoolzadegan.
Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott.
Design Pattern: Mediator Mediator Modified from Kyle Kimport’s: Design Patterns: Mediator Design Patterns: Mediator Ref:
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
A Behavioral Pattern. Problem: Simple enough right? Object.
A Brief Introduction to Software Design and Design Quality By Laura Leventhal.
What is the Chain? It’s a behavioral design pattern. It deals with how objects make requests and how they are handled.
Mediator Matt G. Ellis. Overview ► Intent ► Motivation ► Mediators in GUI applications ► Mediators and Relational Integrity ► Conclusion ► Questions.
BehavioralCmpE196G1 Behavioral Patterns Chain of Responsibility (requests through a chain of candidates) Command (encapsulates a request) Interpreter (grammar.
Cam Quach Joel Derstine Mediator: Object Behavioral.
Applying Design Patterns to Wireless Sensor Network Sajjad Soroush AmirKabir University of Technology, Department of Computer Engineering.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
BY VEDASHREE GOVINDA GOWDA
BDP Behavioral Pattern. BDP-2 Behavioral Patters Concerned with algorithms & assignment of responsibilities Patterns of Communication between Objects.
Design Patterns.
A Behavior Object Pattern
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
Emeka Egbuonye CSPP March 02,2010 The Mediator Pattern.
Case Studies on Design Patterns Design Refinements Examples.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Mediator Pattern and Multiuser Protection Billy Bennett June 8 th, 2009.
Y2 eProjects Session 4 – Advanced Topics. Objectives  Dynamic Models  Design Patterns (Optional)  Software testing (for S4) ACCP i7.1\Sem3_4\eProject\T4.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Behavioral Design Patterns Morteza Yousefi University Of Science & Technology Of Mazandaran 1of 27Behavioral Design Patterns.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns IX Interpreter, Mediator, Template Method recap.
 Repository Model  Client-Server Model  Layered Model  Modular decomposition styles  Object Models  Function Oriented Pipelining  Control Styles.
Unit 4 Object-Oriented Design Patterns NameStudent Number CAI XIANGHT082182A KYAW THU LINHT082238Y LI PENGFEIHT082220L NAUNG NAUNG LATTHT082195L PLATHOTTAM.
Mediator Kensho Tsuchihashi. Mediator Page 2 Table of Contents 1.What is Mediator? 2.What problem does Mediator solve? 3.Advantage and Disadvantage 4.Additional.
Software Design: Principles, Process, and Concepts Getting Started with Design.
CS 590L – Distributed Component Architecture 02/20/2003Uttara Paingankar1 Design Patterns: Factory Method The factory method defines an interface for creating.
Behavioural Design Patterns Quote du jour: ECE450S – Software Engineering II I have not failed. I've just found 10,000 ways that won't work. - Thomas Edison.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Designing Classes. Software changes Software is not like a novel that is written once and then remains unchanged. Software is extended, corrected, maintained,
FacadeDesign Pattern Provide a unified interface to a set of interfaces in a subsystem. Defines a high level interface that makes the subsystem easier.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
CSE 332: Design Patterns Review: Design Pattern Structure A design pattern has a name –So when someone says “Adapter” you know what they mean –So you can.
Manali Joshi1 The Observer Design Pattern Presented By: Manali Joshi.
Behavioral Patterns1 Nour El Kadri SEG 3202 Software Design and Architecture Notes based on U of T Design Patterns class.
Five design principles
The Mediator Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Broker Design Patterns: Façade and Mediator.
Behavioral Pattern: Mediator C h a p t e r 5 – P a g e 169 When a program is made up of several classes, the logic and computation is divided among these.
An object's behavior depends on its current state. Operations have large, multipart conditional statements that depend on the object's state.
OBSERVER PATTERN OBSERVER PATTERN Presented By Presented By Ajeet Tripathi ISE
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Overview of Behavioral Patterns ©SoftMoore ConsultingSlide 1.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Unit - 3 OBJECT ORIENTED DESIGN PROCESS AND AXIOMS
GRASP – Designing Objects with Responsibilities
Mediator Design Pattern
CHAPTER 5 GENERAL OOP CONCEPTS.
Software Architecture & Difference from Design
IS301 – Software Engineering Dept of Computer Information Systems
Design Pattern: Facade
Mediator Design Pattern (Behavioral)
Princess Nourah bint Abdulrahman University
Mediator.
Object Oriented Design Patterns - Structural Patterns
Why Object-oriented Programming?
Software Architecture
Strategy Design Pattern
Design Joshua Lewis Project questions Assignment questions
Sample Test Questions Please identify the use cases of the system that cover all the behaviors described in the system specification. Please identify.
Dependency Inversion principle
Presentation transcript:

Mediator A Behavioral Design Pattern for the New Millennium Cory Nugent

Designing for OOP Goals of Object Oriented Design Distribute behavior among different objects. Encourage code reuse Facilitate communication between objects

What’s the Problem? Communication between objects becomes too complicated. Changing system behavior becomes too difficult. No central access points are available.

DAS MEDIATØR! A class that controls interactions of a group of other objects. Promotes loose coupling (Objects don’t explicitly reference each other). Objects need only know about their mediator. Provides a centralized behavior management point.

The Good Changing system behavior means sub- classing the mediator. Mediator and Colleague classes are independent of each other. Mediator-Colleague relationship is one to many; Colleague-Colleague relationship is many to many. Object interaction becomes easy to understand.

The Bad All object interactions are bundled into the mediator. The mediator class can be complex and hard to maintain.

How it all works Diagram courtesy of Gopalan Suresh Raj

The Mediator Mediator Defines an interface for communicating with colleague classes. Concrete Mediator Coordinates colleague objects

How it all works Diagram courtesy of Gopalan Suresh Raj

The Colleagues Colleague Defines an interface for communicating with mediator class. Concrete Colleagues Each colleague knows its mediator Each colleague communicates with its mediator when it would otherwise communicate with its colleague.

How it all works Diagram courtesy of Gopalan Suresh Raj

There is no more presentation Thank you, come again.