Forte Seminar, April 1997 1 Reusable Components Ready for Distribution Patrick Steyaert Programming Technology Lab Vrije Universiteit Brussel

Slides:



Advertisements
Similar presentations
Design Patterns.
Advertisements

Technieken van de Software Architectuur, VUB ‘98-’99, Part 41 Part 4: Design Patterns.
1 Reuse Contracts Patrick Steyaert Programming Technology Lab Vrije Universiteit Brussel WWW:
 Recent researches show that predicative programming can be used to specify OO concepts including classes, objects, interfaces, methods, single and multiple.
Observer Method 1. References Gamma Erich, Helm Richard, “Design Patterns: Elements of Reusable Object- Oriented Software” 2.
Chapter 7 – Object-Oriented Design
CSE3308/CSC Software Engineering: Analysis and DesignLecture 5B.1 Software Engineering: Analysis and Design - CSE3308 Patterns CSE3308/CSC3080/DMS/2000/12.
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University The Bridge Pattern.
The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
Observer Pattern Fall 2005 OOPD John Anthony. What is a Pattern? “Each pattern describes a problem which occurs over and over again in our environment,
Observer Pattern Tu Nguyen. General Purpose When one object changes state, all the dependent objects are notified and updated. Allows for consistency.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
CSE Software Engineering: Analysis and Design, 2002Lecture 7B.1 Software Engineering: Analysis and Design - CSE3308 Patterns CSE3308/DMS/2002/15.
Copyright © Active Frameworks Inc. - All Rights Reserved.More On Behavioral Patterns - Page L9-1 PS95&96-MEF-L16-1 Dr. M.E. Fayad Creationa l.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
The Component Dilemma Handicaps of Component Architectures in Commercial Information Systems Michael Löwe IDPT 2002.
Chapter 22 Object-Oriented Design
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
Course Instructor: Aisha Azeem
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
The chapter will address the following questions:
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
The Design Discipline.
Design Patterns.
Object-oriented Software Engineering with Reuse Contracts Koen De Hondt, Carine Lucas, Kim Mens, Tom Mens, Patrick Steyaert, Roel Wuyts Programming Technology.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
02 - Behavioral Design Patterns – 2 Moshe Fresko Bar-Ilan University תשס"ח 2008.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Odyssey A Reuse Environment based on Domain Models Prepared By: Mahmud Gabareen Eliad Cohen.
Observer Behavioral Pattern. Intent Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified.
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.
1 UNIT –II Architecting Web Service. 2 Why SOA? – business point of view  Information Technology (IT) workers face many challenges, including: Limited.
ECE450S – Software Engineering II
1 A Brief Introduction to Design Patterns Based on materials from Doug Schmidt 1.
1 CMPT 275 High Level Design Phase Modularization.
Proxy, Observer, Symbolic Links Rebecca Chernoff.
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.
Design Pattern. Definition: A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.
A Formal Model for Object-Oriented Software Reuse Kim Mens Programming Technology Lab Vrije Universiteit Brussel FNRS MeetingMay 6th, 1997.
Manali Joshi1 The Observer Design Pattern Presented By: Manali Joshi.
BEHAVIORAL PATTERNS 13-Sep-2012 Presenters Sanjeeb Kumar Nanda & Shankar Gogada.
Slide 1 Service-centric Software Engineering. Slide 2 Objectives To explain the notion of a reusable service, based on web service standards, that provides.
Pattern Bridge. Definition Bridge is the structural pattern that separates abstraction from the implementation so that both of them can be changed independently.
Chapter 8 Object Design Reuse and Patterns. More Patterns Abstract Factory: Provide manufacturer independence Builder: Hide a complex creation process.
1 PSI: From Custom Developed Application to Domain-Specific Framework Wim Codenie, Wilfried Verachtert, Arlette Vercammen OO Partners Otto de Mentockplein.
The Observer Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
OBSERVER PATTERN OBSERVER PATTERN Presented By Presented By Ajeet Tripathi ISE
The Observer Design Pattern Author :Erich Gamma, et al. Source :Elements of Reusable Object-Oriented Software Speaker : Chiao-Ping Chang Advisor : Ku-Yaw.
February 23, 2009Observer Pattern, OOA&D, Rubal Gupta, CSPP, Winter ‘09 Observer Pattern Defines a “one-to-many” dependency between objects so that when.
Software Architecture and Design BITS C461/IS C341 Software Engineering First Semester Aditya P. Mathur Department of Computer Science Purdue.
Design Patterns: MORE Examples
A Brief Introduction to Design Patterns
Observer Design Pattern
The Object Oriented Approach to Design
Design Patterns - A few examples
Inventory of Distributed Computing Concepts and Web services
Service-centric Software Engineering
Web Programming Language
Architectural Roadmap
Observer Pattern 1.
Object oriented analysis and design
BRIDGE PATTERN.
Effort Estimation for Changing Requirements
Reuse Contracts: Managing the Evolution of Reusable Assets
Informatics 122 Software Design II
SO-Architectural Roadmap
Presentation transcript:

Forte Seminar, April Reusable Components Ready for Distribution Patrick Steyaert Programming Technology Lab Vrije Universiteit Brussel WWW:

Forte Seminar, April Typical Case 4Groupware broadcast planning application developed and commercialized by spin-off 4Original application developed for Flemish broadcast company 4Designed and implemented by a small team (< 7) with early OOA/OOD methods 4Implemented in a “pure” OO language 42-tiered client/server architecture

Forte Seminar, April Broadcast Planning — Workflow - 6 months - 1 day Broadcast day Tape External Applications Accounting Airtime sales... Planning + 1 day Consistency checking Contract & Program

Forte Seminar, April Product Evolution original custom application Danish Television Station Belgian Television Station... 3Off-the-shelf solutions don’t work 3Substantial similarities between the planning process of broadcast companies Observation

Forte Seminar, April Product Goal 3Offer a broadcast planning solution that is highly, and efficiently customizable to the needs of different customers. The solution must give the customer the feeling of a custom-built system with the qualities of a standard product. 3It should contain no needless features, must be adapted to the customer’s work process, and must be integrated with existing hardware and software. 3Moreover it should offer the stability and the possibility for future upgrades that is typically associated with off-the- shelf products

Forte Seminar, April Framework Approach Off-the-shelfFramework-basedProject-based Consolidate the domain knowledge acquired during previous projects in a framework so that it can be reused in future projects as to realize the product goal. The framework thus constitutes an ever-evolving representation, in terms of variations and commonalities, of our knowledge of the domain at a certain point in time.

Forte Seminar, April Challenges 4Definition of reusable architecture »integration with existing infrastructure »WEB awareness »migration to an open distributed architecture (CORBA) 4Definition of domain model »separating site-specific code from general concepts 4Maintaining the architecture »reuse documentation »architectural drift »change management

Forte Seminar, April Firstname Lastname Age Person Editor Person Reusable Objects/Components

Forte Seminar, April Firstname Lastname Age Person Editor Person Separation of Concerns

Forte Seminar, April Drawing Editor Firstname Lastname Age Person Editor License Brand Age Car Editor Person Car Drawing Layered Architecture

Forte Seminar, April Application Layer Domain Layer Persistency Layer DB Application Layer Domain Layer Persistency Layer Application Layer Domain Layer Persistency Layer Client / Server Middleware

Forte Seminar, April DB Application Layer Domain Layer Persistency Layer Application Layer Thin Client / Fat Server CORBA

Forte Seminar, April DB Application Layer Domain Layer Persistency Layer Application Layer Web Server Netscape Explorer Client / Server & Internet / Intranet HTTP CORBA

Forte Seminar, April DB Application Layer Domain Layer Persistency Layer Application Layer Application Application Client / Server & Legacy Legacy

Forte Seminar, April The Original Persistency Layer 4Allow non DB experts to work on the application 4Migration to other DB's 4Be ready for OO databases Domain Model Persistency Layer Store Retrieve Hematomas

Forte Seminar, April bcPIDProgramIDcontractPID Example Program contractPeriod broadcastPeriod Period from: 01/01/96, 00h00 to: 01/02/96, 00h00 from: 07/01/96, 20h00 to: 07/01/96, 22h00 Period ProgramTable: PeriodTable: PeriodIDfromDatefromHourtoDatetoHour foreign key

Forte Seminar, April Software Patterns 4Design patterns capture successful solutions to recurring problems that arise during software construction 4Handbooks of successfull designs: »OOD patterns, CORBA patterns, distributed and concurrent programming patterns, analysis paterns, organizational patterns,.... 4Design patterns help to improve key software quality factors and support reuse of software architectures

Forte Seminar, April A Design Pattern 4Describes a recurring design structure »Used twice rule »Names, abstracts from concrete designs »Identifies classes, collaborations, responsibilities »Applicability, trade-offs, consequences, implementation issues 4Is discovered, not invented 4Facilitates communication, focussing on the software architecture

Forte Seminar, April Solution: Bridge Pattern 4Well known design pattern, documented in the most popular design pattern book [Gamma&al. 96] 4Intent: Decouple an abstraction from its implementation so that the two can vary independently 4Motivation: Window Implementations

Forte Seminar, April Bridge: Motivation Window DrawText() DrawRect WindowImp DrawText() DrawRect TransientWindow DrawCloseBox IconWindow DrawBorder() Window95Imp DrawText() DrawRect XWindowImp DrawText() DrawRect Imp

Forte Seminar, April Bridge: Applicability 4Use the Bridge Pattern to »Avoid a permanent binding between an abstraction and its implementation »Both the abstractions and their implementations should be extensible by subclassing »To avoid proliferation of classes Separation of Concerns

Forte Seminar, April Bridge: Structure Abstraction Operation() Implementor OperationImp() imp RefinedAbstraction ConcreteImpB OperationImp() ConcreteImpA OperationImp() Client Bridge Participants

Forte Seminar, April Bridge: Consequences 4Decoupling interface and implementation 4Improved extensibility 4Hiding implementation details from clients

Forte Seminar, April Our Bridge Architecture A B C+D Conceptual Object Contains business rules Implementation Object Knows how to map itself to a relational database Implementation Object Knows how to map itself to a relational database

Forte Seminar, April Example Program broadcastPeriod contractPeriod Period from: 01/01/96, 00h00 to: 01/02/96, 00h00 from: 07/01/96, 20h00 to: 07/01/96, 22h00 Period ProgramTable bcFromDate bcFromTime bcToDate bcToTime cntrFromDate cntrFromTime... bcFromDate bcFromTime bcToDate bcToTime cntrFromDate cntrFromTime cntrToDate cntrToTime ProgramStorage Conceptual ObjectsImplementation Objects BCPeriodStorage Database

Forte Seminar, April nd Example: Observer 4Intent: Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. 15,20,40 4Motivation: Maintain consistency between objects without a tight coupling that reduces reusability.

Forte Seminar, April Observer : Applicability 4Use Observer when »an abstraction has two aspects, one dependent on the other. Encapsulating these aspects in separate objects lets you vary and reuse them independently. »a change to one object requires changing others, and you don’t know how many objects need to be changed »an object should be able to notify other objects without making assumptions about who these objects are. Separation of Concerns

Forte Seminar, April Observer : Structure Subject attach(Observer) dettach(Observer) Notify() Observer update() ConcreteObserver observerState update() state ConcreteSubject subjectState getState() setState() forall o in observers o update return subjectState observerState= subject subjectState Observer Participants

Forte Seminar, April Observer : Consequences 4abstract coupling between subject and observer 4support for broadcast communication 4unexpected updates

Forte Seminar, April Notational Problems Subject attach(Observer) dettach(Observer) Notify() Observer update() ConcreteObserver observerState update() state ConcreteSubject subjectState getState() setState() forall o in observers o update return subjectState observerState= subject subjectState

Forte Seminar, April Solution: Reuse Contracts Subject attach(Observer) dettach(Observer) notify() getState() setState() [notify] Observer update() ConcreteObserver update() ConcreteSubject subjectState getState() setState() [notify] notify [update] subject update [getState] concretisation 3update concretisation 3getState, setState implementation must invoke update ConcreteSubject must make Subject concrete

Forte Seminar, April Checking Architectural Drift Subject attach(Observer) dettach(Observer) notify() getState() setState() [notify] Observer update() ConcreteObserver update() [draw] ConcreteSubject subjectState getState() setState() [-notify] notify [update] subject update [getState] refinement 3update [+draw] coarsening 3setState [-notify] Conflict !!!

Forte Seminar, April Reuse Contract Notation Component reuser Component provider Reuse contract between provider and reuser » declares how a component can be reused and is reused » emphasis on interaction between components » formal rules for change propagation Subject attach(Observer) dettach(Observer) notify() getState() setState() [notify] coarsening 3setState [-notify]

Forte Seminar, April There is More than Choosing an Object- Oriented Programming Language 4Methodology »setting up architectures 4Technology, tools and notations 4Process Model »Planning for reuse 4Migration and integration issues »Legacy Systems 4Training