MetaBoss
User Guides
Synopsis
Beginner's Guide
Configuration Guide
Design Studio Guide
Programming Model Guide
Testing Framework Guide
'How To ...' Guides
References
Synopsis
Design Model Reference
Design Model UML Profile
Test Schema Reference
MetaBoss design library
Run-time libraries API
Dev-time libraries API
HatMaker Example
Synopsis
Enterprise Model Description
Enterprise Model Reference
SystemTest Example
WebServices Example
Miscellaneous
About MetaBoss
Quality Assurance
Compatibility Notes
Acknowledgments
Glossary
Change Log
Version 1.4.0001
Built on 15 Dec 2005 22:31:47

MetaBoss Programming Model Guide.

System Componentisation.

Index

Introduction
Reasons to have yet another componentisation framework
MetaBoss componentisation description
Usage of the componentisation mechanism


Introduction

System Componentisation is a design approach where the whole system is split into many stand alone isolated components. Such a split allows us to loosen the coupling between various componentised parts of the system and therefore decrease the ripple effect of changes. Some elements of this approach are:

  • Components must have an Id unique within the scope of the system.
  • A Component must present itself to outside world via an interface. This interface lists all the operations available to outside user. Definitions of data types and exceptions used in component interface may accompany interface definition (e.g. located in the same package)
  • Client programs must have some means of obtaining "live" instance of the component at run time by specifying Component Id.
  • The Component implementor must have the freedom to alter the implementation of the component without requiring a rebuild of client programs. Note that this is only true for implementation changes. Client programs must be made aware of Component interface changes.
  • The Component deployer must have the freedom to deploy alternative implementations of the same component without redeployment of client programs.

Systems generated by MetaBoss are componentised using MetaBoss's own framework, which is built on top of the Java Naming and Directory Interface (JNDI)

Reasons to have yet another componentisation framework

Most of existing technologies offer some form of componentisation framework. In the Microsoft Windows world it's COM, DCOM ActiveX etc. In the Java world the most popular technologies are Java Beans and Enterprise Java Beans (J2EE). In addition CORBA also offers componentisation solution.

At MetaBoss, we believe that most of the known solutions do not go far enough towards having a total separation of component interface and implementation and the complete technology independence of component interface specifications. Take for example J2EE. In J2EE the component is presented by two interfaces, Home and Remote - this separation, in our view, is technology related (operations in the Home interface are run locally and operations in the Remote interface are run remotely) and is not really necesary. An Enterprise Java Bean client would be happy to lookup a EJB and execute its operations regardless of where the actual execution takes place. In fact this separation may even force client program rework if EJB developers will decide to move some operations between the Home and Remote interfaces (some performance improvement tips suggest doing just that). Another aspect of the EJB specification is that Home and Remote interfaces must extend javax.ejb.EJBHome and javax.ejb.EJBObject respectively. Operations on these interfaces are also declared to throw java.rmi.RemoteException. This also has the effect of giving technology too much prominence in the component interface, which may make it more difficult to replace J2EE with something else (e.g. RMI, CORBA, Web Services).

Contrary to what it might seem from above discussion, we actually do believe that J2EE/Java is a good platform to develop and run distributed solutions - we just think that the level it is at is too low level for componentisation. This, by the way is true for most of existing technologies.

MetaBoss componentisation description

MetaBoss componentisation is based on the Java Naming and Directory Interface (JNDI) standard mechanism and has the following features:

Usage of the componentisation mechanism

MetaBoss uses the componentisation mechanism extensively throughout all parts of the suite, which achieves high flexibility of the end product. The places most interesting to application developers are:

  • The Enterprise Services layer is componentised. Each Business Service is a component and has its own component interface. For the client systems developer it means that Enterprise Services must be looked up via JNDI as described above. For the service implementation developer it means that any number of service implementations can be developed for as long as they follow a few simple JNDI rules explained above (Implementation must implement an interface and Factory must be present). Some of these implementations are available from various MetaBoss generators:
    • The Thransaction Proxy provides J2EE style transaction management in environments without a J2EE container.
    • The Simulator Implementation is able to simulate operation outputs based on operation inputs and XML / XSL files.
    • The J2EE Distribution Proxy delegates execution of all operations to J2EE container.
  • The Domain Objects layer is componentised. Each System Domain has an entry point object called BODomain. This object is a component and can be looked up. Typically the Enterprise Service implementation developer will look up the domain entry point and navigate whole domain from this component. This involves executing JNDI lookup of the required component as described above. MetaBoss fully generates the interface and implementation of this layer from the domain model and we hope that there are few reasons to manually code or alter anything here. However, because this layer is componentised, in theory other implementations or proxies can easily be plugged in.
  • The Storage layer is componentised. Each Storage Service is a component and has its own component interface. Typically generated implementations of the Domain Objects layer will lookup Storage Services via JNDI and use them for storage operations. While MetaBoss fully generates the interface and implementation of this layer, the ability to plugin any implementation or proxy here is very important as it allows an easy switch to different make and model of the database engine, different remoting technology etc, etc, etc.
The same mechanism is also extensively used inside MetaBoss itsef. Many parts of MetaBoss (e.g code generators, code generation stylesheet etc) are components and their implementation can easlily be altered without sending "shivers" throughout the whole suite.