Sunday, March 1, 2009

Building a modular XApp with Web Services

I've recently began work on a new application using Morfik AppsBuilder 2.0. In sitting down to think about how it should work, I quickly came to the conclusion that I should actually break it down into more than one "Web Application" project.

The reason for this was that I wanted this application to publish a standard web services interface so that other systems could send it data updates directly and I wanted my own application to use the same web service entry points to do its data updates. This approach avoids redundant work in creating more than one way to update the data and helps make sure that all updates go through any validation you put in place.

This presented me with the issue of how to access the data for user display, as it seemed obvious that the actual database would reside with the "web services interface" module of the application as it was tasked with updating the data. The solution I came up with was to create an external Firebird data connector in the "user interface" module, that maps the tables from the "web services interface" module's database. This allows me to create forms and queries based on the other module's database and thus normally design the browsing interface for this Application.

The ideal solution for this scenario would have been to use the Web Services data connector and instead of an External Database connector. This would have let me concentrate all data access in the "web services interface" module and actually allowed me to have the "user interface" module build without any physical database knowledge or access. Unfortunately, though the publishing side of things for Web Service Data Sources seems to be working fine, the "client" side code seems to be broken in the Morfik FX 2.0.5.18.

The scenario which I am currently using, though not ideal as one module needs to have access to the other's database, seems to be working out quite well. I've always considered Morfik AppsBuilder a very convinient tool for quickly putting together a set of web services and my recent experiences seem to be only confirming this.

No comments:

Post a Comment