The future of RIA is JavaScript not Flex or Silverlight
September 8, 2008
With the advent of Web 2.0 a new concept became the most sought-after technology for web applications. Popularized by Google’s GMail, rich internet applications or RIA very quickly became the need of the hour. At the heart of RI applications was JavaScript, a scripting language for the web, that was in existence long before Google was even born. Google, with its GMail, demonstrated what could be achieved with JavaScript and thus paved the way for the next generation of web applications.
JavaScript had its own problems. The biggest of them was probably cross-browser compatibility. Led by Microsoft through its Internet Explorer web browser, JavaScript quickly became a victim of non-standard usage. Microsoft, in order to prove its dominance over Netscape, supplied browser objects and functions that could be used to generate ‘cool’ effects in a web page easily. These were never ratified by any standards bodies. Since Microsoft was dominant on the desktop and also bundled IE with its Windows operating system, the exponential growth of IE in popularity apparently vindicated their arrogant violation of established standards. Netscape died under Microsoft’s onslaught and so did the standards of JavaScript. Developers started writing applications that were IE specific. It was not uncommon to see applications labeled “Best viewed in Microsoft Internet Explorer”.
The arrival of Mozilla’s Firefox web browser changed all this. Users, plagued by IE’s numerous vulnerabilities and instability, adapted to Firefox. Firefox implemented a more standards compliant version of JavaScript. So developers started writing rich applications that used standards compliant JavaScript. Even then there was one more problem with JavaScript and that came to the forefront due to RIAs. This was performance.
Some of the leading vendors saw an opportunity in this short coming of JavaScript. Notable amongst them is Adobe and more recently Microsoft. Adobe’s Flash technology was initially meant to serve the multimedia needs of web applications. Flash was great for animations and effects, for video and audio playback, for slide shows and image manipulations, but it was never meant for rich internet applications. So enter Adobe Flex, a technology based on Flash, but offering widgets and controls for business applications. Cross-browser compatibility was achieved but at the cost of an added Flash plug-in. Not to be undone by Adobe, Microsoft entered into the fray with its Silverlight software. Silverlight did all the cools things that Flash did and also needed a plug-in to run. It seemed like JavaScript was doomed.
Mozilla and Google had different plans. Mozilla’s Firefox 3.1 browser, still in testing, and Google’s recent Chrome web browser breathed a new life into JavaScript applications. In Google Chrome, Google introduced the V8 JavaScript virtual machine that offered significant performance boosts for existing applications. Mozilla has incorporated the new TraceMonkey JavaScript engine that has reportedly achieved performance boosts of up to 85%!!! With these two products JavaScript is surely set to make a come back.
As things stand, JavaScript has overcome its two worst adversaries – cross browser compatibility and performance. With the availability of brilliant libraries like Yahoo UI Toolkit, Dojo toolkit, etc. that help ease development of RIAs, JavaScript is here to stay and the way to go for future applications. For a JavaScript performance comparison study click here.
Entry Filed under: AJAX, RIA, adobe flash, adobe flex, google, google chrome, javascript, microsoft, microsoft silverlight, rich internet application, web browser. Tags: adobe, chrome, firefox, flash, flex, google, google chrome, IE, internet explorer, javascript, microsoft, mozilla, silverlight.
15 Comments Add your own
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed
1. Sebastien Arbogast | September 14, 2008 at 9:47 am
Who the hell are you trying to convince with this bullshit? Mind you, performance and cross-browser compatibility are NOT the biggest weaknesses of Javascript. There is still one BIG issue to be solved: durability! By durability I mean extensibility, maintainability and flexibility. JavaScript is to RIA what PHP is to client-server: the toy for the lazy boy, but when you do real-world stuff with hundreds of thousands of lines of code, unit testing, professional interfaces, JavaScript is nowhere near Flex. When JavaScript will have real OOP, static typing (I know it’s not hype, but hype is not always what you really need), XML syntax for UI description, built-in databinding, then we can talk about it.
2. Prosenjit Bhattacharyya | September 14, 2008 at 12:05 pm
@Sebastien Arbogast
I have been working with UI frameworks for well over a decade now. Flex is far from being a great tool. Flex is more qualified to be a “toy for the lazy boy” than JavaScript. The bane of JavaScript has been its flexibility. As for reliability and maintainability, Flex does not measure up any better. I have worked on projects with millions of lines of code that have deployed JavaScript in a very efficient and elegant manner. Maintainability and extensibility are also influenced by the competence of the developers and the development architects, not just by the nature of a language. As for the other features that you expect from JavaScript, well they are features of a full blown language than a scripting language. If you love Flex because of those features which otherwise you would have to code for, then it just proves that people who prefer Flex are the lazy boys.
JavaScript is meant to help the UI and not be the UI itself. There is a vast difference between these two facts. JavaScript is supposed to complement the HTML written or generated through other brilliant technologies like JSF and not be the whole and soul of the UI. Flex introduces a lot of issues. It cannot be deployed in environs where CGI programming is used. It gels well with ColdFusion but with Java there are problems. I haven’t seen anything on making Flex work with .Net. JavaScript delivers in all those fronts.
3. Sachin | September 14, 2008 at 9:41 pm
In my experience, JavaScript on the UI front is really powerful if you want to develop applications which has limited set of functionality to handle user events or do some DHTML magic. In addition to that, there is hardly any more tricks left with JavaScript. Lets talk about applications which are coming for future, please let me know how you will create Google Finance or Yahoo Maps like experience with JavaScript. What Google Maps had done was fantastic, but what Yahoo Maps delivers is way better than Gooogle Maps.
Thick client was always a option to go for RIA and that is the truth. You might have worked a lot on the UI but I will respectfully disagree that, JavaScript is not enough! Industry is mature, there is no need to torture yourself with clumsy JavaScript coding which needs to be optimized for faster performance if you right bulky code. GWT, well that seems to be doing the right thing, and if that doesn’t help to create massive JavaScript RIAs, I will be surprised.
I am really surprised by your comment of Flex gels well with CF but not Java. Well, in my understanding and Experience Flex can understand xml as data source. Were you not able to generate quickly xml or what problem you faced which made you jump on the conclusion? I think Flex has really simple way to consume xml as it supports E4X. Something you have missed buddy.
Cheers!
4. Prosenjit Bhattacharyya | September 14, 2008 at 10:29 pm
@Sachin
Good observations. In fact I used to think that there was nothing more to be done with JavaScript and every time I thought that, somebody did something new with it. Google Maps is probably a result of very cleverly written JavaScript code coupled with other things. But I do not see any Flash there. If Google docs can be created using only JavaScript, I am very confident that you can also do a Google Finance with it.
I agree with you that there is no need to write a lot of fancy stuff with JavaScript because there are quite a few brilliant libraries out there. But the fact is these libraries make use of JavaScript only and nothing else. They have already done the dirty work for you and so there is no need to recreate them.
GWT results in a single HTML page application that contains a whole lot of JavaScript and HTML code. So there is no Flex/Flash there either. What GWT has done is bring Java Swing programmers a nice tool with which they can quickly cook up UI code and wire it with background services. In fact take a look at the Echo 3 framework. They also let you program web applications in Java using a Swing like approach.
I have been working on integrating Flex with Java for quite some time now. I have faced a lot of problems. We have worked around those. What I did not agree with is that there is nothing extra that Flex offers that is not already existing in technologies like JSF, etc. Yes Flex does handle XML well but the same thing can done using JavaScript libraries like XML for (http://xmljs.sourceforge.net/). Thats the main reason I am not very excited with Flex. If you argue about the look and feel aspect of applications, then that can be achieved using DHTML also.
5. Rogerv | September 14, 2008 at 10:48 pm
HTML/CSS/DOM/JavaScript continue to fragment in a multitude of different implementations and in more and more combinations.
Adobe Flash Player is on ~ 95% of the browsers that surf the Internet. Hence it is the most ubiquitous web programming platform that exist – dwarfing HTML/CSS/DOM/JavaScript – which again, is splintered across different OS, browser, versions of browser (like IE6 vs IE7 vs IE8), and combinations of technology (Apple’s JavaScript + WebKit or Google’s V8 and WebKit – even Firefox is shifting gears on JavaScript runtime.
Then there is the fragmentation of frameworks: prototype, DOJO, jquery, sprout, or GWT – the list grows everyday. Because of the inferiority of the JavaScript language, these different libraries and frameworks are problematic to mix and match for favorite features and widgets.
Flex does a superb job of delivering consistent results across all of these. Flex running in Chrome behaves the same as it’s Firefox, IE, Safari, and Firefox on Linux counterparts. It takes a lot of effort to pull off similar result with the HTML/CSS/DOM/JavaScript stack.
For enterprise development Flex is a no-brainer choice relative to HTML/CSS/DOM/JavaScript. They can build quality business software at controlled cost and yet even reach ~95% of the Internet consumer audience with their Flex RIA apps as well. Enterprise IT has never had it so good when embracing Flex as the GUI client solution.
The shops building for the Internet consumer market, the choice of Flex is not quite as automatic. A lot of those sites tend to be content centric and Flex is still not as mature for handling content rich orientation (though that can change in time, and for AIR apps, its already addressed). Yet if a site makes sense to be built as RIA, and controlling cost of development while delivering superlative results is desirable, then Flex is quite compelling vs JavaScript AJAX. Mix Flex with Flash rich media, then that makes it more so.
Microsoft drove a stake in the heart of JavaScript by keeping it limited to ECMAScript 3. They did this on purpose as a blow against Adobe, which implemented ActionScript3 based on ECMAScript 4. The problem is that ActionScript3 is a really great programming language – ECMAScript 4 is the difference between night and day. It brings JavaScript up to capabilities that make it easier and lower cost to develop in – and most espcially for larger scale complex apps. It has modularity and namespace encapsulation down, plus Flex has a component GUI model. These things combined make for a superb base to mix and match widgets, libraries, and frameworks from diverse sources. That is why the Flex developer community is so rich in these things relative to the plain JavaScript universe.
The ECMAScript 4 specification made all the difference in the universe – and Microsoft laid an eternal curse on JavaScript by torpedoing adoption of that spec. Even with the advent of Chrome, and as exciting a creation as the V8 runtime is, it doesn’t materially alter the reality that exist for HTML/CSS/DOM/JavaScript. It will remain fragmented all over the map for years to come. Even if Chrome reaches adoption level of Firefox, it still doesn’t homogenize this so-called platform.
The universal web platform that exist right now is the Adobe Flash Player.
6. Rogerv | September 14, 2008 at 10:59 pm
What is really rather silly (to the point of being hilarious) is how boosters of JavaScript AJAX development keep pointing to great apps like Google Maps and Gmail.
The problem is not that many development efforts can apply the wherewithal that Google can to such endeavors. The entire excruciating experience of creating Gmail was an impetus to them for undertaking GWT, yet GWT pales when held up against Flex as a RIA platform (I had GWT evaluated for weeks and then dumped it for staying just with Flex).
Flex is far more economical to develop because you get great results without heroic (i.e., expensive) effort in making really polished RIA apps.
7. Sheesh | September 14, 2008 at 11:14 pm
Nice! Unit testing in Flex, Sebastien, seriously!? Have you actually done it!? It is the worst excuse for unit testing that I have ever seen! I think there is a handful of JavaScript frameworks out there that will put it to shame in this respect!
Given the complete alpha (not even beta) feel of Flex’ quality (the pathetic rip-off of an Eclipse plug-in, the mountain of bugs in the current Flex SDK), Flex is nowhere near being a solution you’re trumpeting it up to be. I’m sure it’s a step up from whatever other crap Flash developers have had up to this point, but there is a brave new world out there…give it a try!
8. dartmerc | September 15, 2008 at 12:52 am
A good read, but I have to disagree that Javascript is the defacto victor (although I think it could well be, depending on how well Chrome fares).
In any light, I think it was an interesting article and covered one aspect of the browser wars I wasn’t aware of prior.
Thanks.
9. The future of RIA is JavaScript not Flex or Silverlight « Rich Internet Applications | September 15, 2008 at 1:01 am
[...] Source [...]
10. Peter Svensson | September 15, 2008 at 3:50 am
Some points;
1) The problem with JS coding has not been the excellent language, but the sucky DOM implementations.
2) One of the major feature of all JS frameworks is to present consistent features and functionality across browser. Granted, Flash/Flex/etc does this even better, and without fragmentation, but just so you know.
3) My personal reason for _really_ not liking Flash/etc is that it is not transparent. You have this blob on the page and you have to have special tools to look at it – contrary to all other stuff there.
4) The Major JS framework (Dojo, jQuery, Ext, et.c.) all have very strong modularization features, like ‘trueish’ class-based OO, hierarchical widget systems, message buses and data store abstractions, to name a few.
5) JS exist on 99.5% of all browser. Neener Neener!
6) Silverlight will never get adopted because web developers hate Microsoft (for good reason). Flash/Flex/etc. will get marginalized because web developers really dislike opaque formats. And there’s the controlled-by-one-company issue again, of course.
7) Have you, by the way, seen the recent JS-only Dojo charting examples with animations and DOM events? ; http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/charting/tests/test_event2d.html
Cheers,
PS
11. Web 2.0 Announcer | September 15, 2008 at 10:14 am
The future of RIA is JavaScript not Flex or Silverlight…
[...]With the advent of Web 2.0 a new concept became the most sought-after technology for web applications. Popularized by Google’s GMail, rich internet applications or RIA very quickly became the need of the hour. At the heart of RI applications was…
12. Phani Mantravadi | September 15, 2008 at 10:18 am
Sebastian,
“JavaScript is to RIA what PHP is to client-server” – Quote.
What the heck do you mean by that? That statement makes absolutely no sense.
Javascript is one of many possible RIA solutions. So your statement effectively says that PHP is one of many possible client-server solutions.
I hope one of your tech leads reads that posting of yours. You’ll be fired before you know it.
Think, think…before making worthless statements.
Phani
13. onDevBlog() » Blog Archive » JavaScript le futur des RIA ? | September 15, 2008 at 11:17 am
[...] tombe ce matin sur cet article fort intéressant. Si Flex et récemment Silverlight ont su trouver un public en compensant les [...]
14. onDevBlog() » Blog Archive » The future of RIA is JavaScript ? | September 15, 2008 at 11:18 am
[...] found this interesting post this morning. Flex and Silverlight did address the short comings of JavaScript which are [...]
15. alex | November 17, 2009 at 11:27 am
nice write-up!
Personaly I believe RIA ruler will be Adobe Flex and Ajax.
there are also many jobsite on the tech is http://www.JobsRialto.com
- Alex