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.






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.
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.
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.
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.
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.
@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.
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
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.
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.
http://www.onflex.org/ted/2006/09/flex-2-and-flash...
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?
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.
http://www.dir-9.com
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.