Monday, January 23, 2006

Essence Pattern

My Blog readers would know that for past 4 months I have been working as a professional Software Developer.
Recently we came across a tricky situation. Let me explain the scenario first.

We make use of IBM’s Insurance Application Architecture (IAA). Not many people have heard of IAA. Briefly, IBM Insurance Application Architecture includes a business model; a design model of components, interfaces and messages; a generic design framework for product definition and agreement administration; and design models for the creation of data warehouses. Integrates with legacy systems from different platforms to leverage your previous investments and is compatible with widely-used design tools and methodologies, supporting open standards-based technologies.
In our project, the Business Process Components make call to business components which are part of the IAA solution.
The parameters required on individual BPC/BC are passed in main calling BPC operation. This results in the calling BPC operation becoming too parameter specific.
Design Requirement:
Cannot View one BPC operation requirement from another.
Need to populate required parameters independently.

In simple terms, we cannot change the IAA method signature, so we need to pass in the parameters in some other way.
Here in comes the Essence Pattern: The Required parameters at various component levels need to be pushed as attributes on calling BPC. i.e. using Essence Pattern.

Essentially the Essence Pattern provides a way to enforce users of an object to enter valid properties for that object. We can use for our purpose by tweaking it a bit and verifying that only the appropriate parameters are passed to the Business Components and the other parameters are pushed as attributes.

There are some advantages and disadvantages to be had from this:
1) Main BPC operation will not be parameter specific
2) Can expose multiple output parameters
1) Client Creation of object out of design control
2) Cannot Enforce Compulsory/Optional attributes on class
3) Also order of attribute execution

In the present scenario it solves our purpose and provides an elegant solution. This was my first design pattern implementation at the company. I have done quite a few for my personal projects, but never before at the company level. And tell you what I enjoyed every bit of it.

For your reference:
Essence Pattern Paper:

Essence Pattern C# Implementation:

No comments:

Post a Comment