Posts Tagged javascript

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


Express your opinion

I am on LinkedIn

View Prosenjit Bhattacharyya's profile on LinkedIn

Blogroll

Recent Posts

Top Posts

My Posts

Blog Stats

My Categories

apple app store future technology google google chrome google phone iphone iphone 3g ipod Kubuntu laptop Linux mac book macbook air mac book pro macbook touch mac os mbp microsoft mozilla new laptop notebook open source operating system palm smart phone Ubuntu Uncategorized web browser windows

My Tags

adobe android android market apple apple iphone apple iphone 3g app store call drop chrome firefox flex g1 google google android google chrome google phone iphone iphone 3g iphone 3g problem ipod javascript kde Kubuntu laptop lawsuit Linux mac macbook macbook pro mac os microsoft mozilla new apple laptops new macbook new macbook pro notebook open source palm psystar silverlight smart phone t-mobile g1 Ubuntu web browser windows