This content has been marked as final. Show 3 replies
We are using SQLServer without XML with no problem. The way we have it set up is creating a bunch of java classes through sql2java and then a bunch of mirrored action script beans on the flex end and wrap it all up in a WAR on JBoss. The Flex then calls the sql2java managers as RemoteObjects to retrieve data. Doesn't exactly fit the MVC model (in fact, it doesn't fit it at all), but has worked quite well for us. So, in other words, yes it is possible.
However, you stated you are a CF shop, so you probably don't want to throw all that away and doing J2EE programming. There should be plenty examples on how to use RemoteObjects to retrieve data from a database using CF. Peter Ent I believe as a example on his blog:
I think if you just google "Flex 2 RemoteObject CF database" you should get plenty of examples.
You don't need to convert your cfquery objects to XML, just create a CFC that returns a query then invoke that as a RemoteObject in Flex. The query gets automagically translated into an ArrayList. It's a beautiful thing. Easier than using HTTPService or WebService and faster too. I recommend this tutorial to get you started.
Hope this helps.
You'll need to upgrade your CF server to 7.0.2 to take advantage of the the latest version of Flash remoting for RemoteObjects. Also, if you are running sites with IIS you'll need to set up virtual directories for JRunScript and CFIDE.