Steve, The type of data you use with Flex and CF really are best determined by the data you have and the scope of your project, but you don't have to use XML. I'd imagine the article you read is either outdated or perhaps was not very clear in its meaning.
I haven't personally tried calling a CFM page from Flex, I use CFCs and they work great. If what you read says that you can only use a CFM page for XML, it's probably because a CFM page doesn't "return" any data type; but you could use Flex to "load" a CFM page that is dynamically generated XML via HTTP service. To be honest, it's still probably easier to use a CFC than to load a CFM page! If you are using CF on the back end, then Remote Objects with AMF are the easiest way to go, and fast performance-wise. To do this, you use <mx:RemoteObject> with the destination set to "ColdFusion" and the CFC and method you wish to call as attributes. If you need to interface with another app server, then Web Services would be ideal. You don't have to convert CFC or web services results, etc into XML for Flex to understand them. Flex does a pretty good job with that natively. HTH Rachel Maxim On 1/22/07, Steve Milburn <[EMAIL PROTECTED]> wrote:
Hello all. I am very new to Flex so forgive me for the newby questions. I have been reading about Flex Data Services, Web Services, etc and working through some examples from Adobe. My question is when is it necessary to return the data in XML and when is it ok to return other datatypes? If you read in this article by Ben Forta, it states "To make the integration as simple as possible, data types are preserved and automatically converted to their appropriate equivalent types. If ColdFusion returns a string, Flash receives a string; if ColdFusion returns a query, Flash receives an ArrayCollection, and so on." OK, simple enough. I have worked through examples that do just that. However, in another article on Adobe's web site (which I cannot locate now for the life of me), it stated that Flex only understands XML. The example on that page illustrated Flex calling a .cfm template, while the other examples are calling .cfc components. Is that the difference? When Flex calls a .cfm, it must receive XML? And when it calls cfc functions it can recieve other data types? Any clarification on this is appreciated. Steve

