SourceForge.net Logo

Plugins - Programming by Contract

Plugins are standard language objects, classes and modules implementing MOF-compliant interfaces. That is, the contract is specified by MOF-compliant models which is implemented by plugins. Platform-independent plugins (PIPs) are based on the programming language and library and PIM platform only. They do not contain any component and service platform specific code. This has the following advantage:

  • The programmer does not have to learn J2EE, CORBA, etc.

  • The application-logic is implemented as native language classes and modules. The same code can be reused independent of the underlying component and service platform.

  • The deployment is a pure configuration task. No code generation require. This allows fast and reproducible roundtrips and testing.

Figure 3-5 shows how the simple client-supplier model can be used to construct complex software systems. A supplier (plugin) can in turn call zero or more other plugins. Plugins calling other suppliers are also called delegating plugins. The optimal decomposition of a complex software system into plugins and their definition is one of the most important tasks of designing openMDX applications and software engineering in general.

Figure 3-5. Programming by contract. A client calls a supplier.

Figure 3-6 shows a sample application composed of platform-independent and platform-specific plugins responsible for product, contract, cost, etc. management. Wrapper plugins wrap the functionality of existing systems and access resources such as databases. The plugins are deployed on the openMDX PIM platform which in turn is deployed on a component and service platform such as an J2EE application server or CORBA environment.

Figure 3-6. From simple plugins to complex applications.