Component-Based Software Engineering

Reading:
http://www.components-online.com/Component/Introduction/default.htm


Overview

What is a component?

What is a component-based system?

Is component-based software engineering unique?

Typical component technologies

Emerging technologies

Problems in CBSE


What is a component?

Again, a too-common, multiple-meaning word

Already used to talk about functions, objects, source files, etc.

Stevens and Pooley: "A component may be a module with properties that make it reusable and replaceable." (Ch1)

Booch: "A component is a physical and replaceable part of a system that conforms to, and provides the realization of, a set of interfaces." (quoted in our textbook, Ch18)

Clements Szyperski: A unit of deployment, binary, stateless, singleton

Article thread between Meyer and Szyperski:
http://www.sdmagazine.com/documents/s=752/sdm9911k/9911k.htm
http://www.sdmagazine.com/documents/s=747/sdm0002l/0002l.htm
http://www.sdmagazine.com/documents/s=746/sdm0003k/0003k.htm
http://www.sdmagazine.com/documents/s=744/sdm0005l/0005l.htm

Meyer: "Seven Criteria for Components: (from http://www.sdmagazine.com/documents/s=746/sdm0003k/0003k.htm

  1. May be used by other software elements (clients).
  2. May be used by clients without the intervention of the component's developers.
  3. Includes a specification of all dependencies (hardware and software platform, versions, other components).
  4. Includes a precise specification of the functionalities it offers.
  5. Is usable on the sole basis of that specification.
  6. Is composable with other components.
  7. Can be integrated into a system quickly and smoothly."

BTW, You could not go wrong reading Bertrand Meyer's Object Oriented Software Construction. See some comments at http://archive.eiffel.com/doc/oosc/page.html

Heineman and Council:

Important aspects of a component:

Q: Can you have build-time components and not deployment-time components? (The class voted about 50-50 on this one. My (JC) preference is, in the context of CBSE, reserve the word component for (build+deploy+run)-time entities, and not just build-time entities.)


What is a component-based system?

A system built with components?

A set of interacting components using an infrastructure possibly including non-component glue code, which embody the application behavior.

Infrastructure: some underlying technological framework that defines how components interact, and supports that interaction. Generally called middleware.

Glue code: code that enables components with mismatched interfaces to interoperate, and that may perform minor application computations itself to augment or better utilize component behaviors.


Is component-based software engineering unique?

Yes: it adds new and important steps in the development process.

No: we've been doing those for years, anyways.

Maybe: these steps become the most important rather than minor steps.

Steps in CBSE:

  1. Look for subsets of requirements likely to be provided for by a component.
  2. Look for subsets of design likely to be provided for by a component.
  3. Search for components that fulfill needs.
  4. Select components (possibly with a small set of alternates) that you will use.
  5. Sign legal agreements with component providers.
  6. Understand selected components in detail. (learn/discover interface)
  7. Possibly test components to ensure satisfactory performance.
  8. Build new components as needed.
  9. Find mismatches between components. (adaptation)
  10. Write glue code to patch mismatches and add features.
  11. Test composed system (and subsystem compositions)
  12. Configure deployable components and system
  13. Maintenance: keep up with component changes (changes may not come on your schedule. Or be coordinated.
  14. Review new version of component.
  15. Find upgrade dependencies.
  16. Modify glue code if necessary.
  17. Test new versions in house.
  18. Deploy matched sets of component versions.

Typical component technologies

Often see layered technology specifications.

Domain-specific interfaces
Interface standards
Interface specification
Interaction and Deployment

Bottom layer is often dynamic link libraries (shared libraries) in C/C++/compiled environments, and Java class loading in Java-based environments. (Yes there are plenty of other environments but these two cover ALOT!). If distributed interaction is supported then some messaging over TCP/IP is generally the rule.

Browser Plugins -- essentially a C API? Find out at http://devedge.netscape.com/library/manuals/2002/plugin/1.0/

Eclipse Plugins -- essentially a Java API? Find out at http://www.eclipse.org/documentation/html/ and you can Look here for detailed stuff

COM/DCOM: Microsoft's Component Object Model

OLE, ActiveX, VBX - built on top of COM

CORBA - Common Object Request Broker Architecture. Find more at http://www.omg.org/

JavaBeans

Enterprise Java Beans

Commentary on Relationship Between JavaBeans and EJB

*Note: Java Beans also provide/require persistence.

Java Bean Tutorial

A Bean Example (from java.sun.com)

Introspector doesn't depend on a bean subclassing off an abstract bean class; bean-ness is largely a matter of either (a) following naming conventions (such as get/set for properties) with some assumed or required semantics, or (b) providing a supporting BeanInfo class to customize the introspection.
   try {
        BeanInfo bi = Introspector.getBeanInfo(MyBean.class);
        PropertyDescriptor[] pds = bi.getPropertyDescriptors();
        for (int i=0; i<pds.length; i++) {
            // Get property name
            String propName = pds[i].getName();
        }
        // class, prop1, prop2, PROP3
    } catch (java.beans.IntrospectionException e) {
    }
    
    public class MyBean {
        // Property prop1
        public String getProp1() {
            return null;
        }
        public void setProp1(String s) {
        }
    
        // Property prop2
        public int getProp2() {
            return 0;
        }
        public void setProp2(int i) {
        }
    
        // Property PROP
        public byte[] getPROP3() {
            return null;
        }
        public void setPROP3(byte[] bytes) {
        }
    }

SOAP

.NET

Web Services - Web component interaction and composition architecture. Find more at http://www.w3.org/, and a quick link to the architecture description is at http://www.w3.org/TR/2003/WD-ws-arch-20030808/


Problems in CBSE

Naming dependence -- we're still stuck with exporting names and using specific names

Still no semantics associated with interfaces. Not even simple preconditions and postconditions

What about versions?


Emerging technologies

Semantic Web ( http://www.w3c.org/2001/sw/)

No real attempts to migrate ADL's to CBSE?

Component Certification (a la UL)?