ICS 123 Components Component Models and Reuse ICS
















- Slides: 16
ICS 123 Components, Component Models and Reuse ICS 123 Richard N. Taylor and Eric M. Dashofy UC Irvine http: //www. isr. uci. edu/classes/ics 123 s 02/ * with very special thanks to David S. Rosenblum for the use of his materials. .
What Is Reuse? (I) Topic 11 Components, Component Models and Reuse ICS 123 • Develop systems of components of a reasonable size and reuse them – Further use or repeated use of a component – Adapting components for use outside their original context • Extend the idea beyond code to other development artifacts • Goals of reuse are primarily economic – Save cost/time/effort of redundant work, increase productivity – Decrease time to market – Improve systems by reusing both the artifact and the underlying engineering experience • Economic goals achieved only when units of reuse reach critical mass in size, capability and uniformity 2
What Is Reuse? (II) Topic 11 Components, Component Models and Reuse ICS 123 • Idea originally due to Doug Mc. Ilroy “Mass Produced Software Components”, 1968 NATO Conference on Software Engineering – Reusable components, component libraries • Named as a potential “silver bullet” by Fred Brooks (1987) • A lot of research interest in the 1980 s and 1990 s • Technical and managerial barriers have prevented widespread success with reuse and with reuseoriented technologies – This led Mc. Ilroy to believe he had been wrong! 3
What Is Reuse? (III) Topic 11 Components, Component Models and Reuse ICS 123 • The term reuse is a misnomer – No other engineering discipline uses the term – Systematic design and use of standard components is accepted practice in other engineering disciplines – The term will (eventually) become obsolete • The important ideas behind reuse are centered on the notion of components – Design of components for use in multiple contexts – Design of families of related components – Design of components with standardized packaging 4
Review: Architectural Components Topic 11 Components, Component Models and Reuse ICS 123 • A component is an architectural building block that is … – A unit of computation or a data store, with an interface specifying the services it provides – A unit of deployment – A unit of reuse 5
The Difference Between Components and Objects Topic 11 Components, Component Models and Reuse ICS 123 • Objects have a unique identity • Objects have a persistent state • Objects are instances of a class, with classes arranged in hierarchies according to inheritance relationships (object-oriented design and programming) – Components may contain many classes and class instances • Objects can be passed as parameters in methods • Components vary more dramatically in size 6
Component Packaging Standards Topic 11 Components, Component Models and Reuse ICS 123 • Models and tools for building, packaging and interconnecting software components • Called by many different names – – Component standards Component models Distributed component platforms … • Our focus in this course will be on the C 2 component model, although we will discuss others 7
Key Goals of a Component Standard Topic 11 Components, Component Models and Reuse ICS 123 • Language independence • Interchangeability of Components – Requires separation of interface from implementation – Requires standardized interface definition language (IDL) » Current IDLs primarily support syntactic interface specification » Limited support for specification of semantics: strong typing • Customizability of Components – Components are tailored for application use in well-defined, predetermined ways • Compositionality of Components – Easy formation of larger-grained components and whole applications 8
Important Features of Component Standards Topic 11 Components, Component Models and Reuse • Component interfaces • Metadata • Integrated development environments (IDEs) • Distributed server components 9 ICS 123
Component Interfaces Topic 11 Components, Component Models and Reuse ICS 123 • Define facilities for interoperation with other components – Properties/attributes/data members » Entities forming component state – Methods/operations/function members » Entities allowing access and changes to component state – Events » Component response to internal or external stimuli » Event consumers (other components) register their interest with a component that generates events 10
Component Metadata Topic 11 Components, Component Models and Reuse ICS 123 • Component data for the use of other components, rather than for the direct support of the component’s functionality – Class name, interface elements, resources, visual representation, etc. – Some component standards also support metaoperations • Supports discovery of a component’s capabilities, especially at runtime • Encapsulated in separate components or metaclasses • Often called “introspection” or “reflection” 11 – Introspection is a misnomer—implies component looking at itself – Reflection is a better term—externally available information reflecting internal capabilities
Integrated Development Environments (IDEs) Topic 11 Components, Component Models and Reuse • Application development based on direct ICS 123 manipulation of visually rendered components – – – 12 Drag-and-drop composition Color-coded syntax source code highlighting and checking Integrated source code editors, compilers, debuggers Class, object, component repositories Configuration management capabilities » Versions » Configurations » Teams
Distributed Server Components Topic 11 Components, Component Models and Reuse ICS 123 • Support for “enterprise-wide” distribution and management of shared multi-user applications – – – Protocols for communication with remote components Transaction services for shared data components Component and resource naming services Security services System management, monitoring, administration services • This is the focus of distributed object technology and other kinds of client/server middleware 13
Component Frameworks Topic 11 Components, Component Models and Reuse ICS 123 • Component-based implementation of an important design pattern or architectural style, tailored to specific application domain – Provides guidance for application construction – Provides base architecture that can be tailored for specific application • Well-known example: Microsoft Foundation Classes (MFC) – Implementation of Model-View-Controller (MVC) style for GUI development – Supported by powerful IDE (Visual C++/Visual J++) » Application generation » Development wizards 14
Leading Creators of Component Standards • Microsoft – – – OLE: Object Linking and Embedding COM: Component Object Model (component model underlying OLE) Active. X (enhancement and generalization of OLE) DCOM: Distributed COM SOAP: Simple Object Access Protocol (Is this a component standard? ) • Sun Microsystems – Java. Beans – Enterprise Java. Beans – Jini • Object Management Group (OMG) – OMA: Object Management Architecture – CORBA: Common Object Request Broker Architecture (part of OMA) – UML: Unified Modeling Language • World Wide Web Consortium (W 3 C) – XML (Is this a component standard? ) 15 Topic 11 Components, Component Models and Reuse ICS 123
Who Will Win? Topic 11 Components, Component Models and Reuse ICS 123 • Who knows? – Microsoft tends to win everything – But there is a lot of industry buy-in for Java and related technologies – OMG stays afloat by reacting to whatever Microsoft and Sun do • What if there isn’t a winner? – Interoperability between component standards is always possible » Bridges » Adapters » Wrappers » Etc. 16