Bender: The Flex to Transfer Bridge
I've been working on a bridge between Transfer ORM and Flex, and while it's not yet complete I wanted to report on my progress.
The idea of this bridge is to allow flex coders to achieve the same methodology as cf developers using Transfer. The workflow of using Bender should be like this:
- Install Transfer and Bender
- Create Transfer.xml
- Run Bender ActionScript Class Generator
- Use generated Classes as Transfer Objects in your flex code
- Use Bender.get() Bender.save() Bender.delete() Bender.list() etc throughout your flex code to persist your model to the database via transfer, or to retrieve data via transfer.
I have the actionscript generator working, although I haven't yet added all the methods I want to, such as isDirty(), isPersisted etc etc, but currently it can read your completed Transfer.xml and generate an appropriate ActionScript class for each object definition, including composite objects.
I have also written Bender.cfc which does the actual bridging. It exposes methods such as save(), get(), delete() and list() at the moment and ultimately will support all the methods on this page. Right now it works nicely, accepting structures containing the transfer data, and returns structures containing the transfer data - doing all required translation in between.
Flash remoting turns the actionscript classes into structure so this will tie in nicely - now I have to work on the actual flex component to translate the structures back into actionscript classes and we'll be laughing.
I intend to get a basic version working just managing the four basic crud methods, then I'll enhance it and add all the other stuff. If anyone has any suggestions or improvements I'd love to hear about them, and I'll be posting the code as soon as I have a working end to end version.
http://www.tobytremayne.com/trackback.cfm?CF512BA6-B8C1-E72D-10320EA0FE9C9439


There are no comments for this entry.
[Add Comment]