Framework is l Reusable Code, often domain specific (GUI, Net, Web, etc) l expressed as l a set of classes and l the way objects in those classes collaborate.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
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”
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Rapid software development.
General OO Concepts and Principles CSE301 University of Sunderland Harry R. Erwin, PhD.
Chapter 1 Object-Oriented System Development
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
Object Oriented System Development with VB .NET
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 8 Slide 1 Software Prototyping l Rapid software development.
Week 8 Implementation Design Alex Baker. Implementation Design System Design – Describes what the system should do Implementation Design – Describes what.
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
1 Architectural Styles SAIP 5. 2 Styles are Patterns Bigger than design patterns More abstract than reference models –domain independent –not a particular.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
Reuse Activities Selecting Design Patterns and Components
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Extreme Programming.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 8 Slide 1 Software Prototyping l Rapid software development to validate requirements l.
Introduction To System Analysis and design
OO Frameworks Department of Computer Science Kent State University.
1 Frameworks Seaside Croquet. 2 Frameworks Interface design and functional factoring constitute the key intellectual content of software and are far more.
Object Oriented Analysis and Design Introduction.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
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 8 Slide 1 Software Prototyping l Rapid software development to validate requirements.
Introduction To System Analysis and Design
CSC 211 Introduction to Design Patterns. Intro to the course Syllabus About the textbook – Read the introduction and Chapter 1 Good attendance is the.
Testing Workflow In the Unified Process and Agile/Scrum processes.
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.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
DAAD project “Joint Course on OOP using Java” On Object Oriented modeling in Java (Why & How) Ana Madevska Bogdanova Institute of informatics Faculty of.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
1 How to Design Frameworks -- Copyright 2005 by Ralph E. Johnson How to Develop Frameworks Ralph E. Johnson Dept. of Computer Science 1304 W. Springfield.
Object Oriented Software Development
CS2110: SW Development Methods Inheritance in OO and in Java Part 2: Topics: Forms of inheritance Interfaces in Java.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Software Prototyping Rapid software development to validate requirements.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Design Patterns: Elements of Reusable Object- Orientated Software Gamma, Helm, Johnson, Vlissides Presented By: David Williams.
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
1 Chapter 5:Design Patterns. 2 What are design pattern?  Schematic description of design solution to recurring problems in software design and,  Reusable.
Design Patterns Introduction “Patterns are discovered, not invented” Richard Helm.
Ivar Jacobson, Grady Booch, and James Rumbaugh The Unified Software Development Process Addison Wesley, : James Rumbaugh's OOMD 1992: Ivar Jacobson's.
 2001 Lodewijk Bergmans University of Twente Pattern Languages.
L10: Model-View-Controller General application structure. User Interface: Role, Requirements, Problems Design patterns: Model – View – Controller, Observer/Observable.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
(Further analysis and Refactoring) Larman, chapters 23 and 24 Glenn D. Blank, CSE432.
Continuous Improvement. Start Simple and Continually Improve E.g., Gmail Labels 1.
CSE 2341 Object Oriented Programming with C++ Note Set #4
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Software Development Life Cycle. The Software Life Cycle  Encompasses all activities from initial analysis until end of work  Formal process for software.
Unit - 3 OBJECT ORIENTED DESIGN PROCESS AND AXIOMS
Prototyping in the software process
Software Prototyping.
The Movement To Objects
Chapter 5:Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
About the Presentations
Component Based Software Engineering
Design Tips.
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
Presentation transcript:

Framework is l Reusable Code, often domain specific (GUI, Net, Web, etc) l expressed as l a set of classes and l the way objects in those classes collaborate.

How a Framework is Used  build application by:  Creating new subclasses  Configuring objects together  Modifying working examples  (editing scripts)

Customers are Programmers  Purpose of framework is to make it easier to build applications.  Apply these slogans to application programmers: The customer is always right. We are customer-driven. Understand your customer.

Inversion of Control  Subroutine library User's program calls reused code. User designs structure of program.  Framework Reused code calls user's program Structure of program determined primarily by reused code.

An Example: Testing Framework  Classes - Test, TestResult, TestSuite  Use by subclassing Test  Define instance methods to set up test, to perform tests  Define class methods to create a test suite

Another Example: Model/View/Controller  Classes - Model, View, Controller, ApplicationModel, ValueModel, etc.  Use by using GUI builder to make a screen; the GUI builder automatically builds an ApplicationModel and a window-spec that later gets interpreted to build a window.

2 ( “opposite” ) Approaches to Design White-box vs. Black-box White-box Customize by subclassing Emphasize inheritance Must know internals Black-box Customize by configuring Emphasize polymorphism Must know interfaces

(continued) White-box Simpler, easier to design Harder to learn, requires more programming. Black-box Complex, harder to design Easier to learn, requires less programming.

A Suggestions for Framework Design………… Don't. Buy one, instead.

Relevant Principles  Frameworks are abstractions.  You can do upstream or downstream abstraction.  people generalize from concrete examples  Designing reusable code requires iteration  Frameworks encode domain knowledge  Customer of framework is application programmerDownstreamUpstream DialogPromptForm Window

Example-driven Design  Generalization is iterative.  Most changes are small.  A few big changes represent new ways of looking at the problem. Examples Framework Generalization

To Generalize (upstream):  Look at current example --  find things with different names that are really the same,  parameterize to eliminate differences,  break large things into small things so that similar components can be found, and  categorize things that are similar.

Finding Abstract Classes  Abstract classes are discovered by generalizing from concrete classes.  To give classes a common superclass: give operations common interface move operations with same implementation to superclass make operations with different implementation abstract

(continued)  give them common interface + rename operations so classes use same names + reorder arguments, change types of arguments, etc. + refactor (split or combine) operations

Frameworks Require Iteration  Reusable code requires many iterations.  Basic law of software engineering  If it hasn't been tested, it doesn't work.  Corollary: software that hasn't been reused is not reusable.

Frameworks Encode Domain Knowledge  Frameworks solve a particular set of problems.  Not always application-domain specific, but domain specific. (GUI, distribution, structured drawing editor, business transaction processing, workflow)

Ideal Way to Develop Framework  1) Analyze problem domain Learn well-known abstractions. Collect examples of programs to be built from framework. (Minimum of 4 or 5). Analysis Design Test

Ideal Way to Design Framework  2) Design abstraction that covers examples.  3) Test framework by using it to solve the examples. Each example is a separate application. Performing a test means writing software.

Designing Abstractions  Design phase: look for commonalities, represent each idea once.  Use design patterns implies that experience is needed  Insight and ingenuity is always useful, but hard to schedule.

Design Patterns  Design patterns make designs more black- box.  Show how to represent something that changes as an object Strategy -- algorithm Prototype -- products State -- state of an object Mediator -- way objects interact

Using design patterns  Each pattern makes design more complex.  Each pattern makes design more flexible.  Do you need that flexibility?  Is the complexity worth while?  Only use a pattern when it results in a simpler design than the alternatives.

Iterative Development using multiple examples (applications)  Notice that many applications are similar.  Develop first application in that domain in an OO language.  Divide software into reusable and non- reusable parts.  Develop next application reusing as much software as possible and refine.

Surprise! Framework is not very reusable. Fix it. Develop next application reusing as much software as possible.

Summary of Process  Start with examples of desired applications  Iteratively develop abstractions  Test by building applications

Hints for Framework Design  Use object composition instead of inheritance  Incrementally apply patterns / lazy generalization  Framework should work out of the box

Strategic Concerns  Developing a framework is expensive, so look before you leap. Framework development requires long term commitment. Pick frameworks that will give you competitive advantage.

Start small and work up.  get experience with OOP  select and train good abstractors  build small frameworks first  generalize existing systems  keep user base small at first

Customers are Crucial  Get customers involved early, and use their feedback.  Make your initial customers succeed.  First set of customers are really part of the development team.

Reuse Scenarios  Actual: Projects may customize the initial framework, and start competing streams of development. Ideal: Framework grows along with customer base.

Dealing with Iteration  Don't claim framework is useful until your customers say it is.  Keep customer base small while framework is evolving.  A successful framework must evolve to meet new customer needs.  Don't constantly tinker. Plan releases and coordinate with customers.

Documentation and Training  Documentation for framework costs several times non-framework application how to use how to extend / how it works  Software must be understandable to be usable.  Improving documentation can make software more reusable.