Gopalan Suresh Raj
Writing distributed enterprise applications has always been a significant challenge, but this once Herculean task has been somewhat ameliorated with the advancement of component-based programming in general. For example, by increasing program modularity, you can now compose a behemoth application from multiple functionally independent modules. This not only enables you to assemble complex systems using an assembly-line approach, but also greatly increases the reusability of the modules themselves.
Although using components enhances the modularity and natural distribution of applications in general, they still present some interesting challenges. For example, in days of old, when a monolithic program failed, it was simply restarted as a unit. But, today, with a modular system, when a failure of any one component occurs, the challenge is to ensure faults are isolated to limit their propagation and that it does not corrupt others. This is more complicated than it sounds with distributed applications, however, as the components can reside anywhere on the network. In addition, because enterprises are essentially heterogeneous environments, the presence of multiple operating systems and platforms that host the different components adds a new level of complexity.
Clearly, a technology like COM+, with its promise of language independance can significantly mitigate many of the problems associated with enterprise distributed systems development. These articles are devoted to understanding the implications and architecture of an enabling enterprise component technology COM+ and presents examples of how to use this technology to implement real-life, distributed solutions.
What is COM+
COM is a specification and a set of services that allows you to create modular, object-oriented, customizable and upgradeable, distributed applications using a number of programming languages.
COM is mainly used for a couple of things:
1. As a glue that helps compose entire applications by tying together multiple individual components.
2. As a standard mechanism for inter-process or inter-host communication.
COM+ is the basic COM and a set of additional services like Transactions, Queued Components (QC), Security, Loosely Coupled Events (LCE), Just In Time Activation (JITA), Basic Interception Services, Object Pooling, Deployment and Administration.
COM+ Programming is based on the following assumptions:
1. COM+ Programming is Interface Programming. This means that clients program on the basis of Interfaces not Classes.
2. Code is not statically linked but is loaded at runtime as and when required.
3. Component implementors specify their requirements declaratively and the framework ensures that these requirements are met as in an MTS or a COM+ system.
Why Use COM+?
In applications like Microsofts Visual Basic, a property window exists, which can be used as a simple, code-free means of programming various objects that are part of an application. Similarly, Sybases PowerBuilder, has a data window, which allows a code-free means of programming data access to database applications. COM+ brings a similar concept to building enterprise applications. Users can now focus on developing business logic with ease, while being shielded from the nitty-gritty aspects of enterprise application development through the use of COM+ components.
In an n-tier architecture, it does not matter where the business logic is, though in a typical 3-tier architecture, the business logic is normally in the middle-tier by convention. With COM+, however, you can now move your business logic wherever you want, while adding additional tiers if necessary. The COM+ components containing the business logic are platform-independent and can be moved to a different, more scalable platform should the need arise. If you are hosting a mission-critical application and need to move your COM+ components from one platform to the other, you can do it without any change in the business-logic code. A major highlight of the COM+ specification is the support for ready-made components. This enables you to "plug and work" with off-the-shelf components without having to develop or test them or to have any knowledge of their inner workings.
The COM+ Component Development and
In any enterprise development scenario, numerous complex programming issues are usually involved, which require the involvement of multiple domain experts. Without addressing all these issues and cohesive team-oriented approaches, it is impossible to create successful enterprise applications. To ease enterprise development, responsibilities as to who is responsible for delivering what in an enterprise application that uses COM+ has to be determined, as shown in Figure. Note, this does not necessarily preclude the same person from carrying out more than one function.
Figure: The COM+ Component Development Lifecycle
The COM+ Platform Provider
The COM+ Platform provider provides an organized application framework in which to run the COM+ containers. The vendor i.e. Microsoft, implements and provides access to a compatible naming service (i.e., ADSI) and a transaction service (i.e., MSDTC). Note, the COM+ Platform vendor might also act as the COM+ Surrogate Process and Interception Services vendor.
COM+ Surrogate Process Provider
The COM+ Surrogate Process and Interception Services provider provides software to install a COM+ component with its supporting classes on a COM+ Platform. This vendor is also responsible for providing run-time classes that provide the required services to the COM+ instances. It also has to make available a suitable interception service for the COM+ component.
COM+ Component Developer
The COM+ Component developer should have knowledge not only of the COM specification, but also business needs because she or he is responsible for coding the business logic into components. Basically, the developer implements COM+ components that focus on the business logic using the classes and interfaces defined in the COM specification.
While the COM+ container is responsible for handling all the transaction controls on behalf of the component instance, the COM+ developer must understand how transactions work. Consequently, the developer is responsible for stipulating the transactional needs of the various methods in the COM+ component to the COM+ Component deployer.
COM+ Component Deployer
Although the COM+ Component deployer may not be a COM developer or understand the business rules a component implements, he or she should understand the Server application framework (Windows 2000/NT/9x) in which the component runs. Additionally, the deployer should have an in-depth understanding of the characteristics of the run-time server environment, such as database types, its location, and so forth. The deployer is responsible for taking the COM+ component and all its supporting classes and installing them correctly on the COM+ server platform.
The deployer gets the component requirements from the COM+ component developer, such as transactional needs, names, and descriptions of the required environment properties, and so forth. The deployer is responsible for making these properties, along with their correct run-time values, available to the COM+ component at runtime. The deployer and the developer must communicate clearly to ensure the component is deployed with the correct deployment attributes.
The application developer writes the client applications using pre-built COM+ components. Here, a client is defined generally and can be an application, or even an ActiveX control.
The application developer can thus plug-in ready-made COM+ components without having to develop or test them, or without having any internal knowledge of how to integrate them. This frees the application developer to concentrate on high-level functionality, such as data presentation, without having to worry about how such data is actually obtained.
Having said that, how do we ensure that the Application Developer knows how to use a COM+ component if it was not developed by him. Therefore, we need a mechanism to inform the user of our COM+ component on how to use it which will be the topic of our discussion in the next section "Interface, Implementation and COM+ Notation".
|click here to go
My Basic COM+ Tutorial...
|click here to go
My Advanced COM+/DNA Tutorial HomePage...
|About the Author...|
|Gopalan Suresh Raj is a Software Architect, Developer and an active Author. He is contributing author to a couple of books "Enterprise Java Computing-Applications and Architecture" and "The Awesome Power of JavaBeans". His expertise spans enterprise component architectures and distributed object computing. Visit him at his Web Cornucopia© site (http://www.execpc.com/~gopalan) or mail him at email@example.com.|
This site was developed and is maintained by Gopalan Suresh Raj
This page has been visited times since March 13,1999.
Last Updated : Mar 14,'99
All products and companies mentioned at this site are trademarks of their respective owners.