Posts Tagged firefox
JavaScript is the future of RIA
A few days back I had written an article about JavaScript being the future of RIA. Adobe Flex, Microsoft Silverlight, etc. are all nice and good to have. The fact of the matter is that a whopping percentage of people still prefer JavaScript when it comes to implementing RIA solutions.
To corroborate this claim of mine, I had been running a poll for quite some time now. After having got around 550 odd votes I think the time is now right to publish the results. The winner by a far and clear margin is JavaScript. Flex comes second. Here is graphic showing the results:
With the release of the new breed of web browsers that run on-steroid JavaScript engines this dominance of JavaScript in the field of RIA is most likely to increase.
The data presented here is not sponsored by any camp or company. Its strictly a poll that I ran in my personal capacity.
Add comment October 20, 2008
JavaScript for RIA gets yet another boost from WebKit SquirrelFish
Rich internet applications or RIAs are becoming a defacto standard for web applications. The selling point of RIAs is to provide responsive web applications that behave more like desktop applications than traditional web apps. Initially JavaScript seemed to be the only option for creating RIAs but it suffered from certain maladies, most important ones being performance and cross-browser compatibility. Taking advantage of this, Adobe came up with Flex and more recently Microsoft offered Silverlight. Both these platforms took away a portion of developers who were working on providing RIA capabilities in brower based apps.
With the popularity of Flex and to a limited extent Silverlight, JavaScript seemed to be heading for certain death until recently. The announcement of TraceMonkey from Mozilla and the subsequent release of Google Chrome that incorporated a JavaScript virtual machine called V8, JavaScript seems poised to make a come back. Both TraceMonkey and V8 have put the JavaScript engines on steroids and the reported boosts in performance are impressive. TraceMonkey is slated to be released with Mozilla Firefox 3.1 but interested people can have a taste of it by using the v3.1alpha releases from Mozilla’s web site. Chrome has already drawn rave reviews with its fast performance and responsiveness of JavaScript apps.
The latest salvo in this war between JavaScript and other technologies comes from WebKit. WebKit forms the core of brilliant web browsers like Apple Safari, KDE Konqueror and Google Chrome. The programmers at WebKit recently announced their own improvements in the JavaScript engine called the SquirrelFish Extreme. This new engine is supposed to be more than twice as fast as its previous incarnation. Here’s a graphic to show the performance boost:
According certain other studies SquirrelFish is reported to have beaten Google’s V8 and Mozilla’s TraceMonkey on performance. Click here for that study.
So is SquirrelFish Extreme the fasted JavaScript engine yet? Well we would have to wait for some more data to decide that one. But one thing is for sure – JavaScript is here to stay.
With all this attributed importance to JavaScript by the major players, the indication is stronger than ever that RIA developers would switch over to JavaScript once its major problems are sorted out. The work that is being done seems to be concentrating on this very aspect.
Is this the second coming of JavaScript based applications? Just wait and watch.
Add comment September 22, 2008
Google Chrome performs better than Firefox 3.1 Alpha 1 … at least for now
Reports have been rife that Mozilla’s TraceMonkey JavaScript engine would leave Google’s V8 in the dust. As of the latest build, this does not seem to be the case.
TraceMonkey is the new JavaSctipt engine that would be integrated in Mozilla’s next release of the Firefox web browser (v 3.1). Presently the alpha release of the browser is available for download and since its still alpha TraceMonkey is disabled by default. To enable TraceMonkey for Firefox 3.1a1, go to the about:config URL and add a Boolean preference with the name javascript.options.jit.content and set it to true.
I used the SunSpider JavaScript Benchmark tests to see how Google Chrome and Mozilla Firefox 3.1a1 measure up against each other. Here are the results:
Mozilla Firefox 3.1a1
Total: 2413.0ms +/- 1.4% 3d: 267.0ms +/- 5.8% cube: 89.4ms +/- 0.8% morph: 78.2ms +/- 2.6% raytrace: 99.4ms +/- 15.1% access: 340.2ms +/- 5.1% binary-trees: 42.8ms +/- 32.8% fannkuch: 156.0ms +/- 2.0% nbody: 101.8ms +/- 3.7% nsieve: 39.6ms +/- 5.7% bitops: 272.8ms +/- 1.6% 3bit-bits-in-byte: 51.6ms +/- 1.3% bits-in-byte: 67.4ms +/- 1.0% bitwise-and: 66.8ms +/- 4.6% nsieve-bits: 87.0ms +/- 1.8% controlflow: 31.6ms +/- 2.2% recursive: 31.6ms +/- 2.2% crypto: 167.0ms +/- 1.7% aes: 60.8ms +/- 0.9% md5: 53.0ms +/- 4.7% sha1: 53.2ms +/- 4.2% date: 201.8ms +/- 12.2% format-tofte: 122.2ms +/- 20.6% format-xparb: 79.6ms +/- 2.4% math: 257.0ms +/- 1.5% cordic: 114.0ms +/- 0.8% partial-sums: 91.2ms +/- 2.2% spectral-norm: 51.8ms +/- 8.4% regexp: 209.0ms +/- 10.2% dna: 209.0ms +/- 10.2% string: 666.6ms +/- 2.8% base64: 67.4ms +/- 2.8% fasta: 120.4ms +/- 3.3% tagcloud: 118.0ms +/- 4.9% unpack-code: 273.6ms +/- 4.3% validate-input: 87.2ms +/- 9.2%
Google Chrome
Total: 1291.8ms +/- 1.5% 3d: 92.6ms +/- 1.8% cube: 22.8ms +/- 13.6% morph: 39.8ms +/- 8.1% raytrace: 30.0ms +/- 10.2% access: 66.6ms +/- 4.7% binary-trees: 5.4ms +/- 12.6% fannkuch: 22.8ms +/- 4.6% nbody: 23.2ms +/- 17.9% nsieve: 15.2ms +/- 6.8% bitops: 49.2ms +/- 2.1% 3bit-bits-in-byte: 4.2ms +/- 13.2% bits-in-byte: 9.0ms +/- 13.8% bitwise-and: 14.4ms +/- 7.7% nsieve-bits: 21.6ms +/- 8.7% controlflow: 2.6ms +/- 26.2% recursive: 2.6ms +/- 26.2% crypto: 44.6ms +/- 2.5% aes: 17.0ms +/- 5.2% md5: 14.4ms +/- 4.7% sha1: 13.2ms +/- 7.9% date: 215.8ms +/- 5.0% format-tofte: 136.4ms +/- 3.6% format-xparb: 79.4ms +/- 10.1% math: 86.0ms +/- 4.2% cordic: 46.6ms +/- 6.7% partial-sums: 29.2ms +/- 1.9% spectral-norm: 10.2ms +/- 13.4% regexp: 309.2ms +/- 1.8% dna: 309.2ms +/- 1.8% string: 425.2ms +/- 2.4% base64: 53.6ms +/- 11.0% fasta: 46.0ms +/- 0.0% tagcloud: 117.0ms +/- 2.8% unpack-code: 148.8ms +/- 2.0% validate-input: 59.8ms +/- 0.9%
Well from these results it looks like Google Chrome is almost twice as fast as Mozilla Firefox 3.1a1 in its present form. Firefox trumps Chrome in the date tests and the regexp tests. In all the others Chrome outdoes Firefox by a huge margin.
Hopefully the final version that would be coming out of Mozilla will have better results.
1 comment September 11, 2008
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 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.
15 comments September 8, 2008
The new faster and better Mozilla Firefox 3.1

The next version of Mozilla’s Firefox web browser is 3.1 and its going to have quite a few enhancements in it. Some of the features that are planned are:
- Multi-threading support in JavaScript programs
- Built-in ability to play Ogg Vorbis music files
- Built-in ability to play Ogg Theora video files
- Improved document object model
- Significant performance enhancement in the JavaScript execution engine through the incorporation of TraceMonkey
The last one is going to have a major impact and can very well pave the way for the resurrection of JavaScript based web applications, a breed of applications that has been steadily losing market share to technologies like Adobe Flash/Flex and Microsoft Silverlight.
JavaScript has been around for a long time now and is used to enhance user experience of a web application. However it has been plagued with browser incompatibility and performance overheads. Mozilla plans to minimize the performance impact by using TraceMonkey. According the Mike Shaver, Mozilla’s interim vice president of engineering, with TraceMonkey the JavaScript performance nearly doubles compared to Firefox 3.0 that uses SpiderMonkey as the JavaScript engine. Also, with TraceMonkey, Mozilla brings 3D graphics and image editing capabilities to the JavaScript arsenal.
The following graphic shows the performance enhancement:

The figures seem to be to good to be true.
TraceMonkey is an amalgamation of SpiderMonkey and a technique called tracing developed at the University of California at Irvine by Andreas Gal and others. TraceMonkey is a just-in-time compiler that creates the binary file on the fly. The novelty about TraceMonkey is that it concentrates on translating selected part of the JavaScript code that are more performance intensive. This it does through tracing and recording program execution.
TraceMonkey is already built into the developer versions of Mozilla Firefox 3.1 but disabled by default.
Well the browser wars are back again and this time its going to be a lot tougher. Microsoft’s Internet Explorer had initially steamrolled Netscape’s Navigator through an enhanced user experience and developer experience. They offered DOM elements and JavaScript calls that let developers do cool stuff with their HTML and JavaScript code. Netscape could never measure up and died. Of course Microsoft’s dominance on the desktop helped the cause.
If Mozilla’s TraceMonkey offers this kind of a serious performance boost, it won’t be surprising to find developers writing applications that targeted Firefox specifically, just like those innumerous sites that would function properly only on Internet Explorer.
If Mozilla delivers on its promise, then the day is not far when we would be seeing applications that have a disclaimer saying “Please use Mozilla Firefox 3.1 for proper function”. And oh, by the way, Adobe and Microsoft, please take note.
1 comment August 25, 2008
On the other hand, Apple, in spite of being even more closed than Microsoft, has never come under the radar of the anti-trust laws. Firstly, Apple prohibits the usage of its operating system on any hardware other than Apple branded ones. The hardware that Apple sells has significant markups even though it is not necessarily superior. So for the same hardware capability, consumers pay an exorbitant price. Isn’t that anti-competitive? How is it then that Apple never comes under the scrutiny of the anti-trust sharks? When Psystar started selling computers with Apple Mac OS installed, Apple decided to sue to the company. Many thought it would be an open and shut case, but guess what? Psystar continues to sell its brand of Open Computers preloaded with Apple Mac OS. Psystar has also brought forward anti-competitive charges against Apple. Till date Apple has not won the case. So is there are a chance that Apple might come under the anti-trust laws at last?

