Sunday, January 11, 2009

How far can you go with loosely-coupled?

When we were building the Definition-based Dynamic Engine (DDE) with EJB on IBM platform, I wanted to have a multi-layer loosely-coupling on data model, i.e. persistent data layer, processing layer, and presentation layer. Which means the data schema in the persistent data layer is independent from data container structure in processing layer, and display fields in the presentation layer.

Why is this multi-layer loosely-coupling data model important to DDE? As the Ubikwiti's dynamic business applications running on DDE are constructed from many business components which are developed ("defined") in XML files that consists of the GUI definition, business rules, business processes, business objects relationship and data format, we can't fix in design time where to store the persistent data and its schema, what information and business rules to be processed by each business component, and what to display on the screens or reports. Without this level of loosely-coupling, the business components (the LEGO blocks of Ubikwiti application) will be very rigid and limited in terms of customization and extension.

In EJB, we first tried Entity Bean, but it was only okay for persistent data management but not flexible enough to be used for process layer, and not possible for presentation layer. We then tried Service Data Object (SDO), the latest SOA related technology at that time. The concept was very promising. We first started with SDO comes with WebSphere Application Server (WAS), but changed to Tuscany SDO due to IBM SDO didn't come with good XML Data Mediators Service (DMS). 

We thought the Tuscany SDO can help us to achieve the multi-layer loosely-coupling already, but unfortunately, the data graph created from SDO is tightly-coupled with the persistent data schema. Either we were expected too much from SDO or it didn't deliver as promised.

At the end, we achieved the multi-layer loosely-coupled data model by creating our own Data Transfer Object (DTO), which became the only data container for GUI, Service Object Manager, Business Object Manager and Business Object. The Business Object is still using the Tuscany SDO for persistent data management. Each DTO is initiated in runtime and constructed the data graph(s) in it from a XSD file that defines the schema and restriction. A mapping XML file is being defined if DTO data graph transformation is required from a layer to another layer. We also serialize/de-serialize the DTO for passing the DTO between the client tier and application server tier. 

If you can understand what I explained above, you should be able to see how powerful and flexible this multi-layer loosely-coupled data model is, and how much potential the Ubikwiti Platform can be. If I didn't explain well enough and you have interest to know more, please drop me a comment.

So, how far can you go with loosely-coupled?

 

Wednesday, January 7, 2009

Declarative application development

I first heard of declarative programming was from the Workday few years back, which gave me the idea of business application can be developed without real programming.

In late 2007, I need to get my team to migrate our 10 years old full blown accounting and business management suite from PowerBuilder/Sybase to IBM technology that comply to SOA. With very limited resources, budget and short timeline, I needed to think outside the box, and the declarative programming came to my mind. I was thinking that if I can build an engine that takes in object definition files that are simple to define and instantiates from  few object classes and change their behavior according to the definition files in runtime, I can convert my 20+ business analysts and testers to become application developers. Out of sudden, my resources become double. What a brilliant thought!

I developed the first prototype in PowerBuilder and called it Definition-based Dynamic Engine (DDE), and chose XML as the definition file format. The DDE has 3 factories and their associated object classes, i.e. Business Object (BO) Factory, BO Manager Factory, Service Object (SO) Factory. It works as expected. It was not difficult to convince my boss and staff about using DDE to complete the migration job too.

With the SmartTeam, the full DDE was developed in EJB, SDO, JavaScript and AJAX that also complied to IBM SOA standard, and at the same time the PowerBuilder prototype was also being built for laptop users. The business analysts and testers were successfully converted to application developers using a new Application Development Life Cycle methodology. To help the team, we also developed a set of Do-It-Yourself (DIY) toolset such as DIY-GUI for screen and report painting and customization; DIY-Configuration for user to configure where and how each component appears and navigates in the application, and their display label in menu and sidebar; DDE Script Editor to orchestrate the components, set business rules, perform computation and so on. As all the business components were defined in XML, it can be used in both EJB and PowerBuilder environment at the same time.

We managed to "migrate" the client/server 4th GL accounting and business management suite to a web-based, on-demand, SOA compliant, EJB, declarative application running on IBM middleware in much shorter timeframe. There born the dynamic business application platform - Ubikwiti.

I then went to San Francisco for 5 months in mid 2008 looking for fund injection. There I fall in love with Apple store, iPhone, iTunes App Store, Mac OS X, Steve Jobs, Google and so on. I became a full convert from Microsoft world that with me for 17 years to Apple world. After I came back, I introduced an App Store like business component marketplace for Ubikwiti, and it is now called U-KwikShop.

So now, the Ubikwiti user can start with very simple application by choosing a closest template such as personal finance management or sole proprietor, and then add more business components from the U-KwikShop whenever the needs arrived. User can also customize the components added from the shop. I think this is the real on-demand business application, and Forrester Research called this as Dynamic Business Applications.

BTW, Jeff Nolan and some other readers like the idea too.

The Application Development Kits (ADK) is coming soon too.