AJAX vs Flash, round 2, arena: Web2.0, fight!

The first round of this battle ended and the judges argued but to no avail—no winner, so today we’re here to watch the second round of the match sponsored by dotone. Stick to your seats no ads are going to interrupt this round. Ting-Ting! Round 2! Fight!

AJAX vs Flash, round 2 at Web2.0

Rules & Guidelines

Judges have put strict rules for this round, so AJAX & Flash are going to fight fair according to the guidelines listed below:


Won’t keep the poor girl running more rounds showing you the round 2 sign, I know you like to check her out.


Ties with HTML: How close are they to HTML?

Flash lives as an embedded object in (X)HTML , compiled, and does not show as a text-based content but a reference to an object which is a .swf file while AJAX lives as a mixture of HTML tags coupled with script tags that could go in head as well as body.

So to compare, AJAX is a mixture of elements in (X)HTML, not compiled (although it could be obfuscated or encoded), accessible via DOM and using XMLHTTPRequest objects implemented in JavaScript. Flash resides as an independent object which could be accessed via DOM.

AJAX being it a technique that could use all the elements of (X)HTML including Flash objects allows it to be available everywhere and network with all the (X)HTML tags hence, it has more ties with (X)HTML than Flash. I need to remind you again that AJAX is a mixture of technologies that mixes (X)HTML, JS, XML, and any HTML elements including Flash. So, it’s obviously enrooted in the webpage lifecycle even though many biased AJAX lovers think it’s the XML & server-side connectivity that promoted AJAX— it’s actually the ties with (X)HTML and the openness vs compiled Flash.

Flash player penetration is real high even for the latest versions. Version 7.0 of the player has been adopted by more than 90% of the users according to Macromedia. While Flash is supported on many devices because it’s just a plug-in, JavaScript objects are still not supported as Flash on mobile devices making Flash being used in Mobile devices more than AJAX JavaScript based run-time interaction.

AJAX paid one of the judges some HTML tags to use in their websites, so they raised some points in its favor.

Scoreboard:
AJAX=2
Flash=1


GUI: How graphical, accessible, and interactive?

Let’s start with something interesting. Animation, graphical effects, smooth motion, and many many other effects that could be made in Flash. GUI is Flash’s game in terms of beauty, interaction, and just beauty again! Flash is known for RIA, and as a matter of fact RIO was a term used only for Flash apps sometime before AJAX gets on the wave. Flash has beaten DHTML and all the rest including Java-Applets, QuickTime, and Macromedia’s own Director Shockwave in GUI arena. No doubt! Flash beats AJAX the same way, only if AJAX doesnt use Flash!

Even though accessibility was a major problem with Flash, it’s not the case anymore; Flash has improved in terms of being accessible for people with disabilities. Access Keys, Tabs, and the rest of the goodies are bundled with Flash as of version 5 with many improvements in the current versions. The visual accessibility which is for visually impaired users is up to the Designer mostly while designing, otherwise on the run-time by providing some mechanisms to do that.

AJAX has all that an accessible application needs since it’s based on XHTML tags its all built-in in addition to the interaction that could be made possible using JavaScript.

AJAX uses DHTML-based effects using CSS and JavaScript Graphical libraries and classes. Many coders and programmers have made pretty effects in JavaScript using DHTML effects but to no avail! It isn’t real smooth, it’s all run-time and even the best folding, fading, and rotations wont reach to the quality of one motion-tween that uses vector based graphics and run-time optimization.

Now let’s get down to forms. Web forms are the most important part of web applications, in fact in any type of applications. AJAX uses (X)HTML forms or enriched forms using JavaScript while Flash could use the primitive and old text-input element or just the new flashy input and form Components.

Flash comes with built-in MSGBox, InputBox, Calendar, TextArea, and many many more components while for AJAX you got to find your own library since AJAX is based on open standards and developers passion for making challenging elements for use by other developers.

Flash sets AJAX in the corner, and beats the sh** out of him and gives him a set of punches till he bleeds! Ouch.

Score Board:
AJAX: 3
Flash: 3


Code: Object Oriented? Typed? What about the learning curve?

So this is the part where Flash sends in his partner Action Script. Action Script vs. JavaScript. Action Script is the language of Flash scripting, where JavaScript is the language of use in AJAX.
Both Action Script and JavaScript are based on ECMAScript standards. Both have very similar syntax. JavaScript uses variant variables which shows that the language is not of typed-nature. However, Action Script was loosely typed and with introduction of Action Script 3.0 it will be completely & strongly typed.

According to ECMAScripting guidelines they are both OO, but to compare with real Object Orientation that don’t need tweaking of frameworks to perform OO they are both loosely Object Oriented!
They both make use of prototyping for class definitions according to ECMAScripting standards. Still, you could take it as a light approach of OO that fits the dynamics of web interaction that is supposed to be smoother than other languages.

Both Action Script & Javascript are simple languages to learn if you come from a programming background. They both have C, Java kind of syntax which is the best in conventional use. Both have different ways of handling String which is simple and really good built-in functions and libraries for Regular Expressions, Comparisons, Mathematical operations as well as the environment that they live in—document, window, system for Javascript and movie, screen, system for Action Script.

Action Script & Javascript both could be either kept as program source code—Javascript as *.js files and Action Script as *.as files that could be included by the document requesting or the movie requesting either.

Both are simple to learn. Specially if you’re coming from a solid programming background it’s going to be a piece o’ cake and would take you only weeks to get the hang of the environment variables and built-in functions and their scope. If you’re a designer who never touched the keyboard for coding then again depending on how logical you are you could make it to intermediate programming within 6 months!

Score Board:
AJAX: 4
Flash: 4


Data Connectivity: XML & Remoting

In the dark days of old DHTML Javascript could never send an HTTP request without causing the page to be refreshed or directed to another page. With XMLHTTPRequest object now it is possible to do that. In contrast Flash had the ability to send and receive HTTP requests since version 4 and enhanced in version 5 and then in version 6(MX) it was just at its best where you could send and get variables easily from different server-side scripts. So why didn’t Flash get that much attention? That’s going to cause me running a research on why not Flash back then but AJAX now.

AJAX & Flash both have the capabilities to send and receive XML data or raw data to server-side scripts which would process data and might return a response.

Flash plug-in ins are mostly the same in all the browsers, however different browsers use different Class for XMLHTTPRequest which could cause some abstraction layers to be needed to go x-browser.

Flash comes with enterprise level components such as XMLConnector, RDBMSResolver, Dataset, etc… components that make working with Flash seamless to Windows application design.
Many more libraries are available at Macromedia Exchange and other third-party component developers that could get your work streamlined. Good news right?

In contrast AJAX is open-standard so what you get is what other people make or third-party component makers make—to start. However, good quality of code is out there such as Prototype , DOJO , Open Rico , Bindows , and many more .

Flash drags AJAX in the corner again! Action Script 3.0 is packing with a native data type; XML.

Score Board:
AJAX: 4
Flash: 5


Extensibility: Forward compatibility & Integration with other technologies

Extensibility is one of the big roles that every technology plays in order to gain competitive edge.

AJAX as a technique can control every element inside a web-markup along with data that comes from responses to HTTP requests made by XMLHTTPRequest object. That said, it could work with any kind of application that supports XML. So extensibility is endless since AJAX is based on XML connectivity. AJAX could control & interact with any Active-x object or plug-in embedded in documents such as QuickTime, RealPlayer, Flash, and any object that goes in between object tags. On the remote side as mentioned before AJAX can access any kind of Web Services. Enough said?

Flash started bleeding—dizzy and don’t know what to hold on.

In contrast Flash has built-in support for streaming video. After Flash Video components and extensive support met Flash *.flv files became norms for importing video into Flash. So, while using Flash you actually do not need other media players or streaming services and since it’s native and built-in; you guessed it—better to control.

Flash remoting can’t be better anymore. So like AJAX since it has fully support for XML and HTTP Request it could interact with any off-server data and applications that support XML and Web Services. SOAP too.

Flash energized after seeing some real hot chicks cheering him, so gets back in the game and starts punching back.

Score Board
AJAX: 5
Flash: 5


Portablity: x-browser, x-platform, and x-device support

AJAX being based on Javascript is a little shaky when it comes to x-browser. The reason lies beneath differences in APIs and behaviors on DOM. Although most of the browsers such as Mozilla, IE 7.0, Firfox, and Safari are getting closer to meeting the standards of the DOM and Javascript; still a long way to go. In contrast, many solutions are availabale today for Javascript abstraction to work on most supported browsers at least. Since browsers depend on the platforms too reaching x-browser & x-platform is kind of a big challenge for AJAX but reachable.

Flash is based on a plug-in that gets installed and then plays Flash movies. Mozilla, Firefox, IE(all the versions, all the platforms), Opera, Safari, AOL, you name a browser that is visual and it would support Flash since it’s just a plug-in and not native to browsers.

Now, we got down to my favorite part of portability discussion. x-device support. AJAX being based on Javascript limits it to big screen PCs, Macs, and basically computers. AJAX is hardly supported on Mobile devices. I remember the days that WML had a scripting language called WML Script. Very primitive, remember it?
So what about AJAX on mobile devices? What’s the future? what’s the adoption level? no accurate measures available yet. Agree with me? please oppose me if not, comment please.

Flash however, is really supported, you could say everywhere. It’s supported in most of the mobiles manufactured by Hitachi, Fujitsu, Sharp, Motorola, Nokia, Sony, and the rest. These mobiles could have different versions of Flash according to their support. Flash Lite, or Stand Alone Flash 5,6. Flash could be used as backgrounds, menus, and even as a stand-alone application and not forgetting the plug-in role in browsers.
Flash could be used on many IP enabled devices like MSTV and sets that go online using Microsoft browsers and even Digital Cameras. Palms and Handheld computers could benefit the most comparing to the other devices. It could support and have it pre-installed a varieties of Flash player flavors in many brands.

Flash plays a little funny animation in judges mobiles as a bribe so they give’em some points.

Score Board
AJAX: 5
Flash: 6


Performance: file size, loading time, and efficiency

Flash is bottle-necked when it comes to file size. Even though it’s optimized and vector-based it’s still sizy. With the new components and the usage of Action Script alone adds a 1xx kb to the files size of the movie. AJAX files or scripts could be saved as separate *.js files that are all text so, it’s just text, really just text, ASCII. File size isn’t no problem for AJAX.

Flash is embedded in HTML, it is loaded after everything else native to browser is loaded. While AJAX could have assets such as images, layout markup and data markup it’s still faster. Flash after all is no native to the browser it’s just a guest that sometimes could be way too annoying and heavy to load.

AJAX is interpreted, so it is not compiled. Flash is compiled (even though you could have *.as files with only source) so deploying efficiency is on the side of AJAX, you hear me?

The fight sees an AJAX come-back. Flash is still trying to please those hot chicks.

Score Board
AJAX:6
Flash:7


Adaptability: Implementing, Deploying, and Fame

Even with long existence of HTTPRequest in Flash it wasn’t really given any importance comparing to AJAX. Many factors and qualities of both AJAX & Flash could play roles in this starting with their makers’ origin and the market segment they serve.

AJAX being based on efforts of technologists that contribute to programming and open-source community surf on the same wave HTML surfed 10 some years ago; Openness. But hey is being proprietary technology a bad thing? I remember days where free and open-source apps and technologies were!

So what’s really the reason? Despite the fact that Macromedia’s extensive PR and Marketing Flash has worked relatively. One application made by Google (Gmail) took AJAX where Flash could never reach.

Is it the domain? the market segment? Flash was made for designers and was intended to become the next multimedia engine on the web. Now, it’s a platform that still is perceived as the multimedia engine and not application development platform.
Communication Server came to streamline some server-side communications, Flex is there, but why AJAX took over in the hype of Web2.0? The answer lies in the message of Web2.0. What’s the message? What is Web2.0 to change? Why AJAX got more promotion than Flash. Web2.0 should answer all this.

Score Board:
AJAX: 7
Flash: 7

AJAX is holding on a corner, tired, and shaky.
Flash on another corner bleeding to death. Judges end the game and call it a draw.

Which one do you preffer to use according to your preference? and why? talk back.

Related Articles

« Previous post: IE Developers Toolbar: Beta1
» Next post: My home town landslide & earthquake

Comment

Wednesday November 23, 2005

Jouko Salonen said:

Thank you! This was a nice summary! The graphical part was that, what originally brought me to your page. It would be nice to see how smooth the best designers can do with AJAX and it would be really exciting to see what it means in practise when “AJAX uses Flash” as you said!

#

Thursday December 1, 2005

A Developer said:

Let’s put it this way: AJAX is gaining on Flash. By this time next year when more old browsers with no support for AJAX have been phased out, more developers will start using it for purposes originally reserved for Flash. So if AJAX and Flash were publicly held stocks, I would invest in AJAX.

#

Thursday December 1, 2005

lulu said:

Performance: file size, loading time, and efficiency

Score Board
AJAX:6
Flash:7

??????????

not:
Score Board
AJAX:6
Flash:6

#

Thursday December 1, 2005

João Fernandes said:

In the overall, it’s a nice comparison.

few points:
“Flash remoting can’t be better anymore.”
I disagree, remoting is faster than XmlHttpRequest and will be even more with the AMF3 (Flex 2 & ColdFusion adapter).

“it could work with any kind of application that supports XML.”
So does Flash. Also don’t forget that FP 8.5 support binary socket connection so we can see in a near future more applications like FlashVNC.

Flash can also leverage any kind of webservices.
“With the new components and the usage of Action Script alone adds a 1xx kb to the files size of the movie”

Indeed but it’s not 1xx k per component. We have a full Flex Application using almost every component and it stills below 500 k after compiling (including assets), and be honnest, what’s 500k on the web nowadays?

Don’t forget, flash roadmap is not to fight with AJAX but to work side-by-side if you want. Take a look of Kevin Lynch presentation at Web2.0 and see flash comunicating with AJAX.

For the loading time, wait for the Flash Player 8.5 and you’ll see the amazing performance compared with current version.

For me, both technologies have their place in web2.0. Both allow people to build better applications faster and that’s what we all want.

#

Thursday December 1, 2005

DG said:

“AJAX could control & interact with any Active-x object or plug-in embedded in documents such as QuickTime, RealPlayer, Flash, and any object that goes in between object tags.”

Using your example that AJAX can implement Flash, Flash can interact, execute, and respond to the same JavaScript controls AJAX uses; ExternalInterface.

#

Friday December 2, 2005

dotone said:

João Fernandes,
Thanks for your comment, I agree with you on the bottom line which is building better apps no matter what we use. I use both AJaX and Flash and I could be on Flash side more if you wanted to know, but hey AJax is neat too; did you see the score board at the end? ;).

DG,
Intresting!

lulu,
That’s how the judges wanted it to be.

A Developer,
I beleive AJaX is not gaining on Flash neither the other way around.

#

Saturday December 3, 2005

dkleehammer said:

You forgot one major thing.. Accessability. In fact, it is one of the top 10 priorities when building websites.

I understand that you sort of mentioned that it would be reliant on the designer at the time of development, but you create a weak argument. There aren’t many flash movies that contain scalable text.

What about the fact that in a window with flash, if the movie is larger than the viewport, you have to scroll to see everything. Proper layout of the css (still talking * vs Flash here) will not go off the edge of the screen. Compliancy.

#

Tuesday December 6, 2005

Paul Colton said:

My AFLAX library bridges these two worlds together, allowing you to use the best of both all through JavaScript—> http://www.aflax.org

#

Monday December 19, 2005

NaDm said:

Flash: Processor hungry animator.
AJAX: simple remote procedure calling router.

They are both like any other tool in the shed… Each tool is better at doing something that the other is capable of doing.

You can use a crescent wrench to hold down a panel, but it would be more intelligent if you used a clamp.

#

Tuesday March 7, 2006

Tara England said:

Another issue in AJAX vs. Flash, from a team management point of view, is that designers tend to not enjoy working with scripts such as AJAX. On the other hand AJAX allows developers to do some design work in a medium they are familiar with.

This is of course a generalization as there are people who do graphic design and code development, but my experience has been that the majority tend to focus on one field or the other, so your choice of technologies may depend on the staff you have available.

#

Sunday March 12, 2006

dotone said:

Tara,
Sure that’s the case with authoring such technologies, the team environment is ad-hoc with AJaX until now but still it could be manged using versioning.

#

Tuesday March 14, 2006

Who knows... said:

Loading times?
We’re talking about webapps, aren’t we?!
Even if it takes a whole minute to load a HUGE flash application, it won’t need any other loading besides round-trips to a server-side script, which are inevitable in any situation.

I really don’t understand how size and loading times are a factor AGAINST Flash applications in most reviews ad debates.

On the processing power, yes, it does require more processing power. But let’s not kid ourselves here, the client using the flash webapp isn’t running a database server, now is it? And, who uses a 486 anymore?

#

Tuesday March 14, 2006

dotone said:

Who Knows: I wish you kept at least a name out there.

Good point. No one said a client would run a DB server nor runs on 486, but yea, loading time and files size is greater in Flash since it is compiled and has to have some of the inner workings loaded first, aka components.

#

Tuesday March 14, 2006

Who knows...aka Michel said:

Loading time is only important for short sessions, imho. A facile analogy, maybe, but if you’re driving 300km to spend a week somewhere, it’s worth the time spent driving! We’re not at the point of teleporting organisms, nor are we at the point where the web is instantaneous through any medium. But like I stated, loading times are important, if not crucial, in short sessions on the web, not for web apps.

#

Friday September 22, 2006

Gökhan Besen said:

I vote for AJAX, Html and CSS. Although I have roots in graphic design, flash was never my favorite application. Thanks to CSS and semantic markup. It’s open source, easy to learn and implement and all you need is notepad. How about flash or flex? I really don’t care about the fancy animations on the user interface EVEN being a designer. Because I believe the user interface should keep silent inorder to let user focus on the information he’s looking for. Can you imagine epinions.com in flex, I simply can’t and I don’t think epinions guys do. Why do you think epinions is not using a single dropdown list to narrow searches? It’s interactive, it saves space and is even animated although it’s a standard HTML object. It’s because the user doesn’t want to think and surely doesn’t care the animation. The information is what he’s looking for so just by single clicking on the hypertext is the unbeatable power of usability. I really don’t see any reason for creating complete flash websites. I use flash for the sake of optimized vector graphics. For example google logo is 8kb jpeg but I can create my logo in flash as low as 350 bytes, not even a kilobyte! I save a precious 7.5 kb compared to Google. Ofcourse Google logo has other issues such as it’s not being a logo :) The have to use bevel emboss and drop shadow to make it look like a logo and they end up with a 8 kb jpeg, which is just normal for a joke like this.

I have to admit that for a long time I refused to get into HTML, just because tables and the idiot techiques with spacer.gifs etc. But after CSS 2.0 showed up and tables are saved, I got into HTML, semantic markup, CSS etc. and I think that’s what the web is all about.

So learn CSS based layout, semantic markup, combine with ajax and use flash to optimize graphics. That’s what I say.

#

Commenting is closed for this article.

Want your link here? Use TLA

Posts by Topics
  1. Nov 4, 22:25 It's Orange, it's White, it's Laazi ads
  2. Oct 4, 02:20 Nakheel's Spam II
  3. Oct 2, 02:59 Nakheel's Spam
  4. Jul 23, 15:42 Social and Community with one button
  5. Jul 23, 13:58 Translate, Rebrand, and that's another Web Startup
  6. Jul 16, 07:11 10 Second Car
  7. Jul 16, 02:24 Domains of Branding
  8. Jul 14, 07:40 Outsourced Keystrokes