R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)1 Frameworks A Brief Introduction.

Slides:



Advertisements
Similar presentations
Chapter 13 Application Framework. Outline Definition & anatomy Fulfilling the framework contract Building frameworks Examples.
Advertisements

Object-Oriented Application Frameworks Much of the cost and effort stems from the continuous re- discovery and re-invention of core concepts and components.
2 Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how statecharts can be used to describe system behaviors  Use statecharts.
Copyright W. Howden1 Lecture 6: Design Evaluation and Intro to OO Design Patterns.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
K. Stirewalt CSE 335: Software Design Outline of course topics Foundational OO concepts Synthetic concepts: –Program families, program fragments, and abstract.
Page 1 Building Reliable Component-based Systems Chapter 18 - A Framework for Integrating Business Applications Chapter 18 A Framework for Integrating.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
Object-Oriented Analysis and Design
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
Building software from reusable components.
Reuse Activities Selecting Design Patterns and Components
Distribution of Marks Internal Sessional Evaluation Assignments – 10 Quizzes – 10 Class Participation Attendence – 5 Mid – Term Test – 25 External Evaluation.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
UNIT-V The MVC architecture and Struts Framework.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
Lecture 7: Objects and Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
OO Frameworks Department of Computer Science Kent State University.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
Software Reuse Prof. Ian Sommerville
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14Slide 1 Design with Reuse l Building software from reusable components.
Introduction to Object-oriented programming and software development Lecture 1.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
MVC and MVP. References enter.html enter.html
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Software Construction Lecture 10 Frameworks
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
An Introduction to Software Architecture
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
Ch:10 Component Level Design Unit 4. What is Component? A component is a modular building block for computer software Because components reside within.
Object-Oriented Programming and the Progress ABL Tomáš Kučera Principal Solution Engineer / EMEA Power Team.
Requirements To Design--Iteratively Chapter 12 Applying UML and Patterns Craig Larman.
ISP666 MVC & Design Patterns. Outline Review Event Programming Model Model-View-Controller Revisit Simple Calculator Break Design Patterns Exercise.
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.
Patterns and Reuse. Patterns Reuse of Analysis and Design.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Chapter 6 – Architectural Design CSE-411, Dr. Shamim H Ripon.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
Frameworks & Patterns Use of Organized Classes. Frameworks vs Toolkits Framework Framework  Start with classes and interfaces that define a rudimentary.
Part VII: Design Continuous
Frameworks CompSci 230 S Software Construction.
Introducing Allors Applications, Tools & Platform.
CPSC 871 John D. McGregor Module 5 Session 1 Design Patterns.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
Nested componentization for advanced Web portal solutions Svebor Prstačić, dipl. ing., Dr. sc. Ivan Voras, Dr. sc. Mario Žagar.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 11a: Component-Level Design Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Advanced Object-Oriented Design Patterns and Architectures Part One COEN396A John Xiao
Design Patterns: Elements of Reusable Object- Orientated Software Gamma, Helm, Johnson, Vlissides Presented By: David Williams.
Introduction (Continued) Design Patterns (I) Lecture Two.
February 8, 2006copyright Thomas Pole , all rights reserved 1 Lecture 3: Reusable Software Packaging: Source Code and Text Chapter 2: Dealing.
MVC WITH CODEIGNITER Presented By Bhanu Priya.
1 Lecture 3 Major Architectural Models View (Cont’d) Architectural Models/Patterns Architecture Case Study Software Architecture & Design Pattern.
CHAPTER 3 MODELING COMPONENT-LEVEL DESIGN.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
High degree of user interaction Interactive Systems: Model View Controller Presentation-abstraction-control.
Design Patterns Source: “Design Patterns”, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides And Created.
Introduction to Design Patterns
Design Patterns.
Satisfying Open/Closed Principle
Software Quality Engineering
Starting Design: Logical Architecture and UML Package Diagrams
CSE870: Advanced Software Engineering (Frameworks, Part 2)
Dependency Inversion principle
FRAMEWORKS AND REUSE What is “Framework”?
Presentation transcript:

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)1 Frameworks A Brief Introduction

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)2 Assigned Reading Designing Reusable Classes: Johnson and Foote (JOOP88) –Original Frameworks paper –Gives guidelines for creating frameworks –Motivates frameworks See Handouts and Links web page

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)3 Framework Support reuse of detailed designs An integrated set of components: –Collaborate to provide reusable architecture for –Family of related applications

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)4 Frameworks 1.Frameworks are semi-complete applications Complete applications are developed by inheriting from, and Instantiating parameterized framework components 2.Frameworks provide domain-specific functionality Ex.: business, telecommunication, dbases, distributed, OS kernels 3.Frameworks exhibit inversion of control at run-time Framework determines which objects and methods to invoke in response to events

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)5 Class Libraries vs Frameworks vs Patterns Definition: –Class Libraries: Self-contained, Pluggable ADTs –Frameworks: Reusable, semi- complete applications –Patterns: Problem, solution, context Application Specific Logic Networking Math Dbase ADTs UI Event Loop Application Specific Logic Math ADTs Event Loop UI Networking Dbase Invokes Call Backs Class Library Architecture Framework Architecture

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)6 Component Integration in Frameworks Framework components are loosely coupled via “callbacks” Callbacks allow independently developed software to be connected together Callbacks provide a connection-point –Generic framework objects communicate with application objects –Framework provides common template methods –Application provides the variant hook methods

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)7 Patterns vs Frameworks Patterns and frameworks play complementary, cooperative roles Patterns are more abstract descriptions of frameworks –Frameworks are implemented in specific language Complex frameworks may involve dozens of patterns Patterns may document frameworks

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)8 GUI Framework Model/View/Controller (MVC): –Smalltalk-80 UI framework UI: 3 types of components: –models, views, controllers –view and controller objects interacting with model Model: application object, UI-independent View: manages region of display –Keeps it consistent with state of model –Can be nested to form complex UIs Controller: converts user events (e.g., mouse movements and key presses) into operations on its model and view –Implement scrolling and menus

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)9 Example MVC Model: FileBrowser Views: –Top subview: String that is Pattern that matches set of files (e.g., *.h) –Middle subview: displays list of files that match pattern (e.g., Node.h, Int_node.h, etc.) –Bottom Subview: displays selected file –TextView (Top and Bottom subviews) –SelectionInListView: (Middle subview) Controller: –Controller for each view –Mouse move from subview, activating different views

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)10 Variations of MVC Framework MacApp (Macintosh applications) Andrew Toolkit (CMU 88) InterViews (Stanford 89) Commercial: –zApp (OS-independent) –OpenStep (part of much bigger, comprehensive system) –Microsoft Foundation Classes

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)11 Key Principles How to develop successful patterns and frameworks 1.Separate interface from implementation 2.Determine what is Common interface and (common -> stable) Variable implementation 3.Allow substitutions for variable implementations via a common interface Dividing commonality from variability should be goal- oriented rather than exhaustive

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)12 Open/Closed Principle Determining common vs variable components is important –Insufficient variation makes it hard for users to customize framework components –Insufficient commonality makes it hard for users to understand and depend upon framework’s behavior Generally, dependency should always be in the direction of stability –Component should not depend on any component less stable than itself Open/Closed Principle: –Allows most stable components to be extensible

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)13 Open/Closed Principle Components should be: –Open for extension –Closed for modification Implications: –Abstraction is good –Inheritance and polymorphism are good –Public data members and global data are bad –Run-time type identification can be bad

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)14 Violating Open/Closed Principle Struct Shape {/*... */}; Class Square : public Shape { /*... */} Class Circle : public Shape { /*... */} void draw_square {const Square &); void draw_circle {const Circle &); void draw_shape (const Shape &shape) { switch (shape.shapeType) { case SQUARE: draw Square ((const Square &) shape); break; case CIRCLE: draw Circle ((const Square &) shape); break; // etc.

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)15 Applying Open/Closed Principle class Shape { public: virtual void draw () const = 0; }; void draw all (const Shape &shape){ shape.draw (); }

R R R CSE870: Advanced Software Engineering: Frameworks (Cheng, Sp2003)16 Observations of Frameworks Benefits of frameworks: –Enable direct reuse of code –Enable larger amounts of reuse than standalone functions or individual classes Drawbacks: –High initial learning curve Many classes, many levels of abstraction –Flow of control for reactive dispatching is non- intuitive –Verification/validation of generic components is hard