A simple blog on Web, Media, Mobile n' everything related.

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

Posted: November 19th, 2005 | Author: dotblack | Filed under: Journal, Tech, Web-Design, Web2.0 | 15 Comments »

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, 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.

Post to Twitter Tweet This Post


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

Posted: November 5th, 2005 | Author: Saleh Esmaeili | Filed under: Journal, Web-Design, Web2.0 | Comments Off

Lately Web2.0’s been a hot fishing market. Many have already made the big bucks out of it. And many others are on the edge of being acquired by Yahoo!, Google, or Microsoft and the rest just experimenting and having fun, yea I meant you! just a geek no business man! Some use Flash and some others use AJAX.

Sit ups, push ups, and Flash warm-up

Macromedia Flash has been there since the first days of web, it’s a plug-in based technology that’s embeded in HTML markup documents. By release of the version 4.0 of Flash it gained so much popularity that Flash 5.0 plug-in shiped with WinIE out of box after installing Windows XP. The introduction of ActionScript 2.0 with typed nature, and very close to true object-oriented pattern language Flash MX came to this world with many components that inherited roots from SmartClips in Flash 5. As Macromedia elevated Flash, Director Shockwave droped from the internet and Flash became the king of interactivity on the web forgetting the multimedia capabilities and the popularity in the entertainment & gaming circles.

Flash MX/Flash 6.0 introduced powerfull components that addressed the needs for building more of Windows/ or Desktop like applications on the web, Flash 7.0 swifted in with compiled components and more of support for XML, and Web services & SOAP. And now Flash 8.0 is out. Part of Studio 8.0 with many graphical enhancements and run-time effects such as drop shadows, layer blending and more. With all this mass of updates and feature yet there’s more! Macromedia introduced technologies based on Flash such as Flex, Communication Studio, and Remoting Objects. All and all to make Flash the technology of choice for web-app developers.

Is it that soccer club in Holland?

No, that’s Ajax Amsterdam!
AJAX has become the buzzword used everywhere now a days, whoever wants to throw words just shoots you with AJAX, every web-app that comes up has to be prefixed or suffixed with AJAX for recognition, and of course the words like Gmail-style-interface and XMLHTTPRequest are some good percentage of words we read or receive in our inboxes, or feed readers.

So what’s this AJAX? I’m not going to explain this one since you’d be hearing this for the 100000XXXth time if I do. If you’re left behind then logon to AJAXBlog or just Google AJAX and see for yourself. Simply put it’s a technique not a technology that gets Javascript, DOM and XML to work together with HTTP requests, yes HTTP request inside JS to keep data asynchornos.

Javascript & DHTML have been around since ever, now with the AJAX technique Javascript has come back like Micheal Jordan when he came back the second time after retirement full of moves, accented shining head and flying like a butterfly.

Web2.0, the Arena

The first time I noticed the title “Web2.0″ I thought it was just a new CMS or maybe a new version of XHTML. I thought it was XHTML2.0 so they called it Web2.0. After days I was reading an article and then again I read this Web2.0 title. I was so curious and started thinking is it another WWW just like the IPv6? So started digging my way on google and ooops! I was ashamed of myself. Man, I’m just thinking how would it be possible for me to explain such a thing to a novice? It’d be a nightmare to deal with.

According to what I digested with my small brain Web2.0 is the new approach of living on the web, a new approach in designing and developing websites/applications and a social mass of applications that host and serve power-users and end-users alike. Most of the Web2.0 applications are highly interactive and usability’s been the main target extended with directness and the least number of options and specialization of tasks and services. Got it? I don’t think you did with the way I phrased that sentence.

It’s by no mean AJAX, Flash, XMLHTTPRequest, RSS, nor any one application. It’s just new buzzword to wake us up and tell us that the web has improved and it’s elevated an age, a major version number.

Okay, I kept you waiting long enough, let’s get down to business and start the fight. What’s the deal with AJAX vs Flash? read on!

Hurry up you missed a minute and 43 seconds

Why the battle? obviously AJAX has taken all the votes already but Flash is fighting back and getting some of the score. AJAX and Flash are both capable of communicating with webservers and request/handle HTTP requests and posts. Both work neatly with XML, both have many many components available for free and for commercial licensing, and more important than all both are nearly standards set.

AJAX is kind of a new commer to many of us, while Flash has penetrated well. Javascript is available on most of the browsers if not disabled while Flash has to be downloaded if not available. Flash and AJAX can make the best of interactive web-applications. Flash is more powerful on the multimedia side but is powered enough on the code and data side to compete with AJAX.

Why would we use Flash in AJAX favor? or the vice versa?
While designers who tend to join the webstandards crowd still want to have their own stuff back they use many stuff such as sIFR to keep their head ringing, developers stay home with their own tools–text, text and some more text. Hybrids would use both; but still developers do not like to use many. In my opinion, where there could be a big team to execute projects, designers have hands in the process, and where teams are smaller, developers take lead and lead the whole thing with their text and non-compiled interfaces.

Score Board

Many many applications have arrived with the hype of Web2.0 mostly of service and subscription-based types such as bookmarking, feedreaders, photo sharing, web-based e-mail clients, discussion boards, file sharing, and mainly collaboration tools. Below is a short and brief list of a selected number of Web2.0 apps based on AJAX and/or Flash.

Here’s the list you read so long to reach:

FlashAJAX
Yahoo! MapsGoogle Maps
GoowyNetVibes
-del.icio.us
-37 Singnal’s Backpack
-Gmail

Guess what? it aint no fair results right? I could’ve listed more applications but I only chose the most popular and the most aggressive ones.

Round Two

The second round of the battle and this article will discuss the technical differences, pros and cons of both Flash and AJAX in details and why use each of the technologies/techniques and where, until then.

Post to Twitter Tweet This Post