Opera with extensions: Now can it replace Firefox?

What defines a platform - any platform - in today's market, is apps. If you have apps, you're on the map. If you don't have apps, you're webOS.

Just two short years ago, it would have been unthinkable for anyone to consider the JavaScript engine of any Web browser as the basis for a genuine software platform - something you could make a living from as an apps developer, rather than just a hobbyist. For many, JavaScript was something a Web page used to determine which browser was running, and if it was Internet Explorer, to make it refrain from doing certain dangerous stuff. But in just two years' time, not only have the JS interpreters in Web browsers including IE increased their calculating and processing speed by a factor of ten, but the security of browser-based scripts has improved from almost non-existent to formidable. And all of a sudden, you begin to wonder whether Larry Ellison overpaid for Sun Microsystems.

Now, with the entry of an abundance of third-party, open source libraries, led by the outstanding jQuery library by developer John Resig, coupled with the rapid evolution of several technologies claiming to be part of HTML 5 (despite claims from standard group W3C that HTML 5 hasn't gelled yet), JavaScript looks like a platform that could stand toe-to-toe with both Java and .NET. Meaning, with little or no up-front investment of money, and a rapidly diminishing investment of time for tackling the learning curve, you could conceivably write a linear video editor application on par with iMovie, that's deployed from the cloud, accessed on demand, runs in the browser, and beats any such editor ever released for Windows.

"JavaScript. . . apps" is no longer an oxymoron.

It's here where Opera Software, whose Opera browser has the smallest usage share of the world's top five, has an unprecedented opportunity to cash in. Last year at this time, while its Opera 9 browser performed like a Chrysler K-car at a demolition derby, it premiered an overwhelmingly improved Opera 10.5, literally gift-wrapped with gold and tinsel for the holidays. Goodbye, K-car; hello, Ram pickup. Within just a few weeks, the brand of browser that was facing obsolescence, lagging behind Google Chrome by as much as 600%, was beating Chrome handily.

Just since that time, the performance of development builds of all brands of browsers has at least tripled - in Microsoft's case, quadrupled with IE9. Competition in this market for free software has exploded to such an extent that not even Gordon Moore would be able to write a law that governs it. So today, a statement made back in February 2009 by Opera developer Jens Lindström appears more prophetic than it did at the time:

Referring to the design of Opera's latest "Carakan" JavaScript engine (which Opera sometimes refers to as an "ECMAscript engine" in accordance with standards), Lindström wrote, "Although our new engine's bytecode instruction set permits the implementation of a significantly faster bytecode execution engine, there is still significant overhead involved in executing simple ECMAScript code, such as loops performing integer arithmetics, in a bytecode interpreter. To get rid of this overhead we are implementing compilation of whole or parts of ECMAScript programs and functions into native code."

The precise extent to which Opera is able to compile "whole or parts" of JS programs is something the company doesn't publicly talk about or publicize. Unlike Firefox, Chrome, or the WebKit engine of Safari, Opera is not open source (though it does contain elements that are, and which Opera Software redistributes under open source licenses). So when Opera's performance improves by double-digit factors, it's literally a surprise to everyone outside of the company's headquarters in Oslo, Norway.

Two weeks ago, a snapshot development build of what was being called Opera 10.70 started exhibiting very unexpected behavior, specifically with respect to a particular set of benchmark tests dubbed "SlickSpeed." These tests evaluate a common characteristic of open source JavaScript extension libraries - namely, the ability to logically address elements of a Web page using succinct CSS selectors, as opposed to complex objects. Compared with the stable builds of Opera 10.62 and 10.63, the new snapshot was running these libraries at least twice as fast, and as much as eight times as fast. And with respect to its own built-in CSS element selecting ability, the snapshot was processing instructions eight times as fast as well.

What appears to be happening (which no one at Opera Software, in discussions with me, will confirm or deny) is that the latest build of its JS engine is pre-compiling library code in larger chunks, into native code. Since JS libraries are built intentionally to be reused, the newest Opera appears to be optimizing the runtime speed of those libraries by simply caching their native code in memory and refraining from recompiling them with each reuse.

It's the type of speed jump that one might think would mandate a point release rather than just a refresh. And just as I was about to make that point in an article, Opera beat me to the punch. Starting last Thursday, its alpha builds of the next Opera browser were dubbed Opera 11.

Opera 11 with its extensions page

Google has made no secret about its intention to elevate Chrome to the platform level, marketing at least the idea (certainly not the hardware yet) of Chrome as an operating system. To do that, it opened up that browser to extensibility, at least in typical Google fashion - giving "Chrome apps" a single button on an exclusive bar in the browser. For Opera to compete, it not only needs to accommodate "Opera apps" in the engine. It needs to make them accessible through the browser. . . which to date has been something Opera Software is a little touchy about.

"We've supported widgets for a while now, and we've gone through the process of creating a platform for widgets that works, from a speed and a security perspective. We've opened up the technology and made widgets into Web standards," stated Arnstein Teigene, Opera's extensions product manager, in an interview with Net1News. "We've taken a lot of that knowledge and applied that to extensions. So we're inviting people to extend the browser. Widgets tend to live outside of the browser; but now people can develop stuff that sit right inside the browser, which we think is really great from an end user perspective. Of course, you have to be a little bit careful in terms of how you implement it, security- and speed-wise."

Opera has "supported" extensibility in the past, in the way that a toddler "supports" a hot bathtub by sticking just his toes in it and waiting until past midnight to jump in. Back in 2006 with Opera 8, the company implemented a concept it called UserJS (a concept simultaneously tried with a Firefox extension called Greasemonkey). Here, scripts could be set up on the client side to supplement or even override scripts supplied by a Web site, theoretically improving the functionality of existing sites and services. One such UserJS script still seeing action today among Opera users is Autosizer 2 by Arve Bersvendsen, which can effectively make any Web site's display of images into a resizable gallery. It's a useful utility, but one that needs upgrading with almost every new release of Opera, as the company's forums indicate.

There is a kind of UserJS community, but it's based around just a few scripts, and most of the activity seems comprised of users pleading for help. Meanwhile, on a separate development track but also beginning in 2006, Opera enabled the deployment of what it called widgets. Like extensions, they used Opera's JS engine; but unlike extensions at all, they ran outside the browser, and were intended instead to complement the desktop, like Windows Sidebar gadgets. Opera has tried to cultivate a development community around widgets, but as Microsoft itself discovered during the Vista period, just how many clock gadgets, slideshow panes, and network activity meters can a thriving community be expected to produce?

"We've taken a lot of the knowledge that we accumulated from widgets, and applied it to this," Opera's Teigene told us. "As a developer, you can create extensions using Web standards like HTML, CSS, and JavaScript. And Opera is the fastest browser in the world in a lot of tests, and we're super-fast because our rendering engine is super-fast, the JavaScript engine is super-fast. So we're applying that same technology from engines to extensions, so that we make sure extensions are snappy, that they work and respond well to end user interactions, and it doesn't compromise the browser experience."

Next: Extensions to what extent?

This article originally appeared in Net1News.

©Copyright 2010 Ingenus, LLC.

©Copyright 2010 BetaNews, Inc.

32 Responses to Opera with extensions: Now can it replace Firefox?

© 1998-2023 BetaNews, Inc. All Rights Reserved. Privacy Policy - Cookie Policy.