VIENNA, Va.-Douglas Crockford, a JavaScript architect at Yahoo and founder of the JavaScript Object Notation, says he wants a browser war. Well, with Google’s introduction of its Chrome browser Sept. 2 he just may have it.
During a keynote at the Rich Web Experience conference here Sept. 4, Crockford said the term “Web time” used to mean “fast,” but not anymore. The last time ECMAScript and HTML were revised was in 1999, an era when things happened fast on the Web, he said. “What happened then?” Crockford asked, questioning the source of that speed. “They had a browser war. I want a browser war,” he said, although acknowledging that the industry still needs to undo some of the pain of the last browser war.
“It turns out a browser war is a good thing,” although most of the pain will be borne by Web developers and users, Crockford said.
Crockford said innovation should be happening in research labs and not in standards bodies. Indeed, some of the “good works” in the Web world of late include AJAX, JSON, Google Gears, XDomain Request from Microsoft, and Google’s Chrome. “I’m not sure if Chrome’s going to be successful on its own or not,” Crockford said.
Moreover, Crockford said this time around in a browser war “the market must punish bad behavior.” Yahoo has a Graded Browser Support program where the company gives grades to various browsers, with “A” being the best and “C” being the grade for blacklisted browsers. The “X” grade is reserved for fringe browsers.
“My proposal is if a browser maker screws up we’re going to rate them poorly, and we can put significant pressure on the browser makers to stay in line.”
The benefit of Yahoo having its Graded Browser Support program is, “Web developers are under tremendous pressure to have their applications run on everything. But developers can look at it and say, If Yahoo is not supporting IE 5.5, why should I?” Crockford said. “We’re going to get a lot of inducement by all the browser makers to try to trick you so your site works only for them; we shouldn’t fall for that bait,” he said.
For his part, Crockford said because of the first browser war the industry needs standards. “Never again,” he said of the industry enduring another period like the mid- to late ’90s when Microsoft and Netscape engaged in a bitter standards war, because the companies were warring so much and making changes so quickly that “they put a lot of bugs into the network because they didn’t have time to get it right.”
Indeed, “the reason AJAX happened in 2005 instead of 2000 is because it took all that time for the bugs to get flushed out,” he said. “Microsoft has been condemned for having done nothing after winning the browser war. I contend that their doing nothing is the best thing they could’ve done because it led to innovation by others. Bravo, Microsoft.”
Crockford, who has been critical of some of the proposed Web standards, particularly the ECMAScript 4 proposal, said, “A revision to a standard is an act of violence; it causes pain and injury. Careless revision of standards has a huge social and business cost. Minimalism should be highly valued in standards.” Crockford then said the ECMAScript 4 proposal “lacked a credible value proposition and added a huge amount of complexity.” And he praised the Ecma working group governing the specification for abandoning it for an ECMAScript 3.1 proposal that “brings the standard more in line with reality.”
Crockford entitled his talk “Web Forward!” and said, “I’m really interested in how the Web goes forward-the Web’s been stuck and we need to get it unstuck.”
Crockford added that there is no such thing as Moore’s Law for software, but that software seems to be governed more by Murphy’s Law. “Rather than a doubling in productivity every two years, we see a doubling of software productivity every 10 to 20 years.” He noted major advancements in software and pointed to OOP (object-oriented programming) as the last major step in software development. But OOP has been around more than 20 years, he said.
“We’re still waiting for the next thing,” Crockford said. He said that next thing might be assembling software like Lego pieces using components. “We’re doing that now with mashups, and JavaScript is the mashup language.”
Meanwhile, Crockford said the Web is under attack and “browser security is the biggest problem for the Web. The weaknesses of the browser are hampering innovation.”
Crockford also noted that JavaScript is close to helping to get the security equation right, but it needs “object capability.” He said in an object capability system an object can only communicate with objects it has reference to. And there are three ways to obtain a reference: by creation, by construction and by introduction.
However, safe JavaScript subsets such as Caja, Cajita, ADsafe and Dojox.secure offer some safety now, and the Ecma technical committee governing ECMAScript has begun work on Secure ECMAScript, he said.
“The war is coming; I’ll see you in the trenches,” Crockford said.