Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott.

Slides:



Advertisements
Similar presentations
CS 350 – Software Design The Bridge Pattern – Chapter 10 Most powerful pattern so far. Gang of Four Definition: Decouple an abstraction from its implementation.
Advertisements

The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
More Interfaces, Dynamic Binding, and Polymorphism Kirk Scott.
Patterns – Day 8 Adapter continued Facade Reminders: Faculty candidate talk Friday 4:20 PM O-267. Brian Postow: Games and Complexity Theory No class tomorrow.
A Brief Introduction to Software Design and Design Quality By Laura Leventhal.
Mediator Matt G. Ellis. Overview ► Intent ► Motivation ► Mediators in GUI applications ► Mediators and Relational Integrity ► Conclusion ► Questions.
Façade Pattern Jeff Schott CS590L Spring What is a façade? 1) The principal face or front of a building 2) A false, superficial, or artificial appearance.
Mediator A Behavioral Design Pattern for the New Millennium Cory Nugent.
CMPT 370: Information Systems Design Instructor: Curtis Cartmill, Simon Fraser University – Summer 2003 Lecture Topic: Layered Architecture Class Exercise:
ECE 355 Design Patterns Tutorial Part 2 (based on slides by Ali Razavi) Presented by Igor Ivković
Chapter 22 Object-Oriented Design
+ Informatics 122 Software Design II Lecture 8 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
Basic Shelving in the Library. Easy Shelves Books are shelved according to the first letter of the author’s last name Most shelves only have one letter.
Unit 2 Construction and Cloning Kirk Scott. Adonis From Wikipedia, the free encyclopedia Jump to: navigation, searchnavigationsearch For the Syrian poet,
Case Studies on Design Patterns Design Refinements Examples.
SOFTWARE DESIGN AND ARCHITECTURE
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Design Patterns in Java Chapter 1 Introduction Summary prepared by Kirk Scott 1.
Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott.
Y2 eProjects Session 4 – Advanced Topics. Objectives  Dynamic Models  Design Patterns (Optional)  Software testing (for S4) ACCP i7.1\Sem3_4\eProject\T4.
Unit 15 Java Interfaces: Using an Interface to Accomplish a Specific Goal Kirk Scott.
Chapter 2 Introducing Interfaces Summary prepared by Kirk Scott.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns IX Interpreter, Mediator, Template Method recap.
GRASP: Designing Objects with Responsibilities
CS 210 Adapter Pattern October 19 th, Adapters in real life Page 236 – Head First Design Patterns.
Construction and Cloning Kirk Scott. Adonis From Wikipedia, the free encyclopedia Jump to: navigation, searchnavigationsearch For the Syrian poet, see.
Object-oriented Design and Programming CS 2210: SW Development Methods Reading: Chapter 2 of MSD text – Section on UML: look at class diagrams but.
Composite and Related Patterns Kirk Scott. The pitohui, a poisonous bird of New Guinea.
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.
Copyright © Active Frameworks Inc. - All Rights Reserved - V2.0Design Pattern Catalog - Page L3-1 PS95&96-MEF-L10-1 Dr. M.E. Fayad Creationa.
Manali Joshi1 The Observer Design Pattern Presented By: Manali Joshi.
CS 350 – Software Design Expanding Our Horizons – Chapter 8 The traditional view of objects is that they are data with methods. Sometimes objects could.
Using Software Design Patterns Bill Anderson. About me Fox developer since 1987 Fox developer since 1987 Program Director, Los Angeles Visual Foxpro Developers.
OOP (Object Oriented Programming) Lecture 1. Why a new paradigm is needed? Complexity Five attributes of complex systems –Frequently, complexity takes.
The Mediator Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Chunking, Summary, & Annotation. Reading Strategies Chunking Summarization Annotation Hint: They all work together!!!!
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Broker Design Patterns: Façade and Mediator.
Chapter Ten The Bridge Pattern Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
CS 350 – Software Design The Adapter Pattern – Chapter 7 Gang of Four Definition: Convert the interface of a class into another interface that the client.
An object's behavior depends on its current state. Operations have large, multipart conditional statements that depend on the object's state.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Introduction to the Unified Modeling Language.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Generic Interfaces and Encapsulation, a Class in the Middle
Mediator Design Pattern
Façade Pattern:.
Chapter 10 Design Patterns.
Design Patterns Lecture part 2.
Chapter Six The Facade Pattern
Introduction to Design Patterns
Unit 11 Generic Interfaces and Encapsulation, Continued
More Interfaces, Dynamic Binding, and Polymorphism
Java Interfaces: Using an Interface to Accomplish a Specific Goal
Java Interfaces: Using an Interface to Accomplish a Specific Goal
Presented by Igor Ivković
Multiuser Protection and the Mediator Pattern
Basic Shelving in the Library
Basic Shelving in the Library
Elements of Database System
Mediator Design Pattern (Behavioral)
Informatics 122 Software Design II
Object Oriented Design Patterns - Structural Patterns
Informatics 122 Software Design II
Presented by Igor Ivković
Extending Interface Based Design
Topic: Where to put functions in a program
Presentation transcript:

Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott

This is an introductory unit. These are the units/chapters belonging to this section of the course: Unit 8, Mediator, book chapter 10. Unit 9, Façade, book chapter 4. Unit 10, Adapter, book chapter 3.

What will be given next is an extremely brief overview of these topics. The idea is to show that according to the organizational scheme for the course, they can be treated as belonging together, even though the book’s organizational scheme put them into chapters that were separated from each other.

Mediator Book definition: The intent of the Mediator pattern is to define an object that encapsulates how a set of objects interact; this promotes loose coupling, keeping the objects from referring to one another explicitly, and lets you vary their interactions independently. Comment mode on: By definition, a mediator is something that is “in the middle”, between other things. In object-oriented terms, it’s a class in the middle in terms of functional interactions between classes.

Façade Book definition: The intent of the Façade pattern is to provide an interface that makes a subsystem easy to use Comment mode on: This, of course, sounds deceptively simple. How hard it is to make things easy to use… The façade will be a class with a set of straightforward methods which make calls to methods in underlying classes.

Adapter Book definition: The intent of Adapter is to provide the interface that a client expects while using the services of a class with a different interface Comment mode on: My joke about adapter is that adapter is the one true pattern. All other patterns, by intent, if not structure, are adapters.

The idea of having one class provide an interface for another is in some sense fundamental. In essence, we’ve seen it in embryonic form in patterns we’ve looked at already. A proxy has adapter-like characteristics. Mediator and façade also have adapter-like characteristics, and that’s why these three patterns are grouped together

In summary: Mediator defines the interactions between classes Façade provides a nice interface for a class or set of classes Adapter implements the interface needed by a client in order to use a class with a different interface In one way or another, these patterns all have something to do with providing an interface or functionality that support the relationship between one class and another.

As you will see when the patterns are presented, these are concise mnemonic devices for their most important characteristics: Mediator: The class in the middle, the class that stands between, the class that defines the interactions among classes. Façade: The class that stands in front, providing a user-friendly interface. Adapter: The jack of all trades; the class that makes one class usable by another.

The End