On 1/23/07, Steve Milburn <[EMAIL PROTECTED]> wrote:

Hi Rachel

Thanks for your reply.  I found the other article where it stated that you
must encode CF varialbes in XML. The link to the article is here:
http://www.adobe.com/devnet/coldfusion/articles/integrate_flex.html

In short, the article states "You cannot pass ColdFusion variables to Flex
applications directly. You must encode them in XML first".


This quote maybe out of context, but it simply is not true.  You can return
vars from CF to Flex via RemoteObject use.

DK


Anyway, I am working with Remote Object (as you suggested), and I am having
no problems doing what I need to do.  I just thought it was odd that I came
across 2 conflicting articles like that, and thought I was missing
something.

Thanks again.

On 1/23/07, Rachel Maxim <[EMAIL PROTECTED]> wrote:
>
>   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
> >
>
>





--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?

Reply via email to