component-based software engineering - university of...
TRANSCRIPT
![Page 1: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/1.jpg)
Component-Based Software Engineering
Nick McKinneyMarch 17, 2005
![Page 2: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/2.jpg)
Overview
• What is a software component
• Modeling components
• Advantages of using components
• Component systems
• Disadvantages of using components
• Demonstration
![Page 3: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/3.jpg)
What Is a Software Component?
• “A component is a physical and replaceable part of a system that conforms to and provides the realization of a set of interfaces.” – Booch, Rumbaugh, & Jacobson
• “A component is an object in a tuxedo. That is, a piece of software that is dressed to go out and interact with the world.” – Michael Feathers, Object Mentor Inc.
![Page 4: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/4.jpg)
Properties of Components
• Highly reusable software module
• Specific purpose/responsibility
• Well-defined interfaces
• Loose coupling, and only via interfaces
• High cohesion
![Page 5: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/5.jpg)
Components vs Classes
• Classes are not necessarily components
• A component could be implemented using a class or a set of classes
• Components don’t have to be implemented using classes
![Page 6: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/6.jpg)
Modeling Components
«component»
Order«provided interfaces» OrderEntry AccountPayable
«required interfaces» Person
![Page 7: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/7.jpg)
Modeling Components
Order
OrderEntry
AccountPayable
Person
![Page 8: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/8.jpg)
Modeling Components
![Page 9: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/9.jpg)
Modeling Components
![Page 10: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/10.jpg)
Advantages
• High degree of reuse
• Helps enforce design before implementation
• Independent development/maintenance
• Interchangeability
• Allows software to be assembled
![Page 11: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/11.jpg)
Software Assembly
• Building complex systems out of prebuilt components with no extra code required
• Allows complex systems to be constructed very rapidly
• Tools are available today that allow some component assembly to be done graphically
![Page 12: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/12.jpg)
Component Generation
• Use code generators to generate components from high-level specifications
• Examples
• User interfaces
• “Boilerplate” components
• Anything that is easier to model in a non-traditional programming language
![Page 13: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/13.jpg)
Component Systems
• A standard way for components to interact with each other and the rest of the system
• Set of standard interfaces and/or conventions
• File format for packaging components
![Page 14: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/14.jpg)
Component Systems
• JavaBeans
• Component Object Model (COM)
• .NET Assembly
• UNIX pipes
• cat in.txt | sort | uniq | top -n5
![Page 15: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/15.jpg)
Component Distribution
• Statically linked with executable
• Included with operating system/environment
• Included as part of a common framework
• Bundled with applications that use them
• May have problems with conflicting versions overwriting each other on install (DLL Hell)
![Page 16: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/16.jpg)
Disadvantages
• Overhead
• Security is only as good as component model
• ActiveX components run at user’s security level
• Java and .NET components can have restricted access granted depending on how they are obtained
• Components are tied to a particular component system
![Page 17: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/17.jpg)
Component Description Problem
• It is difficult to thoroughly describe the operating characteristics of a component
• Speed, capacity, and reliability
• Depends critically on usage
• It is even more difficult to describe the characteristics of several components in series
![Page 18: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/18.jpg)
Component Description Problem
• Make generalizations about how component will be used
• Specify optimal usage patterns this component was designed for
• Include characteristic behavior under all conditions and with all input
![Page 19: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/19.jpg)
Case Study: ESCOT
• Educational Software Components of Tomorrow (ESCOT)
• Library of “µApps” focused on teaching math to middle school students
• Used a process called Component-Oriented Rapid Development (CORD) to develop their math µApps
![Page 20: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/20.jpg)
Case Study: ESCOT• Met as a group to analyze
and design µApp
• Created mock-up with paper and post-its to model how components would need to interact
• Chose JavaBeans as component system
• µApps would be distributed as applets
![Page 21: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/21.jpg)
Case Study: ESCOT
• Distributed development effort with mostly independent teams
• Used Geometer’s Sketchpad as a component generator (JavaSketchpad)
• JavaScript was used to glue components together
![Page 22: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/22.jpg)
Case Study: ESCOT
• Component-based design worked very well for distributed development effort
• Increasing levels of formality in design representations
• Prototyping is useful in resolving interoperability issues early
• Java platform idiosyncrasies increased testing time
![Page 23: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/23.jpg)
Case Study: ESCOT
http://www.escot.org/
![Page 24: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/24.jpg)
Demonstration
![Page 25: Component-Based Software Engineering - University of …people.uwplatt.edu/~yangq/CSSE411/csse411-materials/s05... · 2005-05-11 · What Is a Software Component? • “A component](https://reader034.vdocuments.us/reader034/viewer/2022042113/5e8f6be7534be04e773a0070/html5/thumbnails/25.jpg)
Questions?• Ambler, Scott. “UML 2 Component Diagram.” March 2005. <http://www.agilemodeling.com/artifacts/
componentDiagram.htm>
• Bell, Donald. “UML Basics: The Component Diagram.” December 2004. <http://www-128.ibm.com/developerworks/rational/library/dec04/bell/>
• Cox, Brad J. Superdistribution: Objects as Property on the Electronic Frontier. Reading, MA. 1996.
• Hamlet, Mason, and Woit. “Properties of Software Systems Synthesized from Components.” June 30, 2003. <http://www.cs.pdx.edu/~hamlet/lau.pdf>
• Hamlet, Mason, and Woit. “Theory of Software Reliability Based on Components.” In Proc. of 23rd International Conference on Software Engineering (ICSE’01). Toronto, Canada. May 2001.
• Ioannidou, et al. “Using Components for Rapid Distributed Software Development.” IEEE Software March/April 2001.
• Garfinkel and Mahoney. Building Cocoa Applications: A Step-by-Step Guide. O’Reilly and Associates, Sebastopol, CA. 2002.