Flex vs. Ajax: Which is Better? Check this out

I knew this was coming down the pike and sure enough, I saw a posting today that outlines several other articles comparing Flex vs Ajax.

TechPoint - Flex Vs Ajax - Which one is better and why?

So which is better? Why?

I think Flex is an awesome development tool for controlled environments such as corporate applications where hardware and operating system requirements are specifically defined whereas Ajax is the sure winner for Internet-based RIAs.

Opinions?

Enjoy.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Richard Leggett's Gravatar I'm sorry? Flex does not rely on the browser's specific functionality to behave the same across platforms whereas AJAX is entirely dependent on having the platform clearly defined and takes many many more man hours to make sure it does work in various environments that you simply do not have to consider with Flex, I think you may have mixed up Flex with AJAX in that last statement.
# Posted By Richard Leggett | 9/1/06 10:37 AM
Rey Bango's Gravatar Hi Richard. Nope, I didn't get it mixed up. If you're working on an application that needs to work in lower bandwidth situations, such as Internet-based RIAs, then Ajax is the better choice IMO. Most decent Ajax/UI toolkits accomodate for the browser compatibility issues quite effectively. Also, Flex 2 requires Flash 9 to work correctly and if I'm correct, Flash 9 has nowhere near the penetration that previous versions of Flash do.

Now, perhaps I'm wrong on this but I believe that Flex 2 applications also tend to generate large .swf files which again, isn't something thats conducive to strong performance on the "Internet". Hence my opinion that Flex 2 applications are better suited towards corporate environments where things such as hardware, operating system, and bandwidth requirements are easier controlled. I've spoken to several colleagues, some part of Team Macromedia, which share this same opinion.

But you are absolutely correct that Flex does have a major advantage in platform compatibility and with the new release of native Flash 9 for Linux, its only getting better.
# Posted By Rey Bango | 9/1/06 12:26 PM
Ben's Gravatar "Flash 9 has nowhere near the penetration that previous versions of Flash do"

Well its only been out for ~2 months, give it some time. Flash Player adoption is exponentially faster and easier than browser adoption. Ajax is well suited to small usability enhancements like sortable tables and dynamically populated dropdowns, but not so good for apps as a whole. How many nice, full-on Ajax applications are out there that weren't made by Google or Zoho? Not many, and that is because its hard and the code is hideous.
# Posted By Ben | 9/1/06 2:34 PM
Rey Bango's Gravatar Hi Ben, first let me say that I definitely see Flex's potential. I don't want that to be mistaken but I also have my own views on where its potential is best suited.

Now, according to Adobe's own stats, Flash 5 still leads the versions in terms of mature markets and in terms of development, the Flash developers that I know still use Flash 7 as the baseline even though Flash 8 has been out for over 9 months. At the pace its going, it would reach a similar penetration levels in about a total of 12 months. So that means that we would have to wait 10 months in order to be able to develop a Flex 2 app that would be usable on the web and then only if the user using the site was forced to upgrade to a new flash player? This is where I think Ajax has the advantage in terms of "Internet-centric" RIAs. It doesn't need any special players to be downloaded and is able to run on almost all browsers.

In terms of how many "nice, full-on Ajax applications are out there", here's some more to add to your list:

http://www.yahoo.com/ (their new home page)
http://get.live.com/ (Microsoft's Live initiative)
http://www.flickr.com/
http://www.37signals.com/ - Basecamp, Campfire, Backpack, et al
http://www.netvibes.com/
http://www.riya.com/
http://www.3bubbles.com/
http://www.scrapblog.com/

All these are pretty good examples of what can be done with Ajax.



and the list goes on.
# Posted By Rey Bango | 9/1/06 3:04 PM
Ben's Gravatar Not to get nitpicky, but...

http://www.yahoo.com/ - site/page, not an application
http://get.live.com/ (Microsoft's Live initiative) - site/page and uses Flash for more "interactive" features
http://www.flickr.com/ - also not an app and slideshows are Flash
http://www.37signals.com/ - Basecamp, Campfire, Backpack, et al - good Ajax example
http://www.netvibes.com/ - good Ajax example
http://www.riya.com/ - more site/page feel than app, not too impressive
http://www.3bubbles.com/ - didn't dig very deep
http://www.scrapblog.com/ - didn't see Ajax, only Flash

As for targeting players, yes 7 is still the safest bet. But with express install the newer versions will be adopted even faster and upgrading can be done inline. This debate could go on forever but Ajax will never offer the experience, interactivity or "desktop feel" that can be accomplished in Flash with ease.
# Posted By Ben | 9/1/06 10:18 PM
peterb's Gravatar I love this debate. Seriously. To add my two cents.

http://www.yahoo.com/ - Okay, my personal opinion here, they shouldn't have used AJAX, they should have just stuck with DHTML for the majority of the stuff going on there. Why? As far as I can tell, the majority of the AJAX going on is to reveal the stuff going on behind the tabs. So now, whenever I switch tabs there's a perceptible few second delay to load whatever's supposed to be behind that tab. And what's behind the tab? A picture and some text. Personally, I would have preferred everything frontloaded on the original page call. It's not like I'm loading the entire map of the US, it's just some pictures and text. Sure the mail and IM status could change, but how long am I really spending on the home page? Anyway. That's my two cents on that one. I'd have preferred it stay DHTML. I like the new layout of the new yahoo.com, but I prefer the old snappiness. The AJAX version is just too slow. I've just been dying to vent that frustration somewhere. :-)

http://www.live.com/ - Doesn't work in Safari. You can sneeze at that, but if your argument against Flex is availalibility of Flash 9, this should be an issue too. Flash 8, in less than a year is up to 86% (http://www.adobe.com/products/player_census/flashp...) ... you can expect Flash 9 to have a similar, if not quicker adoption rate. As far as macs, recently it was reported that in the last few months (or so I hear) Apple's new notebook sales jumped from 2% of the market to 10% of the market. You may want to be concerned about whether your "app" works on Safari. Sure, you can get users to download Firefox for the Mac. That's what Google Maps did before they supported safari. But, of my Mac using friends if you told them to dowload a 1 MB plugin vs download a 46 MB application AND tell them to switch which browser they use, forcing a switch in Browsing habits... I can tell you which they'd prefer. Anyway, I live the Live.com implementation for Safari. No "sorry your browser can't use this site"... just a big blank white screen with absolutly nothing. Reminds me of the blue screen of death.

Thats all.
# Posted By peterb | 9/2/06 9:54 AM
Rey Bango's Gravatar @Ben: No worries about the nitpicking bud. When two people with different perspectives get into a debate, its just natural to do that. And yes, this is a debate that could go back and forth forever. Shoot, I'm sure if Alex Russel of Dojo jumped in here, he could offer a TOTALLY different view than both of us. As for "Ajax will never offer the experience, interactivity or "desktop feel" that can be accomplished in Flash with ease", I look atthe Zimbra Collaboration suite and the Qooxdoo framework (http://qooxdoo.org/demo) and I begin to question that statement. The work thats being done to integrate UI, DHTML, Ajax and usability is outstanding and advancing everyday. Its definitely not a knock at Flash but I'm not sure if you're fully aware of everything that's going on in the Ajax/DHTML/CSS community.

@Peter: I actually like the new Yahoo homepage although I'm not a fan of their new email client. I think they have a lot of work to do on that. If the fact that Live can't work on Safari is the only argument that you can bring up against Ajax/DHTML, then you're being very narrow sighted. Most major Ajax/DHTML frameworks already accomodate for cross browser compatibility. Go to the Dojo, Mochikit or Scriptaculous websites and you'll see how they explicitly focus on this. If Microsoft chose not to support Safari, I think you need to look past the technology to other reasons for their lack of support. I equate it to how the folks at Opera pointed out how the MS site wouldn't render correctly on any non-IE browser several years ago. Should we blame the W3C for MS bastardizing the standards defined for effective cross-browser compatibility? And as for Google Maps not supporting Safari, it'd be interesting to know if Safari was pervasive back then as it is now? Having worked at a publicly traded dotcom about a year and a half ago, about the time Google maps was released, I can tell you that Safari wasn't even a blip on our radar in terms of cross-browser worries because it didn't command enough presence to merit the work. Only recently has it become something that people take seriously because Apple has done an amazing job at getting their hardware out to the masses. You can thank their "recent" Intel partnership for that.
# Posted By Rey Bango | 9/2/06 10:55 AM
Josh's Gravatar Sup,

good points on both sides. I think the real thing developers should look at is the target application that is being provided to the client. Flex 2 has its advantages, Ajax has its own both work well for different environments. The developer needs to look at what is being asked for, how much time do they have to develop it, whats the environment, etc.... then choose the path that best fits the customers needs. to many times have I seen and am seeing still that developers try to push a technology down the pipe to the customer bc the developer wants to do it in this, not because its better for the customers needs.

On another note, I am not a Ajax wiz, whats Ajax have that is on the same level as Flex data services? I am curious?

~ my 2 pennies worth ~
Josh
# Posted By Josh | 9/19/06 1:38 PM
Joe Danziger's Gravatar I think it's also important to look at just how fast Ajax has grown, and conversely, how long it has taken Flash RIA's to mature. Adobe/Macromedia has been pusing Flash-based RIA's for many years now. Ajax only caught on about a year and a half-ago, and has already become a necessity on almost all new web apps (even the Flex ones).

Not to mention that Ajax is platform agnostic. I know Flex is too, but from a developer standpoint, there are hundreds of Ajax toolkits to choose from, not just one that costs money. Plus Ajax can be used to retrofit older sites with advanced features. Which makes the potential audience of Ajax developers a much larger pool.
# Posted By Joe Danziger | 9/26/06 12:19 PM
Rey Bango's Gravatar Thanks for stopping by Joe. I read your blog religiously. Great points and I definitely agree with you.
# Posted By Rey Bango | 9/27/06 2:27 PM
Ben's Gravatar Come on now guys...

To say that Ajax has "grown" recently is a bit of a stretch I think. Its a 10 year old technology that has recently started getting used more, as a last ditch effort to salvage the page/request model. Sure, Flash RIAs have been discussed for years but Flex, in particular version 2, is/was Macromedia/Adobe's first real effort at an application platform. To say that its a necessity on new apps, especially Flex ones, is simply not true. It may in fact surpass Flash as the most misused technology on the internet in the very near future.

Regarding the fact that there are "hundreds of Ajax toolkits to choose from", I see that as a big negative. Maintainability is going to be a big problem for a lot of these apps. Looking for an "Ajax developer" will undoubtedly result in a hundred different people with a hundred different skillsets. Perhaps not vastly different, but there will be some amount of a learning curve between toolkits. Some large and some small. A Flash developer on the other hand is a much more specific skillset. The consistency of environment and backwards compatibility are big strong points of Flash and Flex. The Flash Platform is not going anywhere any time soon. The same can certainly not be said for a lot of the companies/communities behind various Ajax frameworks. Also don't forget that the Flex SDK is absolutely free. Download the free, impressive FlashDevelop editor and a few plugins and the SDK and you're off to the races.

Like I've said before, if you want to make some small usability enhancements or widgets on your site and Ajax serves your needs, by all means go for it. If you need to build an entire app and/or require rich media and/or dynamic graphics, the choice is obviously Flash/Flex. Choosing Ajax for those things is simply not smart.
# Posted By Ben | 9/27/06 10:08 PM
Ben's Gravatar Just came across this and I thought of you guys :)

http://www.onflex.org/ted/2006/09/flex-2-and-flash...
# Posted By Ben | 9/27/06 11:35 PM
Joe Danziger's Gravatar Ben: why is it a stretch to say that Ajax has grown? One need only take a look at <a href="http://google.com/trends?q=flex%2Cajax&ctab=0&... Google Trends for Ajax vs. Flex</a> to get an idea of the growth of Ajax. Since the beginning of 2005, both searches and news stories for Ajax started to rise in a big way. Sure, the technology has been around for a while, but it was only safe to use it in controlled environments.

As for Ajax being a necessity, I would refer you to <a href="http://www.sdtimes.com/article/story-20060901-12.h... study</a> which indicates that about 75% of development teams are using or planning to use Ajax. I'll agree that it's not a necessity, but what web app wouldn't benefit from the enhanced functionality and usability that Ajax provides? I certainly do not see it a "last ditch effort to salvage the page/request model". That model is going to be with us for a long time to come, whether we like it or not, so why not make it better if we can? The billions of legacy web pages out there are not suddenly going to be converted to RIAs overnight, but they can be made better.

While I agree that "hundreds of Ajax toolkits to choose from" can be a negative, in reality the top toolkits (Prototype, Scriptaculous, Dojo, YUI) are far and away the most popular in actual use. And none of them have anywhere near the learning curve of Flex. Granted, things now are much better than the Flash IDE days, but Flex is still far from accessible to the average developer in terms of complexity.

I certainly agree that in a corporate environment, Flex can be a powerhouse, but let's not discount the ability of Ajax to create some very advanced applications in the browser - just look at Writely and the many apps of its kind that are coming out. Most of that work is being done without any Flash/Flex at all, yet they are very compatibile and very powerful, and not on the verge of "breaking". That's why we have web standards, and things will only get better as more browsers start to obey more of those.

But even at this stage of the game, compatibility does not keep even the biggest sites like Yahoo! and Google from using Ajax heavily. It's great that Flex can run in Netscape 4, but how many Netscape 4 users do we really need to be concerned with outside of controlled environments?
# Posted By Joe Danziger | 9/28/06 1:57 PM
Blagovest Buyukliev's Gravatar While Flex is a well-designed and well-thought complete framework to achieve a well-defined goal, that is, building RIAs, AJAX is just a workaround to overcome the numerous limitations imposed by misdesigned standards like HTTP and HTML. Browsers were made mainly for rendering text and that's what they are good at. The sluggishness and unresponsiveness in AJAX apps comes from the simple fact that rendering engines of today's browsers are honestly inferior to the rendering engine that Flash player employs. IMHO, it is a matter of 2 to 3 years for AJAX to be dead. Since Adobe have made the MXML compiler completely free, more and more people will consider Flex, even that the IDE is still paid.

As for the cost, trust me, if you do a more sophisticated project requiring maintenance, extensibility and compatibility, Flex will come tens of times cheaper than AJAX both in matter of money and time because it is designed to meet these requirements.

The Flex documentation is excellent and I don't really think one needs a book to start up. For me it was a matter of 2 weeks to get used to the concepts and conventions, after that I was able to do whatever I needed only having the documentation at hand.

AJAX still has its niche, and to me it is the creation of small little gadgets into websites for increasing usability. In the RIA battle Flex wins in any aspect.
# Posted By Blagovest Buyukliev | 10/6/07 3:19 PM
pete's Gravatar Well its only been out for ~2 months, give it some time. Flash Player adoption is exponentially faster and easier than browser adoption. Ajax is well suited to small usability enhancements like sortable tables and dynamically populated dropdowns, but not so good for apps as a whole. How many nice, full-on Ajax applications are out there that weren't made by Google or Zoho? Not many, and that is because its hard and the code is hideous.
http://www.dir-9.com
# Posted By pete | 11/22/07 7:26 PM
Rey Bango's Gravatar @Pete: You obviously don't code in JS or use Ajax on a regular basis nor have you kept up with the newest developments. Otherwise, you wouldn't have made such a naive comment. Just go to www.extjs.com and tell me that's just for minor enhancements. Then ask Cisco, Visa, Boeing and several other top name corps (not dotcoms) that use Ext whether it's just for progressive enhancement or full-on RIA development. Anyone who thinks that Flash/Flex is the only game in town for RIA development hands their head stuck in the sand.
# Posted By Rey Bango | 11/22/07 8:20 PM
Nanika's Gravatar Hi,

Not to mention that Ajax is platform agnostic. I know Flex is too, but from a developer standpoint, there are hundreds of Ajax toolkits to choose from, not just one that costs money.
# Posted By Nanika | 6/27/08 10:47 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.