This content has been marked as final. Show 2 replies
Flex does not require the use of Cold Fusion to access a MS SQL database. You can use .NET, for example, to retrieve the data for Flex. I've also used PHP/MySQL. Never used CF with Flex, and haven't found any need to. Flex doesn't know or care where your data come from. It is completely data agnostic.
Having said that, Adobe has set up CF so that you can use remoting with it and Flex. Is this what you are trying to do?
"Laurence MacNeill" <email@example.com> wrote in message
> Ok. Someone please 'splain to me why I must use ColdFusion to access MS
> data in Flex? And how? I just don't understand exactly why CF is needed.
> can't a Flex app simply open an SQL database file? Take, for example, an
> written in, say, Perl. It simply opens the file and reads it -- why can't
> do that? Why so many layers of complexity? I really don't understand why
> there are so many (seemingly unnecessary) layers of overly complex
> software to
> do something that really should be so simple...
I think you're misunderstanding what happens with a normal backend page,
whether it be cgi, asp, or coldfusion, retrieves data and presents it to the
In a nutshell, here is what happens:
1) Client (browser) contacts server with a request.
2) Server calls up back end technology
3) Back end technology establishes connection with database. It can do
this, because it is on the server where the database lives, or has a direct
network connection to that database.
4) Back end technology queries database, receives a result.
5) Back end technology formats result for client
6) Client (browser) turns formatted result into something humans can read
(if the developer has done her job right).
When a browser is involved, each time you want something from the database,
you have to redraw the entire interface (page refresh). There are ways to
avoid this, but if you think Flex is complex, you'll run screaming from
What Flex is is essentially a second client that sits inside the browser
which can communicate with the back end technology without having to refresh
the page. This means that the user isn't constantly being interrupted by
total redraws while he is trying to work. It also offers additional
capabilities that aren't relevant to this discussion, such as animations and
> And secondly, assuming all these layers of complexity really are needed,
> exactly how does CF suddenly, magically enable my Flex app to read an SQL
> database? I'd really like some example code here -- what specific code do
> need to write in my Flex app to get it to use CF's SQL data-source? (I'm
> assuming that in the CF's 'Admin -> Data & Services -> Data Sources'
> configuration page, I add a new data source, and then somehow my Flex app
> magically connected to that source, yes?) But I'm just not seeing where
> connection is, or how I can use it...
I'm not much on ColdFusion, but I think that once you have that data source
configured, you'll need to still write cfqueries on it and return the
results as XML or typed objects.
I have a question for you... This is not meant to be derogatory in any way,
but more curious. How did you get tasked to do something that you don't
have enough understanding to even know where you'd begin to start on it?