How JavaScript became a browser-war battleground
Published: 23 Mar 2009 15:46 GMT
...new and upcoming web standards including HTML (Hypertext Markup Language) 5 and CSS (Cascading Style Sheets) 3. But JavaScript provides the programming language to join all those elements into a website that does something, not just shows something.
"All that is mediated by JavaScript. It's really the control structure of the web," said Mozilla's Beltzner said.
The development race
JavaScript did not just catch on just yesterday: its popularity has been gradually building as programmers discovered how to use it to reproduce some of the interactivity of PC-based software in web-based applications. For example, in Yahoo Mail, people can click on a message and drag it to a folder. Collectively, this higher-end JavaScript technology is called Ajax.
"A couple of years ago, people started embracing new development models that were even more JavaScript-heavy than before," Beltzner said. "We were getting to a point where web developers wanted to do more than the browsers could handle."
In 2008, the JavaScript engines started hogging the spotlight in browser advancement circles. In June came Squirrelfish from WebKit, then Squirrelfish Extreme in September. Firefox announced TraceMonkey in August. Google touted V8 with its release of Chrome in September. Opera in February announced its aspiration to beat them all with Carakan, and later that month Apple touted the JavaScript speed of its new Safari 4 beta version.
"It was WebKit I think that really ignited the competition," Beltzner said. "Having somebody else play along [gave us] a way of us questioning our own assumptions about whether we have done the best we can do." And Chrome is "certainly keeping the pressure on".
Microsoft defends its priorities. "We're certainly aware of what the other browsers are doing," said IE senior director Amy Barzdukas. "Browser makers need to be sensitive not just to the cutting edge but to people who use the web."
JavaScript vs Flash and Silverlight
Microsoft also has another answer for those who want to build elaborate web applications: its Silverlight software, version 3 of which the company detailed on Wednesday. Silverlight competes most directly with Adobe Systems' Flash, the dominant browser plug-in used to provide applications with a lot of pizzazz.
The current trajectory of JavaScript means that it is encroaching more on the turf of Silverlight, which uses Microsoft's C# programming language, and Flash, which uses a JavaScript relative called ActionScript.
"JavaScript in Chrome almost reaches the speed of Flash," said programmer Mr Doob, who wrote Chrome Experiments called Ball Pool and Google Gravity, in a blog post this week.
In an interview, Mr Doob — a Flash programmer who learned JavaScript just for the Chrome Experiments and declined to give his real name — said JavaScript is about three-quarters the speed of Flash. There are weaknesses, though. For one thing, he found JavaScript developer tools to be primitive. For another, JavaScript varies from one browser to the next.
"The main benefit of ActionScript is that it will look exactly the same in any browser and in any version of the browser, even on IE6! With JavaScript it depends on which features the browser supports so you would spend more time making sure the project looks good in all the browsers than actually developing the project," he said. To make his Chrome experiments work on other browsers, he explained that "I'll have to introduce some hacks which will slow down performance and will dramatically affect the user experience".
Typically, though, as programming technologies mature, they settle into standards and get more refined tools. For now, performance is the top priority — at least until JavaScript gets fast enough that other problems move to the fore.
"All it took was a little competition to get other companies focusing on this problem," Google's Fisher said. At some point, "Suddenly this problem won't be a problem anymore and we can move on to the next issue."
Credit: Browser war centers on once-obscure JavaScript from CNET News












