Tuesday, February 07, 2006

Flex is not AJAX

In my experimentation with the Flex 2.0 builder BETA, I'm excited. Flex is already a very rich interface creation tool. I've barely scratched the surface in my experimentation the last couple of months, but it makes my head spin with the possibilities for rich interfaces. When the opportunity presents itself, it's going to be great to develop in Flex, and leverage the work Macromedia/Adobe is continuing to put into that. Adobe continues to innovate with ColdFusion, and the Flash Platform with Flex, and have released the ColdFusion/Flex connectivity BETA.

That being said, Flex is not AJAX -- according to Jesse James Garrett in an AJAXIAN podcast, the AJAX realm is characterized by using free and open web standards (CSS, DOM, javascript...and XMLHttpRequest / XHR object, even though it isn't a W3C standard) to communicate with the server asynchronously. This distinction makes sense after developing a bit using both Flex and AJAX. Yes, Flex and Flash have the capability to communicate between the browser and the server asynchronously, without page refreshes, as does AJAX. But Flex is a rich, proprietary tool that enables much more than what AJAX does. The statement that "Flex is not AJAX" is in no way a knock on Flex, but rather it's a qualification that Flex is a rich, proprietary tool, and therefore requires knowledge of proprietary standard based languages such as MXML and Actionscript in order to fully realize the potential of a Flex RIA.

Aside from capable, yet independent efforts like CFAjax, and AJAXcfc, Macromedia/Adobe does not have a committed company effort (that I know of) to integrating open source, client-side technologies that make up AJAX with server-side ColdFusion. I bring this up because of the tight integration between Prototype and Ruby on Rails that has seen some significant growth and high-profile applications like those pioneered by 37 signals. While ColdFusion developers can work to integrate javascript libraries like Prototype (its subset Script.aculo.us), DOJO, etc... there doesn't seem to be a move from Adobe (yet) to tightly integrate with AJAX. It is my hope that something comes out from Adobe's camp that changes this perception.

From my perspective in development, AJAX will become ubiquitous in high quality "web 2.0" applications. There will be many instances of AJAX that become commonplace in these apps that deliver a clean, rich, efficient user-experience. Supporting ColdFusion developers in giving us tightly integrated toolsets for asyncrhonous client-server features would be very helpful and help grow the user-base of the language. In no way would supplying this tight ColdFusion/AJAX integration undermine the efforts of Adobe with the Flash Platform and Flex, as that group of applications appears to be set for a different market, given the features of a Flex RIA and likewise the requirements to become proficient in the languages required to develop an RIA in Flex. However, one way or another, if web application developers who primarily develop in ColdFusion do not get on board developing AJAX applications, they will no doubt be behind the curve. It is my hope that Adobe and the ColdFusion group help us out in this regard. Perhaps their answer is related to the recently announced Eclipse AJAX Toolkit Framework.

8 comments:

Ryan Guill said...

You are definately right, flex isn't AJAX, and I am so glad of it. No, Flex doesnt exist in the relm of free and open web standards, But neither does AJAX! Anyone that has ever tried to write their own ajax call knows that you have to do something different for every browser, doesnt sound too standard to me. While Flex may be proprietary, it is at least standard, there will be documentation telling you how to do it and it is/will be the same on every platform on every browser. Thats a standard. As long as browsers are not forced to follow the so called standards set down by the w3c and all of the other groups, standards really dont mean anything.

While I think its great that people using ruby on rails can play with prototype right in their language, I believe coldfusion needs to be focused on what it is, a server sided language. Just because RoR is the new kid on the block doesn't mean we need to go emulate them.

I guess I say all of this to say, I don't agree, at all with your statement that if coldfusion developers don't get on the ajax bandwagon we are going to be left behind the curve. I think flash and flex will more than compensate for our lack of ajax skills.

JesterXL said...

Hehe, AJAX itself is behind the curve. Prototype based language? Been there. Asyncronous server-side call with no page refresh? Done that.

I'd argue if you are doing CF + Flex, you are insanely ahead of the curve.

...still, mad respect for anyone who can pull off an Enterprise level app with HTML + CSS + JavaScript.

Anonymous said...

hi,

good food for thought...thanks.

One nit: ActionSctript 3 is no longer a proprietary langage. It is an implementation of the upcoming ECMAscript standard. It is out stated intention to fully and formally standardize Actionscript on the same standard the JavaScrip is based on.

Regards,
David
Adobe

Mark Holton said...

Thanks for the comments.

There's a place for both "technologies" (in quotes b/c AJAX is not a technology, but more of a paradigm for using existing standards and JS). What I'm communicating here, is that as web developers, we are doing ourselves a favor to learn both, and utilize the tools that deliver the desired functionality the most efficiently.

Flex is a tremendous platform. It is far above what is needed to, for example, send a couple pieces of information to the server via your form and get some information back without refreshing. For these small examples, AJAX makes more sense.

There is a need for both server side interaction and client side interaction in apps. Macromedia/Adobe has my absolute respect and admiration for seeing this first, and I'm not going anywhere when it comes to Coldfusion, as it's the best server-side language there is.

As we all know, the model of building a web app that ONLY submits to the server on page refreshes is antiquated. Constant client-server refreshes that can be avoided with XHR calls used in the right place make for a more elegant, user-friendly and efficient app. There are currently two ways to accomplish this via the web, Flex/Flash or AJAX.

There's nothing wrong in my mind with skipping over AJAX and going to Flex, as you will have much more functionality at your disposal if you're proficient in MXML and Actionscript. In some cases though, simple AJAX structures are all you need.

AJAX will become more standardized, and easier to use than it is now as efforts like the AJAX Toolkit Framework come out, and independent efforts galvanize in the open-source community. Making calls cross-browser is already relatively easy with existing frameworks like Prototype, DOJO, and AJAXcfc.

ilya Devèrs said...

Why do you think it has to be an either/or situation?

You can mix and match html/css/javascript and flex in the same webapplication if you choose to. Maybe do one area of the site in one, another moduel in the other.

i am currently building applications in ruby-on-rails using ajax AND Flex 2.0. Communicating through "builder" generated xml, the ExternalInterface javascript bridge, and ordinary http posts.

This allows me to do things effectively that never have been able before.

Mark Holton said...

Thanks for the comment.

I didn't ever say, or imply, it was an "either or situation"

Again:
"What I'm communicating here, is that as web developers, we are doing ourselves a favor to learn both, and utilize the tools that deliver the desired functionality the most efficiently."

The two technologies are very different though, and make sense in somewhat different use cases.

SEO Services Consultants said...

Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck! Web Design Company

rocky case said...

Stephen Stapinski

Really your blog is very interesting.... it contains great and unique information. I enjoyed to visiting your blog. It's just amazing.... Thanks very much for the share.