Docsity

Understanding Software Components: Benefits, Models, and Differences with Objects, Study notes of Computer Science

Toggle sidebar
bg1
Component-based Architecture
“Buy, don’t build”
Fred Broks
1. Why use components? ........................................................ 2
2. What are software components?......................................... 2
3. Component-based Systems: A Reality!! [SEI reference] .. 4
4. Major elements of a component:......................................... 5
5. Component Architecture..................................................... 9
6. Blackbox vs. Whitebox..................................................... 11
7. Components vs. Objects.................................................... 14
8. Components in industry verses in-house solutions........... 15
9. Component disadvantages ................................................ 16
10. Component Based Development Providers ...................... 17
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Understanding Software Components: Benefits, Models, and Differences with Objects and more Study notes Computer Science in PDF only on Docsity!

Component-based Architecture

“Buy, don’t build”

    1. Why use components? Fred Broks
    1. What are software components?
    1. Component-based Systems: A Reality!! [SEI reference]
    1. Major elements of a component:.........................................
    1. Component Architecture.....................................................
    1. Blackbox vs. Whitebox.....................................................
    1. Components vs. Objects....................................................
    1. Components in industry verses in-house solutions...........
    1. Component disadvantages
    1. Component Based Development Providers

1. Why use components? - Problem with OOP:

∗ Objects are too complicated and provide too limited functionality to be useful to many clients, while components such as plug-ins provide a high-level feature that can be installed and configured by users (such as web-browser plug- ins). ∗ Objects do not allow for plug-and-play, integrating an object into a particular system may not be possible and therefore objects cannot be provided independently.

  • Composition and assembly of components can be done by a larger group of people who do not have to have the specialist skills required for component development.
  • Component-based development is a critical part of the maturing process of developing and managing distributed applications. 2. What are software components?

3. Component-based Systems: A Reality!! [SEI reference] - Component-based systems encompass both commercial- off-the-shelf (COTS) products and components acquired through other means, such as existing applications. - Developing component-based systems is becoming feasible due to the following:

ƒ the increase in the quality and variety of COTS products economic pressures to reduce system development and maintenance costs ƒ the emergence of component integration technology ƒ the increasing amount of existing software in organizations that can be reused in new systems.

  • CBSD shifts the development emphasis from programming software to composing software systems [Clements 95].

4. Major elements of a component: - Specification: It is more than just list of available operations. It describes the expected behavior of the component for specific situations, constraints the allowable states of the component, and guides the clients in appropriate interactions with the component. In some cases these descriptions may be in some formal notation. Most often they are informally defined. - One or more implementations: The component must be supported by one or more implementations. These must conform to the specification. The implementer can choose any programming language. - Component Model: o Software components exist within a defined environment, or component model. o A component model is a set of services that support the software, plus a set of rules that must be obeyed by the component in order for it to take advantage of the services. o Established component models include MS’s COM+, Sun’s Java J2EE or JEE 5, and the Object Management Group OMG’s CORBA component standard. o Each of these component models addresses the following issues:

o Once the packaged components are installed in an operational environment, they will be deployed. This occurs by creating an executable instance of a component and allowing interactions with it to occur. Note that we might have different instances of a component running on the same machine.

o J2EE uses deployment descriptors that are defined as in XML files named ejb-jar.xml. Example:

<display-name>Simple example of application</display-name> Simple example

ejb1.jar ejb2.jar

<web-uri>web.war</web-uri> <context-root>web</context-root>

ƒ Construction of the software system: The architecture specifies how the building blocks are joined together when developing an application. The architecture describes the role that the building blocks play in the system. ƒ Organisation: Components are divided in categories based on their functionality.

  • The component interface is a set of methods supported by a component, and type definitions for the data used for arguments to those methods. An interface itself is a type and can be an argument for a component method.
  • The Common Component Architecture Forum (http://www.cca-forum.org/glossary/index.html)

o An Interface Definition Language understandable to all components. Interface definitions expressed in a language allow components to find out about each other either through introspection or through consulting a repository, and give component architecture the potential to dynamically add and delete components in multi-component applications (whether this potential is actually realized or not depends on a specific implementation of the architecture). o Introspection : Inspection is the process of exposing the properties, methods, and Events that a component supports. Example: Java provides Java

provide an interface java.beans.BeanInfo to accomplish it. o A Reusable Combining Infrastructure provides the implementation necessary to link components. It contains mechanisms enabling the components to reference each other, understands the interface definition syntax and is capable of transferring data types and component references between components. o A Binding between the interface definition syntax and a language or framework of actual component implementation. o A Composition API allows the programmer to link components into multi-component applications and save those compositions. Such a mechanism could be provided for example by a GUI or a scripting language. Examples: ƒ BML (Bean Markup language) from IBM ƒ CoML: (http://www.springerlink.com/content/k4hy95n 563m8agv8/)

6. Blackbox vs. Whitebox - Abstractions and Reuse Blackbox vs. whitebox abstraction refers to the visibility of an implementation behind its interface.

implementation details that may have changed in the new release.

  • Some authors further distinguish between whiteboxes and glassboxes , where a whitebox lets you manipulate the implementation, and a glassbox merely lets you study the implementation.

7. Components vs. Objects - How does component architecture differ from object architecture? - An object is built around the following ideas: o Inheritance o Needs other objects to be (re)used properly o The interface defines only methods o Has only properties (state) and behavior. - A component differs in the following ways: o No inheritance (although the object that make up the component may inherit behavior from other objects, possibly in other components. o The component always appears as a single interface. o The interface formalizes properties, events and behavior. o Easily reused due to its well-defined interface. o Flat hierarchy: no direct dependencies on other external objects. o Guaranteed to function in any configuration. o Has the ability to describe its own interface at runtime. - List of properties contrasting Components and Objects:

9. Component disadvantages - Must upgrade configuration for next release - Business processes may have to be changed to suit software (rather than developing software to suit business processes) - Fully testing components for integration testing will be infeasible, customers may have to proceed on a most-likely will work basis (compare with applets and browsers). - Components must handle downloading and dynamic (late) integration with other components. - Reliance on vendors may make adjustments to software slower.

10. Component Based Development Providers - A number of major companies and industry consortia have proposed standards for component based development can be categorized as follows: 1. Component models ( e.g. OpenDoc, COM/ActiveX, JavaBeans) 2. Distributed architectures ( e.g. CORBA, DCOM, Java RMI). - OpenDoc. A consortium (including IBM, Apple and Novell) proposed this standard for compound documents ( e.g. a spreadsheet embedded a word processor document) and component software. This standard has failed to gain widespread acceptance. - Common Object Request Broker Architecture : CORBA ƒ The Object Management Group (OMG), a consortium of vendors of object-oriented technology, was set up with the goal of developing a common architecture for object- oriented systems: Common Object Request Broker Architecture (CORBA), ƒ CORBA supports interoperability between vendors, networks, languages, and operating systems. ƒ CORBA is a distributed object platform that extends applications over networks, languages and operating systems. ƒ The heart of CORBA is the object request broker ( ORB ) that allows a client to invoke a method of an object, regardless of where in the distributed system the object is located.

ƒ The primary advantage of using CORBA is its language and platform neutrality ( though limited to languages and platforms that have ORBs and IDL compilers available ). ƒ The primary disadvantage of CORBA is its size which is the price paid for increased flexibility and availability of a number of rarely used services. Moreover, the ORBs add considerable overheads to the system.

  • COM / ActiveX. ƒ Microsoft released the first version of Object Linking and Embedding (OLE) in 1990 as part of Windows 3.0. It was designed exclusively to support compound documents. ƒ Microsoft next developed the Component Object Model (COM) as a further step in achieving interoperability. ƒ Used in a network with a directory and additional support, COM becomes the Distributed Component Object Model (DCOM). ƒ DCOM is aimed at providing similar capabilities to those defined in CORBA. ƒ COM refers to the object model that allows communication, OLE refers to the specific application of COM technology to compound documents, and ActiveX refers to a manner of packaging COM components, enabling code to be downloaded from a Web server to run inside a

browser (the code appears as a COM object to the browser, the container). ƒ COM objects can be written in many languages, including C++, Java, Visual Basic, and more, and they can be implemented as DLLs or in their own executables, running as distinct processes. ƒ An enhanced version of COM (termed COM+) offers improved security, event handling, and communication with transaction services and databases. This is viewed as Microsoft's answer to JavaBeans.

  • JavaBeans. ƒ JavaBeans is the Sun Microsystems-IBM-Oracle approach to component software. ƒ It is an object-oriented programming interface for developing/using components that can be deployed in a network on any major operating system platform. The components (beans) must be written in Java in conjunction with a Beans Development Kit from Sun. ƒ JavaBeans API have provided a bridge to interoperate with ActiveX components, to allow JavaBeans APIs to be portable to containers including Internet Explorer, Visual Basic, Microsoft Word, Lotus Notes, etc. ƒ JavaBeans works with any network model ( i.e ., to communicate between components across the network), including CORBA and DCOM.