Pete Freitag Pete Freitag

AJAX vs Flash

web

I've often wondered why Flash RIA's (rich internet applications) haven't really seen the anywhere near the level of excitement that AJAX is currently seeing. They both solve the same problem.

Check out this post on AJAX info weighing the alternatives to AJAX, including Flash, XUL, XAML, SVG, and Java Applets. It may answer some questions.


Like this? Follow me ↯

AJAX vs Flash was first published on October 12, 2005.


Comments

Wait until Google embraces Flash, then the whole world full of hypocrites web developers will follow.
by Bayu R on 10/13/2005 at 1:26:18 AM UTC
Yeah, and wait for Windows Vista to be released, with the new Avalon graphics engine, which will take the expectations for Web richness to a whole new level, where only Flash can compete. Ajax is just a temporary thing, it's very limited, only able to go so far.
by Jack D on 10/13/2005 at 5:53:57 AM UTC
A lot of the AJAX examples I've seen aren't even AJAX to begin with. Folks using remote scripting to create dynamic content NOT because its the correct tool for the job, more that they couldn't figure out how to do it in one page as a self contained unit. I have seen some AJAX examples used for online apps that really make you step back and think of how cool AJAX can be. On the other hand, I think I'd like it better if someone could show me a disconected application that can run with stored data the way a flash application can. No internet connection - no AJAX.
by Brandon Ellis on 10/13/2005 at 9:07:56 AM UTC
He answered for me in 2 places. When you put it together, it makes total sense.

"(Flash) Disadvantages: General distrust from enterprise software developers.Rare skillset required to do development with these components that most corporations do not have."

And then for AJAX:

"Disadvantages: Somewhat complex and can be quirky to do sophisticated development with, although the basic skillset necessary for interacting with components is quite common."

Basic skillset quite common. Meaning, numbers. 5, qualified Flash developers blogging & speaking at conferences vs. everyone who can code some script and HTML. Doesn't mean they are qualfied to do it, just means it's a way more attainable goal, to create applictions in AJAX. Low barrier of entry, and many cross-skillsets that are included.

Hopefully Flex will remove the perception & skillset barrier for enterprise developers.
by JesterXL on 10/13/2005 at 10:00:46 AM UTC
I agree with much of what has been said here. However, as someone who jumped into learning
Flash programming with a programming (not design) background I think Macromedia is 80% of the problem. Really crappy at disseminating programming information and updates in any real usable way. Their own books (for example Training From the Source series the Programmer's one) were obsoleted by the 7.2 update in a way that made much of the advanced (actual programming not design meaning connecting to databases, etc. with remoting) dead wrong. However, no update on or anything in the text (and it had just come out). This could almost be forgiven if they was any other true programming book (until Colin Moock finally) that bothered to actually use correct AS 2.0 syntax AND use the screens, etc. in the Pro version. Too many long time Flash authors didn't bother to really use AS 2.0 in their books and the ones that did barely dug into any of the screens and other Pro version specific programming tools.
Then how about the Flash Dev Cert? The study guide was okay, but when you take the test it really felt more geared towards 'designers who know some programming'. I got asked more questions about dumb design environment stuff instead of class syntax, etc. You don't even need to own the Pro version to pass that thing. That is sad.
Then, when you pass it, Macromedia takes their own sweet sweet time updating the website and getting you your cert kit with logos for your site, resume, and cards. I have both the designer AND the dev cert and am STILL waiting for both kits.
The fact of the matter is that their was no real incentive for true developers to pick up the platform. The more I used it, the more I loved it, but felt like what I was trying to do was abandoned by them, and dumbed down so the designer only crowd could use some of the dev features. Truly sad as we all could have co-existed...
I thought Flex was watered down Flash when I first saw a beta over a year ago. All I can say is at least Macromedia is wrapping it in a way developers will notice it.
by FlasherToo on 10/14/2005 at 3:02:51 AM UTC
One of the possible reasons is the learning curve (and learning price). Learning HTML is reasonably easy, because the only tool you need is notepad and a browser, both of which come with your OS. Once you're familiar with HTML, learning DHTML is only a little more of a challenge, and then learning AJAX is only a tiny little extension on to that. All of this can be done with just a browser and notepad, by someone with just a little spare time on their hands.

Learning Flash on the other hand requires learning a completely new technology for web developers. Instead of dealing with tags, and text, and javascript objects, you're dealing with Frames, Scenes, and libraries of symbols. As a seasoned HTML developer, working with Flash presents a much higher learning curve than DHTML and AJAX.

AJAX can use your entire browser window, and can be easily scripted using ColdFusion, PHP, JSP, ASP, or a variety of other languages. Flash RIA apps utilize only a small portion of your browser window, and dont easily scale to larger or smaller windows.

Finally, Flash costs $700 for developers to get their hands on. AJAX requires only persistence, and notepad, or one of a few hundred free HTML editing packages out there.
by Adam Ness on 10/17/2005 at 7:51:46 PM UTC
I've been developing for the internet over twelve years now. And I've used Flash since version 3 (a very long time). Now that the credentials are out.

It doesn't matter, both sides have very useful applications and neither will simply die. AJAX is useful in numerous circumstances, especially when you want to provide more powerful inline form validation that includes accessing a database. Yes, yes, you can do that in Flash, but if a person doesn't have the flash plugin, oops. But what if they don't have javascript enabled? <noscript /> baby.

Okay, okay, but flash is great too, right? Yes, flash has it uses for _non-web-related interfaces_. You do NOT use flash for a site that's supposed to act like a normal web page. That's so counter-intuitive that it hurts. The new flash 8 is so freaking powerful when it comes to having the power both visually and programmatically that if you have any amount of skill at all with flash the future is a sweet place for you.

What you DON'T use AJAX for is building an entire HTML site in one page. It was never meant for that kind of application. It's purpose is augmenting the functionality of HTML, tying in the server-side abilities of php/asp/etc and expanding basic user-interactivity without breaking the standard web standard of HTML. And just like how flash breaks the web standard, it shouldn't be used for standard web usage.

The bottom line is that both AJAX and flash will withstand the ages. I like AJAX, which is rare, because I have general disdain for most new technologies (Ruby, .NET, etc.). But since AJAX is based on XML and the very old Javascript, I can't complain too much.
by Steven on 01/03/2006 at 3:24:39 PM UTC
Developing a Flash application is hard and complex. It is not for CSS developers. Most web developers cannot write basic Javascript functions, so I do not expect they can use actionscript. This is the reason why ajax becomes so popular. It is easy.
by Bruce Anderson on 04/21/2006 at 10:45:06 AM UTC
What about... FAJAX? =P
Ok, maybe not, but I've seen quite a few sites that mix and match JS and Flash. Would it be feasible to make different flash elements, turn'em into .swf's, and somehow use them in AJAX? Or would that defeat the purpose of easy development with AJAX? How pointless/beneficial would that be?
Just asking, I'm extremely new to the whole programming/scripting thing and my problem is... I'm stuck trying to decide where I should spend my focus. I'm just as green with JS as I am with AS2 and it's driving me crazy. I want to be in a position to grab one and run with it. With the way AJAX and Flash present their cases and answers to solving certain problems, I'm torn with understanding what will be needed more. Flash could make an all new kind of BOOM especially with the upcoming new release of Flex 2.0 using AS2 3.0. So what do I do?
The problem is with AS2, quite a few times, has brought me into JS for calling movies or whatever. Now, with AJAX it's like... "flash who? Let us simplify something for ya." On the other hand, AS2 says to me, "If you're new to programming period, this'll be a snap because you won't be distracted by other languages." Even better, the new AS2 2.0 .pdf's that came with the Flash 8 package REALLY got me in the game and has taught me a LOT. However, AJAX is still presenting an amazing case that I wouldn't be close to understanding if it weren't for the little bit I've learned since studying AS2.
Can you tell how mixed up I am? There's at least one thing I'm sure of, Flash isn't completely independent of JS. With that, maybe I'm to green to even worry about AJAX right now? Maybe I should stick to flash and basic JS and work my way up from there?
by Stuck on 05/23/2006 at 8:21:32 AM UTC
I wrote all of the above and found this:

http://dhtmlnirvana.com/ajax/ajax_tutorial/index_back.html#

" Before proceeding, it should be noted that ajax isn't a panacea. It has some problems that it needs to overcome as it continues to mature. But it is a promising field to be involved within and as the years roll on, it probably will greatly affect the way we think about building Web pages and Web applications.

It also needs to be clear that ajax isn't a technology as such but rather is a technique that combines well with other technologies and techniques. For example, xml, dhtml, css, xhtml. In fact, Ajax really is DHTML with the xmlhttprequest object thrown in. It is amazing to think how one object can change the whole playing field."
by Stuck on 05/23/2006 at 8:43:26 AM UTC
Take a look at the future www.seewindowsvista.com, a video flash interactive base webpage, can ajax do that?
by laszloRULES on 06/28/2006 at 10:15:22 AM UTC
I am a programmer who was working with JS, ASP, PHP etc. I Learned flash myself due to some development requests. I love flash for its abilities, but was never at home with the programming interface of Flash MX. As everybody knows HTML, JS, PHP,XML are free but Flash is NOT FREE. If Flex 2 is FREE, and is with a development environment similar to .Net Studio, then I may leave AJAX and use only Flash. If not, even though I love and appreciate Flash, I would be with AJAX. Being a server side programmer, the ability of Flash and AJAX to deal with XML Data stored in server is the fact that attracts me more than the movie creation abilities of Flash in which it is much simpler to use than AJAX. For a normal programmer like me who needs to works with an XML DB, using AJAX seems to be simple, and working with Flash seems to be complex (due to the unfriendly development environment), even though I know that the same can be implemented in both. Yap, the plus point for AJAX is that it is FREE and simple to learn for the normal web programming community who is already familiar with HTML, XML and JS. To use Flash for the same purpose, one should learn AS, buy Flash, and need to become familiar with the flash design tools. Flash mixes the jobs of the website designer and the programmer, which won?t be appreciated by normal programmers who don?t have much artistic talent. Yap, we don?t have something (artistic talent, money to buy Flash etc) and so it is better to be with AJAX. :) What ever Google, Microsoft etc is going to do, I am looking forward to AJAX + PHP development solutions.
by Sreenadh on 07/04/2006 at 6:54:41 AM UTC
flash sucks! it completely ruins ajax functionality on web pages.
by ajax_guerilla on 06/03/2008 at 8:32:12 AM UTC
flash doesn't suck with Ajax! in fact, here's an example of flash actually HELPING ajax:

http://flxhr.flensed.com

flXHR is a SWF-based, totally native XHR API compatible, ajax replacement for the native XHR object in the browser, but with full cross-domain support. The SWF is invisible, and is instantiated and controlled completely in javascript, just like with native XHR.

I think this project has the potential to really revolutionize how AJAX developers make cross domain calls, as it is way cleaner and more performant than the other ugly workarounds like IFRAME-proxies or script-tag injection.
by Kyle Simpson on 06/23/2008 at 5:50:36 PM UTC