This content has been marked as final. Show 6 replies
You cannot execute queries from Flex directly to MySQL, but you can use HTTPService to execute queries via some server side script, such as PHP. I use this method and have found HTTPService to be quite fast and efficient. FDS is not needed for this.
I also use PHP on the server-side to communicate with a database. If you use AMFPHP you can just pass objects and arrays back and forth between Flex and PHP:
FDS isn't necessary but you need something to exist between the flex "layer" and your database "layer".
As Masamune and dazweeja mentioned, PHP works great. On the two projects I'm working on now I've built a C# / ASP.Net web service that essentially sits between the database and the flex app.
ctzn99, have you tried using the free version of WebORB to send and receive AMF3 packets to/from your .Net backend?
I haven't but I'm interested in hearing from someone who has. Like AMFPHP, using WebORB to send and receive in Flex's native binary format should have quite a few advantages such as speed and less code required at both ends.
For my first app. in Flex I'm creating a standard database Contact Manager dashboard. I have found many good tutorials on populating a tree, grid, etc... from a database but all fell short of adds, removes, changes to the db. So far using AMFPHP has resulted in a pretty easy setup. I did initially use an HttpService for a Login Panel but converted that over to AMFPHP.
*Follow the docs and tutorials and it'll be no problem. Running a test Apache server with MySQL and PHPMyAdmin.
*Dashboard layout lets user select name from grid on left and populates all contact info on right side. Used this as an example layout -> http://dev.bluemethod.com/flex/InventoryExplorer/
*I will post my example when done but right now i'm too lazy to clear the database as it contains real contact data<vbg>.
**One last hint if you haven't already got it is a copy of ServiceCapture. It helps, ALOT!
"ctzn99, have you tried using the free version of WebORB "
No i haven't but, the web service that the flex application is consuming (and essentially acting as a wrapper for) is also consumed by my clients who integrate the web service functionallity into their own existing applications. So, i've already got the web service (it's the actual product) and the flex application that I'm writing is more of a showcase of whats possible for our clients, only a few of them use what we have built.
* op - sorry for the hijack