Today I started building my first Flex application using Data Management Services … why Data Management Services I hear you thinking.
Don’t get me started on that topic ;o)
The Flex Data Management Service (FDMS) provides a mechanism to maintain data distributed over the client and server tiers.
The Service supports features such as:
- Data Synchronization
- Data Replication
- Occasionally Connected Clients
Additionally, this mechanism offers the possibility of extended functionality in a couple of areas:
- Automatic synchronization of multiple clients viewing the same accounts data via server “push”.
- Automatic re-synchronization of client and server data following a server or communications outage.
Now you know why I would choose for FDMS, indeed less work for me and less code to maintain.
The FDMS will need to communicate with my Oracle BPEL Processes which hold all the nesessary process-flow and business logic. How can I interface Flex and BPEL … well no ifficulty lies in there because every deployed BPEL Process is a Web Service so let’s start interfacing.
This also means I’m working with two IDE’s , one for the front-end and one for the back-end:
- Back-end: JDeveloper to design the bpel processes and define proxies for these processes
- Front-end: Eclipse to integrate flex and bpel processes, to define FDMS, ActionScript, mxml-files, …
So I’ve packaged my webservice proxy’s and added them on the classpath of my flex-application. Now I need to define my Assembler-class to be able to hook up the bpel processes with FDMS.
In order to integrate the prototypes client tier with the back-end server tier using Flex’s Data
Management Service mechanism, I need to implement a custom Java “Assembler” class.
The Flex Data Service instantiates the Assembler java class and invokes its methods.
To enable this, two additional things need to be done on the server side:
- The Web Service Proxy to be called needs to be included in the Flex Data Services classpath.
- The Flex Data Services configuration files need to be updated with a definition of the
Data Management Service.
For the client tier I need to define the needed ActionScript objects that will be mapped automatically to the POJO’s used in my Bpel Process (Web Service).
The only downside of this, is the need for defining this one-to-one mapping in an ActionScript object whilst in these days you would use IntroSpection to accomplish this. Now I need to duplicate the object-declaration which is already known in POJO’s as well in ActionScript-objects.
Untill now I’m defining all the needed ActionScript-objects manually, aren’t there any generators available for this monkey-task, and afterwards I can start building the UI using mxml.