Thursday, March 22nd, 2007

Flash vs. Ajax: It’s time to expand your toolbox

Category: Editorial

We are constantly getting asked about how Flash fits into Ajax (if at all) and the open web in general.

Dan Webb has changed his opinion, and tells us how It’s time to expand your toolbox.

Flash has some really quite incredible features that we struggle with implementing with HTML/CSS/JS: Sound, Dynamic vector drawing, Sockets, local storage, video. I could go on. Why the hell are we struggling with and VML? Comet is essentially a hack while XMLSockets are built in to Flash…and then you have Red 5. To add to this, Apollo has just been released which is looking pretty interesting. See what I mean?

The sweet spot for JavaScript and Ajax has always been for those small, progressive enhancements rather than for creating rich interfaces. It seems to me that the more you head in that direction with JavaScript the more serious limitations you encounter. Browser JavaScript is never fast, has memory leak issues, browser bugs, CSS bugs and all manner of other tom foolery that, when you get to the stage of building something like for Google Maps gets really time consuming and messy. There are many efforts (WHATWG, Tamarin etc etc) that are working toward solving many of these problems but for now and for the foreseeable future we are stuck with em. This, I think, is when it’s time to bring out Flash. Not for the whole app of course, but used in conjunction with HTML/CSS/JS. Flash however is not without it’s problems.

There are many sides to this story. Brendan Eich wrote a provocative piece on The Open Web and Its Adversaries.

Posted by Dion Almaer at 2:30 am

3.6 rating from 32 votes


Comments feed TrackBack URI

He is missing another competitor in the match: WPF/E
WPF is the new tech by MS for building windows applications… and the E at the end means Everywhere.
WPF/E is small subset of the whole .NET 3.0, just focusing on providing the same functionalities of Flash…
now it is still in CTP, but will probably ship in Q3 2007

Comment by Simone — March 22, 2007

But Flash is really Everywhere (win,mac,linux,some consoles,some handhelds) so for now is still the choice.

Comment by Andrea — March 22, 2007

Another one to look at is openlaszlo. Which was a big hit at Ajaxworld. With same code you can create javascript or flash projects and Sun has a project to compile to j2me.

Comment by Brandon — March 22, 2007

It’s correct! Flash has many tools and stability! Javascript in the “WAR OF BROWSER” is penality!

Comment by Giovambattista Fazioli — March 22, 2007

I remember back in the late 90s always shaking my head, and wondering why people are monkeying around with this web app business. The limitations of the stock browser are known. There’s only so far you can take it, and more importantly the standards technology from the W3C is going nowhere.

Someone mentioned WPF/e. I believe it is the tech that will finally get us back to real runtimes in the browser. Applets failed and Macromedia(Adobe) has always struggled with penetrating the app space, but Microsoft’s muscle will cause things to heat up.

Who knows, maybe applets will make a comeback…even after all the fumbling around that Sun has done over the years.

Comment by Rick — March 22, 2007

I must be getting bitter – After building several js-bases ajax apps, using everything from prototype, to yui to dojo, I keep thinking to myself, ‘this is all still just a hack’. Not to say that those libraries are not completely amazing technical achievements but they don’t not exist in some kind of vacuum, you still have css issues, and html issues, a.k.a. browser issues…sometimes I feel like programming these apps is like boxing…and I must not be a very good boxer because I always get some kind of black eye. Flash on the other hand is much more powerful then any clever js/css/html combo. Browsers are not (yet) some universal platform for app development…I just don’t buy it…it’s all too unstable…I’m mean, where’s my decent debugger? Venkman is cool and all but come on, I need like 12 different apps, ide, debugger, all the major browsers, firebug etc. Wake me when I have to stop worrying about browser versions and incompatibility, I’ll be over here taking building my flash app and not spending my time writing a cross-browser keyboard handler in js…I’m tired of boxing

Comment by Sean M — March 22, 2007

I’m with Brendan on this one.
The frameworks are maturing. Things like Dojos subscription and events mechanisms (I think YUI has something similar) and JDA’s wiring will with a little luck coalesce into open standards.

What is needed is better lightweight IDE support and better boxing (not the black-eye kind :), and again I think hehre will be some pleasant surprises soon …

Comment by Peter Svensson — March 22, 2007

I posted some similar thoughts on the whole Flash vs. Ajax thing back in January and came to the same conclusion.

Comment by Geoff — March 22, 2007

Is there a good open source app out there for creating flash? If so, please point me to it. If not, I’m not shelling out hundreds of dollars to Adobe to ‘flash’ up my work.

As for WPF/e … when the “E” part ACTUALLY makes it ‘everywhere’ … THEN you can talk about how great and how EVERYWHERE it is. My web stats show thousands of linux users. While M$ may be giving Mac WPF/e abilities, they have made NO committment to allow linux users to partake in their ‘excellence’. So, uh, how can you call your tech EVERYWHERE when it doesn’t in fact run EVERYWHERE?

A hacked up black-eyed boxer js/css/html may be … but at least it will get beaten up on every machine I run it on.

Comment by DigitaLink — March 22, 2007

Well, of course I have to echo Brandon’s comment and point folks to OpenLaszlo. It does a great job of abstracting away not just browser-specific warts, but Flash warts as well. We created it as an alternative to the Flash authoring tool which really wasn’t built for software engineers developers, cerca Flash 5. We liked DHTML’s declarative model (events + scripting) but like everyone in those days were tired of dealing with browser-specific issues. So we build a DHTML-like language that compiled to flash.

Fast forward to 2007 when browsers are much more consistent across the board. We now have a single high-level language that gives developers a rational, standards-based way to build complex applications. Anyone who has tried to build a large application using procedural toolkits knows their limitations when it comes to managing complexity.

It’s not for everything – JS toolkits still fill the sweet spot for incremental improvements to an existing site. But if you want to build a web-based applications with rich desktop functionality, it’s worth a look!

Also, Ajax and Flash are just the beginning. In the coming year, you’ll see runtime support for many new platforms!

Comment by Max Carlson — March 22, 2007

I think flash is a good thing, I use google video to load web video on to website with good result.

Comment by einar arnarsson — March 22, 2007


Can you guys extend the datasource abilities beyond http GET/POST ? How about creating a generic XHR-type object that wraps XHR(ajax) and Remoting(Flash) ? The day I can use OpenLaszlo to talk securely to a server-side proxy is the day I will write an application with it.(At least the client piece!)

Comment by Karl — March 22, 2007

Geoff — If you are seriously interested in developing flash you can download the flex2 sdk(with compiler) for free and use it to build apps. Flash technology is much more then the Flash IDE, one look at or will tell you that. If by open source you mean free(which is what I’m gathering from your post) then the flex2 sdk will suit your needs.

Comment by Sean M — March 22, 2007

That post was actually meant for DigitaLink , sorry Geoff

Comment by Sean M — March 22, 2007

I know we’re all developers here (well I’m just a wannabe), but the decision to use Flash or Ajax is not always just technical or dev process one. Lots of times it’s political and/or driven by user needs and requirements. Some behind the firewall scenarios just don’t have Flash available, sometimes people have crazy ideas about why flash is good or bad and just won’t run it. So it’s more than just browser issues and development models we have to think about. I believe (and hope) most users just want a good experience, they don’t give $h1t what technology it’s implemented in though.

Comment by Andre Charland — March 22, 2007

Flash can be beneficial and add a deal of power to AJAX, i.e. video, vector, detailed animation, sound, etc. I think that developing something completely in flash limits the openness of an application. A combination of the two is the best option.

Small enhancements like the embedded flash based fonts for headers and sound plugins like the one scott schiller did with his soundmanager ( can add a great deal to an AJAx based app.

Comment by Daniel Rust — March 22, 2007

Why use Flash when unobtrusive Javascript means my web app can run anywhere… including mobile and FreeBSD?

Comment by Giggle Platypus — March 22, 2007

er what exactly can’t AJAX do combined with VML/Canvas and DHTML and XML? I don’t get it?

Sure Flash is faster because it downloads an control to your machine. Hell if we go this route, why not just create a standard that does it better than flash at all? Defeats the whole purpose of being reliant on 3rd party software.

Flash is good, not to knock it but the only thing I can see it do better than what AJAX combined with VML/Canvas, XML and DHTML can do is make browser based games.

Also Flash is NOT dynamically configurable/changeable on the fly like code is.

Comment by Peter — March 22, 2007

Question – how many of you who are knocking flash, have actually developed anything significant using it? From what it sounds like, not many…Take a little time and read up on the ActionScript language…you will see things like sockets, an e4x implementation, and real oop facilities, interfaces, inheritance…yeah, the real kind…strongly typed..and the list goes on. Talking about flash only being valuable for things like embedding fonts in pages is like saying eclipse is only good for syntax highlighting.

>>including mobile and FreeBSD? – The next time I need to write an app to run on mobile and FreeBSD I’ll use javascript, I promise.

>>er what exactly can’t AJAX do combined with VML/Canvas and DHTML and XML? I don’t get it? – Take a break from reading that prototype, dojo, yui, scriptaculous , billy-bob’s super dooper js library, vml, svg, css, javascript, comet, html and whatever other documentation, and read through a little bit of the as3 api, that might help you see the value in flash.

Comment by Sean M — March 22, 2007

@karl – great suggestions! I’ll put them on the list. FYI, we already have an XHR component that wraps datasets in an XHR API. We’ve shied away from Flash remoting because there isn’t really an analog in the AJAX world. We try to only add features that we can support across many runtimes. Also, we don’t currently support POST/DELETE due to limitations in the Flash player (early versions only support GET/POST). I filed a feature request to get this addressed soon:

WRT security, what’s stopping you now? Laszlo works well over https/SSL!

Comment by Max Carlson — March 22, 2007

DigitaLink, there are plans for a Linux version of WPF/E. Guess what though, even then it doesn’t mean everywhere. *BSD , Solaris, SkyOS, etc… No, Linux isn’t everything.

Comment by Rick — March 23, 2007

Eventually Vector graphs based GUI environments (e.g. XAML and MXML/Flash) win over the basic HTML/GIF-images, as desktop Windows apps did over Dos apps.

Comment by Ram — March 23, 2007

Ram, you’re exactly right and because the lowest-common denominator of browsers (i.e. IE) won’t have standard vector graphics, the only other option are plugins. (WPF/e and Flash).

In many ways, the browser is a step backwards in doing apps.

Comment by Rick — March 23, 2007

“the browser is a step backwards in doing apps” that really depends on who you ask. After all the desktop market is very limited and specific-target oriented. While the web, well you access the whole world and the whole world becomes your market, easily.

I hardly consider the browser a “step backwards” in doing applications. I don’t see why they couldn’t make the browser into something more down the line where it will allow for safe integration with a graphics engine either already existent on the clients computer or one that ships with it…although the downside is that it will become a fatter app. But hey look how big apps are getting anyways, these days.

As for the comment by Sean M. I think your missing the point entirely. The point I was making is that if you use FLASH, you have to download a flash component onto the client’s computer in order to run it, making the clients DEPENDANT on a 3rd party program. That IS always bad, especially for the web. My point is that if your going to download something to a client’s computer anyways, why even use flash at all? Why not just go with a full client-server solution that is more robust than flash. Hello why dont we all just a graphic engine like OpenGL or DirectX to do our programming? Hell in fact why doesnt the OpenGL or DirectX guys go the way of flash in the first place?

As for implying that JavaScript can’t be OOP, are you serious? ActionScript to me is JavaScript. Hell if JavaScript was allowed to install a component on the client’s machine, Im sure it could access sockets, etc… too!

Comment by Peter — March 23, 2007

I guess that’s where we differ in opinion, I feel, that in the case of flash, the pros of the flash plugin greatly out-weigh the cons… as do many others (

Obviously JS is capable of oop, it’s just that its support is not as robust as AS. Actionscript 1 was basically javascript, agreed, Actionscript 2 and 3 provide many other things that js doesn’t. AS is based on ECMAScript, but it’s more mature than js.

>>My point is that if your going to download something to a client’s computer anyways, why even use flash at all? – Because flash is technology that does its thing very well, it’s extremely lightweight and unobtrusive… unlike java applets or activex. The notion of opengl as a web technology is just silly.

Comment by Sean M — March 23, 2007

I have been in this game for a very long time… and can say with certainty that there is simply no reason NOT to use standard web technologies for building applications (games, embedded systems, etc. not included)

The features provided by Flex, Applets, YourFavoriteNewWhizBangTechnology, etc. are almost entirely “fluff” that typical users – and certainly most businesses – do not require.

Also, the ubiquity of the web and its standards-based technology is an asset that makes this (almost) an unfair fight. While Flash is certainly widely adopted, most businesses and government agencies simply will not permit that type of technology in their environments… and software development shops are ill-served by adopting non-standard technology platforms for application development.

I’m sure somebody out there is developing the best thing since sliced bread in Flash, Flex, or whatever… but good luck selling it.

Comment by Charles R — March 23, 2007

Well, the point still stands – OpenGl, true OO or not; js apps are deployable now – almost transparently (darn you, IE bugs! :), flash requires a download.

If, like someone blogged the last week; js “Is the new assembler”, what we really need are better tools to dream up solution which targets current ECMA standards, possibly with generic server-side components if needed.

The remaining 8% edge-cases are of course free to use flash or M$ flavour du jour as needed.

This discussion is kind of sad, because I feel that the Flash guys have really switched tracks the last six months; Tamarin, Eckels, low-key grassroot campains, et.c. I feel that they really have come down from any high horses.

However, as have been stated previously, Flash is closed – therefore dangerous. The ideal solution would be to pull a Schwartz and too-latedly do the right thing. But then, where’s the business model for that?

European pragmatic caveat for the above text; the Grouse is loose

Comment by peter svensson — March 23, 2007

“After all the desktop market is very limited and specific-target oriented. While the web, well you access the whole world and the whole world becomes your market, easily.”

And that’s the whole reason for the browser becoming somewhat of an applications platform. It’s all about sacrificing a rich interaction for the user and good developer tools for the deployment advantage for document-centric apps.

“I hardly consider the browser a “step backwards” in doing applications. I don’t see why they couldn’t make the browser into something more down the line where it will allow for safe integration with a graphics engine either already existent on the clients computer or one that ships with it…although the downside is that it will become a fatter app. But hey look how big apps are getting anyways, these days.”

They already do and they’re called plugins. The biggest problem is that you’ll have to deal with browser quirks and IE as being the lowest common denominator. If we only had to deal with Mozilla-based browsers then things would be a lot different. But Microsoft doesn’t have any interest in adopting anything that would jeopardize their desktop market, unless they own it (WPF/e).

Now that Vista is out, the bar is being raised as far as what users will expect out of their applications. Users won’t accept DOS apps anymore and the time will come when they won’t accept a stock AJAX browser app.

Comment by Rick — March 23, 2007

“I have been in this game for a very long time… and can say with certainty that there is simply no reason NOT to use standard web technologies for building applications (games, embedded systems, etc. not included)”

Charles, the fact that you have “been in this game for a long time” might be your problem if you’re not going to look forward. And the fact is that the W3C does nothing except fumble around and Microsoft has no interest in following Mozilla or adopting anything from the W3C (which does nothing anyway).

Comment by Rick — March 23, 2007

However, as have been stated previously, Flash is closed – therefore dangerous.

Don’t confuse Adobe’s runtime engine being closed, with how “open” Flash is. If Flash wasn’t somewhat “open” then there wouldn’t be openlaszlo.

Dogmatic ideology is more dangerous than flash being “closed”

Comment by Rick — March 23, 2007

Rick, Flash is a step backwards. Flash works off the client-server desktop model which is a niche market. The very definition of client-server means its a niche market. Flash may grow to become so accepted that IE or FireFox or whatever browser that holds the major stake in the marketshare may be “forced” to integrate with it, but until then, it is always going to have that stumbling block of asking the user to accept a download onto their machine to run it.

In this day and age of security breaches and ever-growing malicious hacker activity, you better bet the users are going to be more and more wary of anything and anyone asking them to automatically download and install something on the computer that they will have absolutely no control over once its installed.

THAT is flash’s biggest obstable…as well as the fact that it is a “closed” system that once the flash file is made, it cannot be quickly manipulated as code is and thus will never be accepted as a programming interface or a programming platform.

Don’t get me wrong designers will love it. Programmers wont.

Comment by Peter — March 23, 2007

Don’t forget about java – not necessarily applets as typically understood (which I think someone says Sun fumbled). With the right set of libraries (low memory usage, declaratively driven), java in browsers is alive and well – in fact, it can surpass the limitations of both Ajax and Flash (think large data sets across 1 or more ui elements across multiple tabbed panels, think performance, think low latency messaging). Better yet, don’t rule anything out – Ajax, java, html, dhtml – we need them all, plus whatever becomes popular and useful next year. (But also stay away from proprietary technologies) Let your use case decide – or better yet let your users decide – or better yet still, let the application adjust itself in terms of which technology it uses when – based on both user input as well as run time network, application or server behavior and health.

Comment by Ben Bloch — March 23, 2007

I’m not sure why some people think compiling your code is bad. Compilation is extremely valuable when building applications, it’s obvious, so I’ won’t go into detail. If you are in need of changing your application’s code on the fly, then I would argue that there is a problem with the design of your application. Also, the process of compiling a flash movie is trivial.

As far as the installation of the plugin, again, the proof is in the pudding, look at the census:

I’ve built quite a few flash-based applications for private industry and government agencies. In the cases(2) where the baseline didn’t have the desired version of the flash player on it, it wasn’t a big deal to get a waiver. I’ve have more trouble getting newer versions of browsers installed.

What is this fluff you speak of? Yeah, flash looks great, but I don’t think you guys have actually looked under the hood at all.

I’m a little bias as Java is my bread and butter but I agree with Ben, I wouldn’t rule Java out yet. Also, The reality of the situation is that there are amazing proprietary technologies…they are not going away…they supply part of the fuel which drives the industry. Picking the right ones is part of the trade.

Comment by Sean M — March 23, 2007

Peter, Flash 6 and above is on something like 98% of desktops worldwide. Flash is the most popular desktop software in the world (above windows). I believe Flash 6 is the minimum that OpenLaszlo requires. Flash penetration would actually be higher than javascript-enabled browsers (somewhere around 94%). So the whole downloading bit is a moot point. Flash upgrades are completely seamless (something that Sun never grokked).

Now the problem with Flash has always been pretty much a marketing issue to developers. Macromedia(Adobe) seems to have finally figured out how to market it as a RIA platform.

But the real happening that changes things is WPF/e. It’s not out yet, but obviously Microsoft will be able to push it out big time. Something only Microsoft can really do. The cool thing about WPF/e is that you can just send up markup and javascript if you want. No compilers or expensive development tools needed. In fact, the first developer version first doesn’t even have the mini-CLR engine (just Javascript and XAML). Of course, eventually you’ll be able to program it in any .NET language, which gives you the best of the both worlds.

WPF/e is going to push Flash into having real competition. But the premise that lots of people have and I believe is completely wrong is that the lowest-common denominator of the stock browser is going to advance. IE still dominates and has no incentive to adopt new tech.

Three years from now, Flash and WPF/e will be where AJAX is today. The problem with AJAX are the known limits of HTML, CSS, and Javascript.

Comment by Rick — March 23, 2007


FYI, we were able to get vector graphics working in IE as part of the OpenLaszlo 4 release, courtesy of the excanvas.js canvas emulator for IE VML. As a result, we have what I believe is the first implementation of a cross-browser and cross-runtime (swf and DHTML) canvas tag – we call it drawview. We also have complete feature parity across IE for our DHTML runtime. And it wasn’t easy! The kernel implementation could almost be split along the IE/non-IE axis – most of the browser-specific workarounds we had to put in are for IE… I’m sure everyone already knows that DHTML in IE can be difficult. We’ve worked hard getting consistent performance across browsers and Flash player versions, so you don’t have to!

Comment by Max Carlson — March 23, 2007

There is no arguing, openlaszlo is blazing trails. amazing

Comment by Sean M — March 23, 2007

There is no open source app for developing for the Flash platform, however the cross-platform flex command-line complier is totally free. With that you can develop apps for flash player 9.

Comment by Bryan — March 24, 2007

As someone who wishes the web to be as informationally-valuable, open and as search-friendly as possible, I feel “the web is not a movie.” To this extent, Flash movies don’t usually show up by themselves in search results.

I would be much more open to Flash were it a technology that didn’t rely on “unstructured” binary data as its source. This is the core of what for me, makes Flash less-valuable when compared to HTML. (Consider that on Google’s search results, PDFs are usually shown with a “view as HTML” link because the binary format is parseable, and has some semblance of structure.)

While more challenging to develop comparable UI experiences in HTML, the counter-argument for HTML is the semantic value of the data, its clear structure and “openness” due to its plain-text nature.

Taking the view that the browser was developed as a document viewer, it makes less sense to be building large applications on it. It’s challenging and fun, but does seem a bit odd. At the same time, if valuable information can be conveyed, indexed and found by search engines by a particular application, I think it’s worth doing in HTML. If an application does not provide data worth searching for, then I would consider the value of Flash or other technologies which could deliver the experience without “semantic value” considerations.

I’d love to see a version of Flash which would read, parse and render HTML as its source data/layout language (just a wacky idea.) In a similar vein, Max Carlson and the Laszlo team should be noted for their efforts in aiming for similar UI experiences between Flash and DHTML.

Comment by Scott Schiller — March 25, 2007

It is quite possible to prepare the html, which surrounds flash content, so that search engines can index them and provide easy access to the flash content contained within, including their specific subsections or various animated states, whatever…it’s just that most people don’t know how to formulate that solution, and why bother, html already provides an easy way to do that. Flash’s focus is not the ‘semantic web’…and the web is more than just a way to find well structured information…web services illustrate, the web it IS the network…providing a mechanism to connect people and services…not just find well structured information. Adobe is moving flash into the application space…to be a tool for building applications, not just flash movies. Adobe, and Macromedia before that, never intended Flash technology to rival html. Their investment and development in their Dreamweaver product is proof enough of that.

Comment by Sean M — March 25, 2007

I must be in a timewarp.
It takes a couple of years of Ajax masturbation to once again realize that Flash was and always be richer and easier to develop in?


Comment by Uh — April 3, 2007

I just had to follow up on this thread. I think it’s interesting that Flex is now becoming open source, officially. I’m not sure if that has any impact and the previous anti-flash posters but here’s the link.

Comment by Sean M — April 26, 2007

The main knock against flash that is always used is that it’s not search engine friendly.

This is a point that I have never heard anyone make in FAVOR of Flash. In all honesty, I’d rather NOT give a robot/spider the ability to navigate a web application (not to mention submit data with page calls.)

If I wanted that, I would load XHTML into flash.
That’s my preference. ;)

Comment by blitzzz — October 24, 2008

Leave a comment

You must be logged in to post a comment.