Flex, ColdFusion 'N MySQL PureMVC Style!
You may recall my previous tutorial on flash remoting using ColdFusion to retrieve data from a MySQL database. I recently took it to the next step and have written a tutorial for fusionauthority showing how to add/update/delete data from a MySQL database using Flex and ColdFusion! More to come on that one on release…
Following completing the tutorial I decided I wanted to recreate the application using the PureMVC framework I have been raving on about recently. So here we go, all the source files for the said FlexCF PureMVC application. Its a simple app to demonstrate the framework logic and obviously I am new to PureMVC so overtime there may some refinements to made which I will aim to update you on.
You may note now I have created a RemoteDelegate class which handle all the remote calling functionality to ColdFusion and means that I can easily reuse the class in other projects which is the name of the game for MVC you tell me!!! The RemoteDelegate constructor expects 2 parameters, a responder (the calling class in this instance) and a url to the cfc. There are 2 methods, one to get all the data from the only table in the MySQL database and a callCFC() which is parsed the relevant method to call on the cfc i.e. update, add or delete.
See what you reckon and I would love to hear of any suggestions to improve!