rethinking Flex Data Management - continued
This is part 2 of the series of posts dedicated to Flex Data Management and our implementation of the functionality. In part 1 I gave a high level overview of various FDMS moving parts, their configuration and some basic client-side API. To review, a typical FDMS solution would include the following:
- Managed data - traditional RDBMS or an in-memory data store.
- ValueObject (VO) class - a class representing a row in the targeted data table.
- Data Access Object (DAO) class - a class responsible for the execution of the basic data store operations (CRUD), materialization and serialization of the value objects.
- Data assembler - an interface between FDS and the user's data management application on the server-side. Typically a class encapsulating high level operations requires by FDMS.
- Destination configuration - contains a client-side facing representation of the data assembler as well as metadata used by FDS to enable client synchronization and some additional features.
- Client-side ValueObject class - maps directly to the server-side ValueObject (2). Represents a row of managed data.
- Application specific client-side data management logic - this is the code you add to handle view updates, synchronization and conflict resolution events.
- Generic client-side logic data management logic - encapsulated in the form of the mx.data.DataService class as well as some auxiliary classes and APIs.
As you can see, FDMS is a fairly complex system with a lot of moving parts. The system is designed to provide an end-to-end data management solution with some very powerful features like multi-client synchronization, conflict resolution and support for the disconnected mode. As I mentioned in the previous post, WebORB provides a basic implementation of the Flex Data Management functionality. Since we introduced support for FDMS last year, we have been running into multiple scenarios where it was rather hard to explain and justify the benefits of the approach shown above. The resistance is mostly due to the following factors and limitations:- Significant development effort. A developer has to write a lot of supporting code: server value objects, DAOs, assemblers, port the server VOs to the client side (which may need to be done by a client-side developer). Indeed, from the list shown above, the following items are developers responsibility: 2, 3, 4, 5, 6 and 7.
- Lack of programming flexibility. We hear this one over and over. Data driven rich internet applications DO require some flexibility to create custom data management operations. Consider a scenario where a single request from a client must update multiple data stores, perform a select query, find a record and link it to some other data object. Oh, and all of this must happen in the context of the same transaction. It may be possible to achieve all this, but it is definitely not straight-forward.
- Non-expressive API. Client-side interface with the FDMS system is encapsulated mostly in the mx.data.DataService class. The class is rather compact and includes support for all basic data management operations. Since the API is centralized in a single class, it makes it less intuitive and not as expressive. It especially becomes obvious for anyone familiar with the frameworks like Ruby on Rails' ActiveRecord.
So we had an idea to make something that would nicely fit the Flex programming model, provide the same great features available in FDMS, address the problems shown above, offer the best features available in most popular data management frameworks like Rails's ActiveRecord and Hibernate and best of all be available for all server platforms and programming environments. The next post will go over what we came up with for our new data management solution for Flex. Stay tuned.
Technorati tags: WebORB, Flex, FDMS, Flex Data Management







7 Comments:
Now I am curious to see what you will come up with. I understand the underlying complexity of providing a custom FDS implementation. From a user point of view FDS is pretty straight forward to use if you understand the limitations of the data adapter you target. Writing the RailsAdapter wouldn't be the issue, it's writting all the underlying server side FDS plumbing classes. You did it for .Net so I assume that's why you realized there is an easier approach. The fact the Flex client can track all the changes to any collection and item would allow to send only deltas to the server. You could simply bypass all the FDS specific interaction and call directly your own Adapter. Then again I like to have a naive view of the world. Thanks for keeping us in the loop. I'll stay tuned.
9:11 AM
I'm interested in your solution as well. I'm going through 2 Flex books now: Flexible Rails and Training from the Source, and both are using the cumbersome method you have described.
I come from a Delphi and Access background, using these as db front-ends, and their development is VERY fast. Flex has enormous potential but the "official" way of doing this is a bit tough, especially as my data models can get quite large.
2:00 AM
I am also very interested in your solution. Any idea on when you will continue the blog on this or have a spec available?
10:18 AM
since this is a new approach and a new model on top of fds couldn't you conceivably also support java? i work in php on some projects, java in others. i'd love (from what you've said) to be able to use your new (absolutely fantastic) data management system for Flex client applications in java at work.
5:18 PM
Any timeline on when you will publish the details?
11:56 AM
I have been prototyping with Flex Data Services (now LCDS) quite a bit and could not agree with you more. It's just so complicated, with so much redundancy and cumbersome configuration.
I look forward to reading your solution.
7:08 AM
Hey Mark
thanx for a nice tip and some good piece of information
very useful blog - thanx again!
Regards
12:19 PM
Post a Comment
<< Home