Why did Javascript/AJAX mop the floor with Java, Flash and Silverlight? Or, why open standards eventually win

Short URL: http://fsmsh.com/2946


It's not always true that the neatest, most advanced technology ends up winning most of the market share. There are other reasons which get in the way. Sometimes, the less advanced solutions end up winning -- and evolve in order to become more solid and established. An example of this is Javascript/AJAX, which has conquered most of the web-based client programming -- despite the fact that there were competing technologies which could (and maybe should) have easily won, purely based on technical merits. How did that happen?

What is a web application?

By "web applications", I mean interactive programs which run on any platform, and use, process or (often) display data available on a server. One important characteristic of such applications is that they run within the browser. Doing so has several important implications -- most of them security related. Web applications can only connect to the server they came from. If that weren't the case, I could create a web page with the "small" side effect of getting unaware visiting users to launch Denial Of Service attacks against anybody. Also, an application that runs within the browser can't access directly the local hardware and file system in order to prevent viruses and spyware.

Loser #1: Java

Java was created by Sun Microsystems, and -- most importantly -- was included in Netscape Navigator in 1995. That's 13 years ago! Java uses a virtual machine; this means that Java programs will run anywhere as long as a Java virtual machine is available. Java allows developers to create "Java applets" and "Java applications". The main difference is security (see the textbox): Java applets are expected to be found embedded in web pages, rather than installed, and therefore don't have full access to the underlying hardware. In 2008, I don't remember having seen a web page which included a Java applet for at least 5 years. Java has its niche markets: Java Server Pages (to create web applications ala PHP) and mobile devices (to create small applications). Android will probably push Java further (although it only uses Java as a language, rather than using the Java Virtual Machine). However, again, Java is nowhere to be seen in web pages.

Why? Because for the first 12 years of its life, Java's been proprietary. (Things are changing now. "Too little, too late".) Courageous people tried to write free, competing virtual machines, and managed. However, the problem was in the important Java libraries which Sun kept under a closed license for years and years and years. I am convinced that this problem also had technical repercussions on Java as a platform: Java applet were famous for crashing people's browsers in 1995 -- and they are still famous today for being immensely heavy and memory-hungry. I can only wonder how much better Java would be if the whole community were able to improve it and its libraries. Many also argue that the Java Virtual Machine -- and Java as a language -- is hardly fixable: the post I hate Java summarises some of the problems. (But, it is biased!) So, Java had all of the ingredients to become king in the web application domain: it was first, it was available in Windows and GNU/Linux, and it was ready. And yet, it was a closed platform and it had arguably big technical problems.

Loser #2: Flash

Just like Java, Flash was available very early, in 1997. Web authors could develop nice animations and more. It was better than Java (it didn't kill your browser) and it was easier to program. Fast-forward 11 years: Flash's main use is in video playing, and very little more. Adobe (which owns Flash) realised the potential of internet applications, and (about three years ago) released Flex. Flex, in oversimplifying terms, can be seen as a way for developers to create Flash files, using advanced libraries and advanced tools. Flex is absolutely fantastic.

The problem is that while the Flash player is "free" (that is, it doesn't cost anything although its source code is not available), Flex is outrageously expensive. And proprietary. [UPDATE: no, it's not expensive. It's been open sourced, and you don't need a Flex server to deploy Flex applications -- thanks Ben Forta!] And it creates applications running in a proprietary player (Flash). I have seen Flex. I have met some of the programmers who worked on it. They knew what they were doing. They were smart. They knew the internet -- I considered them internet magicians. However, nobody likes to fork out large sums of money in order to buy (or deploy) the development tools [UPDATE: this is no longer an issue], and nobody likes the idea of depending completely on the financial health and ethical principles of a single company. I think Flash and Flex are way superior to anything I have ever seen. If the Flash player were released under the GPL, its specifications fully documented [Note: this is still absolutely crucial], and Flex was released under a free license (maybe BSD-like?), then there could be a big chance of a huge market shift towards Adobe's technologies. Trouble is, it's not going to happen -- and it might even be too late.

Loser #3: Silverlight

.NET is Microsoft's answer to Java: it compiles things into bytecode, it's multi-platform, etc. Technically, many argue that it's "Java as it should have been". .NET isn't free: while the virtual machine and the language itself are ECMA standards, Microsoft's GUI libraries and other key components aren't. This means (surprise surprise) that you can't write a .NET program for Microsoft Windows, and run it under GNU/Linux, even though there is a .NET virtual machine for GNU/Linux (called "Mono"). If .NET is Microsoft's answer to Java, Silverlight is Microsoft's answer to Flash. Silverlight allows you to run .NET applications within your browser. The site silverlight.net is Silverlight's official web page. Although it's defined "Multi platform" by Microsoft itself, GNU/Linux is completely ignored (there are Windows and Apple downloads).

Silverlight might erode Flash's tiny market. I don't think there's any difference between Flash and Silverlight: two competing products which are losing the Web Application race.

The winner: Javascript + AJAX + XHTML + CSS

Javascript was available with the very first version of Netscape Navigator, as a way to add "special effects" to web pages. Nobody would have thought that it would eventually evolve into something that could be used to create applications like Google Documents. Established libraries like Yahoo's YUI (as well as many others) simplify immensely the creation of web applications. Most people who work online are already familiar with XHTML and CSS. So, the learning curve to master Javascript and AJAX is not too steep -- new developers join the Javascript/AJAX crowd every day. Technically, the combination of Javascript, AJAX, XHTML and CSS is something that has needed some love for a long time. Things are getting better now, but even today while developing a more complex web application using AJAX, you feel that they are all pieces of a large puzzle, and sometimes it's a bit of a struggle to make every piece fit neatly.

Why did such an unlikely combination win such an important war? Because it's based on available, open, free technologies. People don't have to spend thousands of dollars to write Flex applications. People don't have to install Microsoft Visual Studio for Silverlight. And don't have to battle the technical difficulties of Java (if it were still an option).

AJAX developers run their browsers, install Firebug, and voila: they are ready to go. They need to know XHTML, CSS, Javascript, some XML, how to use the AJAX calls, and they are good to go. Yes, they are projected into a world that feels hacky at times, and they might end up battling the eternal enemy, namely Internet Explorer. However, it's a small price to pay. And, things are only getting better.

Welcome to 2008.



Edmundo Carmona's picture

And that is in case you're not using a wrapper like sajax that almost removes completely the "burden" of learning ajax stuff (as a matter of fact, www.dondeestara.net, one project of mine, uses ajax... and I barely know the name of the ajax functions that make it work.. thanks to sajax).

BenForta's picture
Submitted by BenForta on


Some important corrections relative to Flash/Flex ...

>> Flex is outrageously expensive.

Actually, nope. Flex Builder is a commercial Eclipse plug-in (although it is not outrageously expensive). But Flex itself, the Flex SDK, is not. It's free, and open source. In other words you can build and deploy Flex apps completely free of charge.

>> If ... Flex was released under a free license

It has been, for some time already. Flex SDK is released under Mozilla Public License, version 1.1.

Sounds like you need to visit http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK to learn more about the Flex SDK.

Bottom line, you want free and open source Flex development? You've already got it!

Ben Forta
Adobe Systems, Inc.

admin's picture
Submitted by admin on

Hi Ben,

First of all, thank you for taking the time to create an account and add a comment.
OK, let's see...

1) Price. While Flex Builder is not very expensive ($700, or $250 I believe for the lesser version of it), I thought the Flex server was priced $15000. So... developers might be able to develop Flex applications, but what about deployment?

2) I wasn't aware that you guys actually _did_ release codee under the MPL. Encouraging! However, the "open source" version of the SDK doesn't include the advanced font encoding libraries (OK, fair enough), Adobe Flash Player (see my next point), Adobe AIR (which is used to create desktop-like applications, which is very interesting). And no, "free as in gratis" doesn't mean "free as in freedom" :-D

3) The Flash player! It's still proprietary, and there is no real competition in the free software world. As far as I know, the Gnash people are going insane trying to work things out. The player should be the _first_ thing Adobe should release... as well as turning it into a peoper standard.

So, the SDK (although only the "lesser" version) is released under the MPL, but then the server is something arounf $15000 per CPU, the player is still very much proprietary... ugh!

BUT! Ben, I LOVE IT when I am proved wrong, and I will openly admit it when I am. So, if I wrote anything that is not correct in my comment, PLEASE let me know.



BenForta's picture
Submitted by BenForta on

Ok, some more details ...

1) Flex Server is not needed for deployment. Actually, no server is needed. Any server that can serve content via HTTP can serve Flex applications. Flex Builder, or the free open source Flex SDK, compiles code into binary SWF files, and those get posted to a server and can then be requested by a browser and then played by the Flash Player. If that Flex application running in the Flash Player needs to talk to back end servers, then it has several options. It can make straight HTTP calls, nothing special needed on the server and no cost involved. It can make SOAP calls, again nothing special needed and no cost involved. It can make AMF (Flash Remoting) calls, and for that something is indeed needed on the server. If the server is running Java then you can download the free open source BlazeDS and you'll get AMF support (and more). If the server is running ColdFusion then AMF is built right in. If the server is running PHP then there are several community projects that provide AMF PHP support, and Adobe is working with Zend to add AMF support there. And so on. So no, no cost for deployment at all. Now, there is a server component to Flex, it used to be called Flex Data Services and is now called LiveCycle Data Services, and that does indeed cost thousands of dollars. It provides data management services and more, and organizations that need that functionality can/should look at that server solution. But it is not required at all. Bottom line, most Flex users buy Flex Builder and nothing more, and that's all they need to developer and deploy Flex and AIR apps. No per server pricing and no per CPU pricing, in fact, no runtime pricing whatsoever.

2) You are correct, we've open sourced parts of the Flex SDK, enough for most apps actually. There are 3rd party IDEs, like Aptana, that already use the free open source SDK giving users an IDE experience other than our own Flex Builder. But there are parts that we have not done so, not yet. It's a work in progress. Along the way we also open sourced the Flex messaging layer, that's the BlazeDS project. More will follow. And on a side note, Adobe is involved in numerous open source projects, starting with Tamarin which will be used by Mozilla in the next generation of SpiderMonkey, WebKit, SQLite, and more.

3) You are correct on this one, the Flash Player is not open sourced. There are some very real hurdles to doing so, the least of which is that the player includes licensed OEM code that we'd not be able to distribute. I can't comment on future plans, but I can tell you that it is something that we discuss frequently.

Bottom line, cost is absolutely NOT an obstacle to Flex adoption. Way back in Flex 1 days that was indeed the case, but we fixed that in Flex 2 several years ago, and since then the Flex developer base is growing incredibly. You said that Flex is absolutely fantastic, and as price was your primary concern, now that you know that price is not an obstacle I hope you get the chance to experience fantastic Flex for yourself.

Ben Forta
Adobe Systems, Inc.

admin's picture
Submitted by admin on


I did some good research, and you are right. I have actually talked to a developer who doesn't use the Flex server at all.

I am fixing the article accordingly -- sorry about missing out on important fact-checking. I should have known better.

But! I still feel that the proprietary nature of the Flash player will scare a _lot_ of developers away from it. I might be wrong on this one. I don't have hard numbers on Flash's adoption, and besides, I am obviously biased. However... I have to be honest, I would never develop a piece of software knowing that a single company basically has the power to decide who, how and when people can execute my program. And I am not talking about Adobe *today*, but Adobe in 10 YEARS, when [Random evil company] has bought Adobe out and decides that the Flash player is only released for particular platforms.

If you are talking about it, I *urge* you to talk about it more.

I am also sadly convinced that today, this would be a Flash world if Flash had been opened up (and made it into a standard) 4 years ago. I don't think we would have even heard of AJAX. And, I also wonder (again, with sadness) if it's not too late for Flash today...

Thanks again for the clarifications. I fixed the article accordingly.


Ryan Cartwright's picture

...the Flash Player is not open sourced. There are some very real hurdles to doing so, the least of which is that the player includes licensed OEM code that we'd not be able to distribute. I can't comment on future plans, but I can tell you that it is something that we discuss frequently.

I also find it encouraging to see people from Adobe at least considering opening up flash player abd for somebody from Adobe to be engaging with the free software community like this, so thanks.

If I can just echo Tony's sentiments that if you are discussing this, discuss it more. In addition, opening up Acrobat Reader would be another useful step - if only if it might lead to the Windows and Linux versions of both having comparable version numbers.

many thanks

cyberpython's picture

Well, as far as Flash and Silverlight are concerned, I agree with the author.
I also agree about AJAX, Javascript and XHTML+CSS being the big winner.
On the other hand, Java may have not managed to become the king of the web but I believe this is mainly due to MS not including a JVM with IE. Also, it is far easier to develop applications in a "traditional" programming language than in JS and XML. And there is where GWT (Google Web Toolkit) comes in and saves the day by bridging the Java language with AJAX, with a compiler that takes Java code and produces the corresponding html and javascript code! In my opinion, there is nothing better than being able to use Eclipse to develop web-apps!

admin's picture
Submitted by admin on


Funny you talked about the GWT...
I have always considered it complete insanity. But, by reading your post... well, I might well be wrong!

But I think Yahoo's YUI is a much better approach than GWT (although I don't know GWT enough to make an informed comparison. And no, I never will, since I am not a Java programmer...)


kakoskin's picture
Submitted by kakoskin on

It's way too early to say anything about silverlight since silverlight 2 is not yet released. Say you want to do some multithreading on you web page, it's pretty hard with AJAX isn't it ? With silverlight 2 it is trivial! Silverlight can expose functionality to javascript, also it's easy to call javascript from silverlight, take a look at this video if you don't believe.

szurcher's picture
Submitted by szurcher on

It's 50/50 odds on any webpage with flash I go to whether the player object will render or not (and instead produce a rectangle in a lovely shade of gray). Yes, this is in Linux. However, there isn't a single AJAX application I've run into yet that has such problems. In any case, it won't matter how wonderful Flex is if it produces objects my browser (Firefox) can't display.

The other benefit of AJAX is indeed that there is absolutely nothing "new" to be learned. It's a combination of existing web technologies completely supported by all modern browsers natively that we've been working with for years. Download a library and make a few extra calls to functions you don't have to learn anything about if you don't want. Can even Flex really compete with that?

mikese's picture
Submitted by mikese on

I guess thats one way to put it that AJAX and Javascript moped the floor with Java they have taken off with php and AJAX walking hand in hand now. There are some ok java apps java diameter being one but still nothing near the flexibility that you get with AJAX.

Author information

Tony Mobily's picture


Tony is the founder and the Editor In Chief of Free Software Magazine