Chapter 8, Design Patterns Bridge

Slides:



Advertisements
Similar presentations
Welcome to. Who am I? A better way to code Design Patterns ???  What are design patterns?  How many are there?  How do I use them?  When do I use.
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.
Chapter 8, Object Design Reuse and Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
Patterns Reusable solutions to common object-oriented programming problems When given a programming problem, re-use an existing solution. Gang of Four.
Chapter 8, Object Design Introduction to Design Patterns
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.
Visual Basic: An Object Oriented Approach 11 – Patterns in object oriented programming.
Chapter 8 Object Design Reuse and Patterns. Finding Objects The hardest problems in object-oriented system development are: –Identifying objects –Decomposing.
Design Pattern – Bridge (Structural) References Yih-shoung Chen, Department of Information Engineering, Feng Chia University,Taiwan, R.O.C. The Bridge.
CERN – European Organization for Nuclear Research GS Department – Administrative Information Services Design Patterns in Groovy Nicolas Décrevel Advanced.
Chapter 8, Object Design Reuse and Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
Design Patterns Standardized Recurring model Fits in many location Opposite of customization Fundamental types of pattern Choose and use as desired and.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
樣式導向設計 (Pattern-Oriented Design) 課程簡介 Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering.
Chapter 8, Object Design: Design Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Outline of the Lecture  Patterns covered  Composite:
Design Pattern. The Observer Pattern The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
CEN 4010 Ninth Lecture March 4, 2005 Introduction to Software Engineering (CEN-4010) Spring 2005 Instructor: Masoud Sadjadi
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
ECE450S – Software Engineering II
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 8, Object Design: Introduction to Design Patterns.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Introduction to Design Patterns. Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared.
1 Design Patterns Object-Oriented Design. 2 Design Patterns 4Reuse of design knowledge and experience 4Common in many engineering disciplines 4Avoids.
Creational Patterns
Proxy.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
7 April 2004CSci 210 Spring Design Patterns 2 CSci 210.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
CEN 5011 Sixth Lecture (2 nd part) Oct 20, 2004 Advance Software Engineering (CEN-5011) Fall 2004 Instructor: Masoud Sadjadi
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Chapter 8 Object Design: Reuse and Patterns 2.
Software Design Refinement Using Design Patterns
Chapter 10 Design Patterns.
樣式導向設計 (Pattern-Oriented Design) 課程簡介
Chapter 5:Design Patterns
Chapter 8, Object Design Introduction to Design Patterns
MPCS – Advanced java Programming
Common Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
Chapter 8, Design Patterns Builder
Design Patterns with C# (and Food!)
Chapter 8, Object Design Reuse and Patterns II
object oriented Principles of software design
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
How to be a Good Developer
Chapter 6, System Design Design Patterns
Presented by Igor Ivković
Chapter 8, Object Design Introduction to Design Patterns
Chapter 8, Object Design Introduction to Design Patterns
Advanced Programming Behnam Hatami Fall 2017.
Software Engineering Lecture 7 - Design Patterns
Design Patterns in Game Design
Informatics 122 Software Design II
Object Oriented Design Patterns - Structural Patterns
Informatics 122 Software Design II
Chapter 8, Design Patterns Introduction
Presented by Igor Ivković
Chapter 8, Design Patterns Singleton
CIS 644 Tues. Nov. 30, 1999 W15A … patterns.
Chapter 8, DesignPatterns Facade
Presentation transcript:

Chapter 8, Design Patterns Bridge Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 8, Design Patterns Bridge

A Pattern Taxonomy Pattern Behavioral Creational Structural Pattern Composite Decorator Adapter Bridge Façade Proxy Iterator Command Observer Template Strategy Singleton Abstract Factory Builder Factory Prototype

Bridge Pattern Use a bridge to “decouple an abstraction from its implementation so that the two can vary independently”. (From [Gamma et al 1995]) Also know as a Handle/Body pattern. Allows different implementations of an interface to be decided upon dynamically.

(in Vehicle Subsystem) Using a Bridge The bridge pattern is used to provide multiple implementations under the same interface. Examples: Interface to a component that is incomplete, not yet known or unavailable during testing JAMES Project: if seat data is required to be read, but the seat is not yet implemented, known, or only available by a simulation, provide a bridge: Seat (in Vehicle Subsystem) VIP imp SeatImplementation GetPosition() SetPosition() Stub Code AIMSeat SARTSeat

Seat Implementation public interface SeatImplementation { public int GetPosition(); public void SetPosition(int newPosition); } public class Stubcode implements SeatImplementation { public int GetPosition() { // stub code for GetPosition ... public class AimSeat implements SeatImplementation { // actual call to the AIM simulation system public class SARTSeat implements SeatImplementation { // actual call to the SART seat simulator

Bridge Pattern

Adapter vs Bridge Similarities: Difference: Both are used to hide the details of the underlying implementation. Difference: The adapter pattern is geared towards making unrelated components work together Applied to systems after they’re designed (reengineering, interface engineering). A bridge, on the other hand, is used up-front in a design to let abstractions and implementations vary independently. Green field engineering of an “extensible system” New “beasts” can be added to the “object zoo”, even if these are not known at analysis or system design time.