Reuse Activities Selecting Design Patterns and Components

Slides:



Advertisements
Similar presentations
Object-Oriented Application Frameworks Much of the cost and effort stems from the continuous re- discovery and re-invention of core concepts and components.
Advertisements

1 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Building Frameworks With Patterns “An Active Object-Model For A Dynamic Web-Based Application”
Page 1 Building Reliable Component-based Systems Chapter 7 - Role-Based Component Engineering Chapter 7 Role-Based Component Engineering.
CS CS 5150 Software Engineering Lecture 17 Object Oriented Design 3.
Design Patterns CS is not simply about programming
Chapter 8, Object Design Introduction to Design Patterns
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 8, Object Design: Reuse and Patterns I.
1 CS 501 Spring 2008 CS 501: Software Engineering Lectures 17 & 18 Object Oriented Design 3 & 4.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
Dept. of Computer Engineering, Amir-Kabir University 1 Design Patterns Dr. Noorhosseini Lecture 2.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
Chapter 8 Object Design Reuse and Patterns. Finding Objects The hardest problems in object-oriented system development are: –Identifying objects –Decomposing.
ECE 355 Design Patterns Tutorial Part 2 (based on slides by Ali Razavi) Presented by Igor Ivković
1 CS 501 Spring 2007 CS 501: Software Engineering Lectures 17 & 18 Object Oriented Design 3 & 4.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
OO Frameworks Department of Computer Science Kent State University.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Design Patterns.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
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.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 8, Object Design: Reusing Pattern Solutions.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
R R R 1 Frameworks III Practical Issues. R R R 2 How to use Application Frameworks Application developed with Framework has 3 parts: –framework –concrete.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns IX Interpreter, Mediator, Template Method recap.
L11-12: Design Patterns Definition Iterator (L4: Inheritance)‏ Factory (L4: Inheritance)‏ Strategy (L5: Multiple Inheritance)‏ Composite (L6: Implementation.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
Chapter 38 Persistence Framework with Patterns 1CS6359 Fall 2011 John Cole.
Structural Design Patterns
ECE450S – Software Engineering II
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
Using Software Design Patterns Bill Anderson. About me Fox developer since 1987 Fox developer since 1987 Program Director, Los Angeles Visual Foxpro Developers.
1 Chapter 5:Design Patterns. 2 What are design pattern?  Schematic description of design solution to recurring problems in software design and,  Reusable.
BEHAVIORAL PATTERNS 13-Sep-2012 Presenters Sanjeeb Kumar Nanda & Shankar Gogada.
Developing Product Line Components Jan Bosch Professor of Software Engineering University of Groningen, Netherlands
 2001 Lodewijk Bergmans University of Twente Pattern Languages.
Example to motivate discussion We have two lists (of menu items) one implemented using ArrayList and another using Arrays. How does one work with these.
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:
Chapter 8 Object Design Reuse and Patterns. More Patterns Abstract Factory: Provide manufacturer independence Builder: Hide a complex creation process.
CS 5150 Software Engineering Lecture 16 Program Design 3.
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Chapter 7 Lecture 1 Design and Implementation. Design and implementation Software design and implementation is the stage in the software engineering process.
COP 3331 Object-Oriented Analysis and Design 1 Design Overview  Design Overview (Ch 6)  Review of RAD  System Design  System Design Concepts  System.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Command Pattern. Intent encapsulate a request as an object  can parameterize clients with different requests, queue or log requests, support undoable.
Software Reuse. Objectives l To explain the benefits of software reuse and some reuse problems l To discuss several different ways to implement software.
Chapter 8 Object Design: Reuse and Patterns.
Design Patterns: MORE Examples
Introduction to Design Patterns
Behavioral Design Patterns
Chapter 8 Object Design: Reuse and Patterns 2.
object oriented Principles of software design
Presented by Igor Ivković
Chapter 8, Object Design Introduction to Design Patterns
Frameworks And Patterns
Chapter 8, Object Design: Reuse and Patterns I
Chapter 8, Design Patterns Introduction
Presented by Igor Ivković
Presentation transcript:

Reuse Activities Selecting Design Patterns and Components Part (2)

Outline Encapsulation Control Flow with the Command Pattern. Encapsulation Hierarchies with the Composite Design Pattern. Heuristics for Selecting Design Patterns. Identifying and Adjusting application framework.

Problem: We don’t want the classes responsible for recording and replaying moves to depend on specific game. Solution: Using Command Design Pattern.

Match Move * Play() Replay() Execute() binds TicTacToeMove ChessMove GameBoard Execute() Execute() Command Design Pattern uses specification inheritance between command class and concrete command enabling new command to be added independently from the invoker.

In Delegation two objects are involved in handling a request: Delegation is a way of making composition (for example aggregation) as powerful for reuse as inheritance. In Delegation two objects are involved in handling a request: A receiving object delegates operations to its delegate. The developer can make sure that the receiving object does not allow the client to misuse the delegate object Delegate Client Receiver calls Delegates to

Delegation is used between concrete commands and receivers, and between invoker and command enabling concrete command to be dynamically created, executed and stored. Main

Encapsulation Hierarchies with the Composite Design Pattern. Definition: A software system consists of subsystems which are either other subsystems or collection of classes Composite: Subsystem (A software system consists of subsystems which consists of subsystems , which consists of subsystems, which... User Software System * Class Subsystem Children

Border layout Grid layout(3,4) Border layout

Composite Design Pattern * Component Move() Resize() Composite Move() Resize() Label Button Checkbox window Panel Main Applet

Heuristics for Selecting Design Patterns. Using key phrases in the Requirement Analysis Document (RAD) and System Design Document (SDD). Heuristics box

“Manufacturer independence” “Platform independence” Abstract factory Phrase Design Pattern “Manufacturer independence” “Platform independence” Abstract factory “Must comply with existing interface” “Must reuse existing legacy component” Adapter “Must support future protocol” Bridge “All commands should be undoable” “All transactions should be logged” Command “Must support aggregate structures” “Must allow for hierarchies of variable depth and width” Composite “Policy and mechanisms should be decoupled” “Must allow different algorithms to be interchanged at runtime.” Strategy Main

Application Framework Definition An application framework is a reusable partial application that can be specialized to produce custom applications. Frameworks are targeted to particular technologies.

Examples of application Frameworks

Enterprise application Infrastructure Middleware Enterprise application Aim to simplify software development process. Used internally within software project Used to integrate existing distributed application and components. Focus on domains such as telecommunicati-ons Support the development of end user applications. Are essential to create rapidly high quality software systems

Whitebox Rely on inheritance and dynamic building for extensibility. Existing functionality is extended by subclassing framework base classes and overriding predefined hook methods. Blackbox Support extensibility by defining interfaces for components that con be plugged into the framework. Existing functionality is reused by defining components that conform to particular interface.

Require intimate knowledge of the framework’s internal structure. Produce systems that are tightly coupled to the specific details of the framework’s inheritance hierarchies, thus change in framework require recompilation of application. Easier to use because of delegation. More difficult to develop because require definition of interfaces and hooks. Easier to extend and reconfigure dynamically.

Design patterns versus frameworks Focus on reuse of abstract designs and small collections of cooperating classes. Can be viewed more as building blocks of frameworks. Framework Focus on reuse of concrete designs, algorithms and implementations in a particular programming language. Focus on particular application domain.

Class Libraries versus Frameworks Less domain specific and provide smaller scope of reuse. eg: classes for strings, complex numbers, arrays and bitsets. Passive: don’t implement constrain the control flow. Frameworks Cooperate to provide a reusable architectural skeleton for a family of related applications. Active: control the flow of control within an application.

Components versus Frameworks Self contained instances of classes that are plugged together to form complete applications. It is a blackbox that defines a cohesive set of operations that can be used solely with knowledge of the syntax and semantics of its interfaces. Less tightly coupled and can be reused on the binary code level. Application don’t always have to be recompiled when components change. component interface provides a façade pattern for the internal class structure of the framework. Can be plugged into blackbox framework. Used to simplify the development of end user application software. Frameworks Can be used to develop components. Used to simplify the development of infrastructure and middleware software. Components are often plugged into blackbox frameworks.

Example: Framework for Building Web Applications WebBrowser StaticHTML WOAdaptor WebServer WoRequest Template WebObjectsApplication WORequest EOF RelationalDatabase

Thanks for your attention