AJAX or Flex?

It's a question that a lot of companies appear to be asking - "Should I use AJAX or Flex?" AJAX is neat - there's no doubt about it. Back in the day, some of us were doing the same things with JavaScript before Jesse James packaged it up all nice and neat and the whole world caught Web 2.0 fever. Was it cool back then? Yes, but it was also very painful. Is it cool now? Yes, but not as painful. That said, I predict that we'll see its popularity fade in years to come. Not because it's a hack or because of security concerns or because of cross-browser and slow development issues or anything like that. The world is beginning to really embrace the RIA "Experience Matters" message that Macromedia was telling everyone 6 years ago, and to create truly magnificent experiences and robust applications on the web, you must embrace the plug-in. ZDNet ran a nice, to the point article about this today (http://blogs.zdnet.com/Stewart/?p=533) and I couldn't agree with the message of the article more. AJAX is not a technology designed for the purpose of delivering RIAs - it's an attempt to achieve what RIA technologies like Flash and Flex can do without using them... and it does a fairly pathetic job at that if you compare the two side by side.

Comments
Hi Simon,
I agree with you but for some scenarios, Flex and AJAX can live together working in a perfect harmony.
AJAX as some huge limits in designing the UIs but has great advantages. Flex is great for UIs, comaptinility axross browser and OS, data mangement and so on.
The EXternalInterface class, the AJAX bridge (FABRIDGE), and the new AJAX Wrappers for Flex 3 are great tools that help developers to achive the marriage and make this communication possible.

In our company more and more often we're using the two technologies together trying to take advantage of the benefits of them.

This is our last work where we integrated Flex and AJAX : www.yubuk.com
I'm preparing a blog post about that :)
ciao

marco
# Posted By Marco Casario | 9/18/07 3:29 AM
IMO, AJAX isn't going anywhere... and if we ever manage to get some sort of native, standardized video-delivery system going, plugin-based interfaces are dead and buried. The bottom line is that developer-side plugins are actively user-hostile. They take control away from the user and her chosen environment. AJAX, for all its Javascript-reliant limitations, still works *with* the environment rather than against it.

When I right-click on an AJAX UI element, I get the context menu I wanted and expected, the one filled with the tools I need to get things done... not the one Adobe (for example) decided to give me. No matter how ornate the AJAX, a login form will still have an HTML input element named "password" that my browser's tools can autofill at my behest, unlike a Flash form. There's nothing about an AJAX interface that will stop me from using my browser's features to grab the corner of a textarea and stretching it to the size I need... not so when the form field is generated by a plugin.

The future is *more* freedom for the user, not less.
# Posted By Roger Benningfield | 9/18/07 6:16 AM
I have to admit - this is the first time I've seen plugins described in terms of freedom. I'm not quite sure I believe that. You mention that when you right click on a AJAX UI element, you get a context menu. That's true - unless the developer used JS to disable the context menu.
# Posted By Raymond Camden | 9/18/07 7:34 AM
That is an interesting stance, Roger.
I'm not sure why NOT having control over how users can probe and distort your application is a good thing? As a developer, who says that I want the end user to have "more freedom"? I don't want them to resize anything unless I explicitly allow them to - nor do I typically want them to be able to view source, etc. I like distributing compiled binaries who's behavior and security are predictable for 100% of the people who use them.
I do agree that some tighter integration between the Flash Player and the browser and that better integration with screen readers would both be nice, and I believe that will change in future versions... perhaps via native support like what's proposed in the Tamarin project (http://www.mozilla.org/projects/tamarin/).
The bottom line though is that I see plug-ins as being the technology that gives developers more freedom and more control - so that we can make our applications whatever we want them to be for the end-user which, ultimately, means a better user experience for all.
# Posted By Simon Horwith | 9/18/07 7:53 AM
There was an interesting blog post by Ted Patrick some time ago about Ajax and Flex sort of centered around Yahoo Maps and their decision to use Flex-Flash for that.

Here is that post, it's worth taking the time to read it if you have not already.

http://www.onflex.org/ted/2006/09/ajax-vs-flash-in...
# Posted By Mike Brunt | 9/18/07 11:50 AM
While AJAX may work with the environment instead of against it, that isn't necessarily a good thing. The environment of HTML, server-side CGI, JavaScript, etc is a particularly poor one for application development - it's a collection of hacks bound together in the least elegant manner possible. HTML applications are a hack, and AJAX applications are a hack on top of a hack.

While you can use context menus, etc, from within AJAX applications, the fact that you need to step outside of the application to get functionality is a flaw in the application environment.

I eagerly await the demise of these awful hacks, just as I have been doing since 1994 or so.

Dave Watts, CTO, Fig Leaf Software
# Posted By Dave Watts | 9/18/07 1:08 PM
I almost always hate flash apps for the reasons listed above. No right click to open in a new tab? So slow and annoying usually. For example, the really awful CF/Macromedia/adobe/whatever code snippet library they brought out before. Do a search, want to open one in a new tab to check it out - oops, can't. Have to load every one in the same window. Horrendously bad app only because it used flash.
# Posted By ziggy | 9/18/07 11:55 PM
>>You mention that when you right click on a AJAX UI element, you get a context menu. That's true - unless the developer used JS to disable the context menu.

Obviously that's the exception rather than the rule, whereas in flash it is the rule rather than the exception.
# Posted By ziggy | 9/18/07 11:58 PM
I disagree. Flash might be nice, but it's never been *seamless*. I'd rather use an AJAX application then a flash one any day, and for anything that doesn't really require graphing capability, moving around blocks of HTML is going to be easier to develop, and use, then anything done in flash.
# Posted By Chad Okere | 10/17/07 11:03 PM
Chad (and to some extent Ziggy):

I agree that Flash (as a development tool/environment) is silly, at best. We are here talking about Flex, though, which is *completely* different, and the underlying language, ActionScript 3.0, is pretty powerful.

Well, you could always use haXe for your core logic and compile into AS 3.0 or JS :-)
# Posted By David Bergman | 2/1/08 6:31 PM
My favorite is FLEX! thanks for the usefully informations
# Posted By Werbeagentur Mönchengladbach | 2/2/08 9:12 PM
I disagree. Flash might be nice, but it's never been *seamless*. I'd rather use an AJAX application then a flash one any day, and for anything that doesn't really require graphing capability, moving around blocks of HTML is going to be easier to develop, and use, then anything done in flash.
# Posted By MARY | 8/9/08 11:12 AM
it's a collection of hacks bound together in the least elegant manner possible. HTML applications are a hack, and AJAX applications are a hack on top of a hack.

I find the website laptop batteries,laptop AC adapters. All our products are brand new, with the excellent service from our laptop battery http://www.batterylaptoppower.com of customer service team.
the most convenient and cheap replacement battery online shop in uk. We specialize in http://www.batteryfast.com laptop batteries,laptop AC adapters. All our products are brand new, with the excellent service from our customer service team.
the most convenient and cheap replacement battery online shop in uk. We specialize in laptop batteries http://www.batteryfast.co.uk ,laptop AC adapters. All of batteries are brand new, with the excellent service from our customer service team, you can feel free to purchase on laptop battery!
Here is cheap laptop ac adapter online shop in uk. We specialize in http://www.adaperlist.com laptop AC adapters. All our products are brand new, with the excellent service from our customer service team.
# Posted By sam | 9/24/08 10:46 AM
but not as painful. That said, I predict that we'll see its popularity fade in years to come. Not because it's a hack or because of security concerns or because of cross-browser and slow development issues or anything like that. The world is beginning to really embrace the RIA "Experience Matters" message that Macromedia was telling everyone 6 years ago, and to create truly magnificent experiences and robust applications on the web, you must embrace the plug-in. ZDNet ran a nice, to the point article about this today (http://blogs.zdnet.com/Stewart/?p=533) and I couldn't agree with the message of the article more. AJAX is not a technology designed for the purpose of delivering RIAs - it's an attempt to achieve what RIA technologies like Flash and Flex can do without using them... and it does a fairly pathetic job at that if you compare the two side by side. http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY NP-FH70 NP-FH90 NP-FH100 DCR-DVD106 ,
http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY NP-FH70 NP-FH90 NP-FH100 DCR-DVD106 ,
http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY NP-FP30 NP-FP50 NP-FP60 NP-FP70 ,
http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY HDR-HC3 NP-FP30 NP-FP50 NP-FP60 ,
http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY NP-FP71 NP-FP90 NP-FP91 DCR-30 DCR-DVD ,
http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY NP-FP70 NP-FP71 NP-FP90 NP-FP91 ,

http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY NP-FA50 DCR-PC53 DCR-PC53E DCR-PC55 ,
http://www.batterylaptoppower.com/camcorder-batter... Brand new Li-Ion Battery NP-FA70 for SONY ,
http://www.batterylaptoppower.com/camcorder-batter... ATTERY FOR SONY NP-FF51 NP-FF50 DCR-IP220 IP7 ,
http://www.batterylaptoppower.com/camcorder-batter... NP-FM50 Battery for Sony Mavica MVC-CD200 CD250 CD350 ,
http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY NP-FM50 MAVICA MVC-CD250 MVC-CD300 ,
http://www.batterylaptoppower.com/camcorder-batter... NP-QM91 NPFM91 FM-91 FOR SONY MVC-CD20 CD250 BATTERY ,

http://www.batterylaptoppower.com/camcorder-batter... BATTERY NP-QM91 NPFM91 FM-91 FOR SONY MVC-CD20 CD250 ,
http://www.batterylaptoppower.com/camcorder-batter... Battery for SONY NP-F330 NP-F550 NP-F570 NP-F750 ,
http://www.batterylaptoppower.com/camcorder-batter... BATTERY FOR SONY NP-F330 NP-F550/F750/F930/F950 ,
http://www.batterylaptoppower.com/camcorder-batter... BATTERY FOR SONY NP-F550 MAVICA DIGITAL CAMERA NP-F330 ,
http://www.batterylaptoppower.com/camcorder-batter... BRAND NEW AC Power Adapter for JVC LY20848-001B BN-V107 ,
http://www.batterylaptoppower.com/camcorder-batter... BRAND NEW AC Power Adapter for JVC LY20848-002B BN-V114 ,
# Posted By Sean | 9/30/08 9:46 AM
This site is hosted by HostMySite and runs off of BlogCFC - thanks, Ray.