Contents after the jump due to the political (and highly contentious) nature of the content.
dojofoundation.org Is Up!
My warmest thanks and a hearty “congrats!” to the Uxebu crew and Dylan for getting the new dojofoundation.org site up and running:
The new site is important for a couple of reasons. First, it’s a good step in the direction of working to make clear that Dojo-the-javascript-toolkit and Dojo-the-foundation are completely separate entities with different goals and different leadership. The Foundation will take any and all projects that want a good home and are willing to meet the basic criteria that let others trust the code and process behind Foundation projects. It’s been weird that most of the documentation about Foundation policies and procedures has lived on the Toolkit site for so long, and having them be totally separate should help clarify.
Secondly, the Foundation site helps show off the projects which aren’t the toolkit. The Foundation has more than doubled in size in the last year (in terms of projects), and looks set to continue that expansion. That the Toolkit project gets the most attention has been a long-term irritant to nearly everyone involved, and it’s my hope that the Foundation site will help to fix that.
Lastly, the Foundation site is beautiful. Built with the Toolkit and Dojango, the site is a great showcase for the kinds of things that are easy to build with Foundation-sponsored technologies. Nice work everyone!
Why Are We Even Having This Discussion?
Content after the jump due to the public policy nature of the post.
Greg On Licensing
Greg Wilkins hits the nail squarely on the head:
At Webtide, we sell developer advice, custom development and production support for jetty and dojo cometd. We don’t expect our clients to buy our services because of some sort of guilt trip from the value they obtain from those projects. We expect our clients to pay for the value add that we give. The software is free under the terms of the apache 2.0 license and we expect no charity or moral obligation in return.
This pretty much sum’s up why most venture-backed Open Source efforts either fail so miserably at building real community or just fail miserably in general. Open Source – to my mind – isn’t some talisman you wave over software to instantly take market share from entrenched players or to instantiate your very own +5 Army of Contributors (with the zealotry bonus) for personal gain. Instead, it’s a great way to distribute software that should already be a commodity at near the cost of reproduction (roughly bupkis) and prevent network effects from ingraining outsized profits to firms whose marginal utility is suspect. If something is still worth paying for, it’s natural to expect that it won’t fare well in the world of free software. Too few people are liable to understand its value to create the virtuous cycle of contribution and use that makes the whole thing work. The great news here is that commercial software isn’t dead at all. It just has to actually be better.
Open Source (and to similar and complementary extent, open standards) helps drive Pareto-efficient allocation of capital in the software business. That may not be a high calling, but it’s a lot easier to justify than living off of monopoly rents for a living, and I take great comfort in knowing that what we do at SitePen adds amazing value (else we wouldn’t make a living at it). As with Greg and WebTide, people pay us for what’s actually scarce: clue, skill, and hard work.
delegate(), delegate(), delegate()
My MBP batteries keep dying after about a year (each). I usually have 2 that I tote around with me, and each tends to be good for 1.5-2hrs of actual work. This means that I tend not to be able to work through a cross-country flight, and particularly not if I need a VM for anything (which is most of the time). I think that if Apple does rev the MBP’s on the 14th, the things I’d pay for boil down to “more memory and much longer battery life”. The 5+ hour flight to TAE then provided a short window to do work in before I retreated to watching episodes of The Colbert Report on my phone. Knowing that i wouldn’t be able to work the whole time, I brought a copy of a great paper on Traits. The paper got me thinking a lot about dojo.declare() and dojo.delegate().
Today, Dojo’s delegate() function is a straightforward implementation of the Boodman/Crockford delegation pattern which Doug calls “beget” and which ES 3.1 will refer to as Object.create:
1
2
3
4
5
6
7
8
9
10
11
12
dojo.delegate = (function(){
// boodman/crockford delegation w/ cornford optimization
function TMP(){};
return function(obj, props){
TMP.prototype = obj;
var tmp = new TMP();
if(props){
dojo._mixin(tmp, props);
}
return tmp; // Object
}
})();
This function returns a new object which looks to the old object for things it does not itself have. Imagine an object foo which contains pithy truisms:
var foo = { science: "rocks!", learning: "is how you know you're alive" };
We now want to promigulate our opinions, so we can delegate the responsibility of forming them:
var bar = dojo.delegate(foo, { testify: function(){ console.debug("science ", this.science, "and learning", this.learning); } );
Now, our bar object can change its mind independently of foo, but until it does, it’ll behave as though foo’s views are its own:
bar.testify(); // outputs: "science rocks and learning is how you know you're alive" // bar refines its opinion bar.science = "is a process"; bar.learning = "requires humility"; foo.science == "rocks!"; // still true bar.testify(); // outputs: "science is a process and learning requires humility"
But what about when the chain gets deeper? The fact that bar can’t “see” foo’s values via this isn’t much of a problem when the hierarchy isn’t very long, but if you’re specializing a behavior or complex interaction, making it possible to get at the parent’s values for properties and methods becomes more pressing.
Neil has previously written about lightweight subclassing, but for as good as it its, it doesn’t get us all the way there either. In regular OO-style languages, the inheritance system gives you an out via a “super” keyword or convention. This type of property shadowing-with-exceptions is a huge boon to composition in class-based languages, but it’s not the whole story. Indeed, the Traits paper was all about the shortcomings of this special-purpose mechanism. What we want for both long delegation chains and long inheritance hierarchies is a more general system; in essence a way to say “I want to control how things are shadowed and which ones an item points at in each level of the hierarchy”.
What if we could make delegate() savvy of this type of indirection? Here’s my quick prototype:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
delegate = (function(){
var tobj = {};
var TMP = function(){};
return function(obj, props){
TMP.prototype = obj;
var tmp = new TMP();
if(props){
var remaps = props["->"];
if(remaps){
delete props["->"];
for(var x in remaps){
if(tobj[x] === undefined || tobj[x] != remaps[x]){
if(remaps[x] == null){
// support hiding via null assignment
tmp[x] = null;
}else{
// alias the local version away
tmp[remaps[x]] = obj[x];
}
}
}
}
dojo.mixin(tmp, props);
}
return tmp; // Object
}
})();
This new version of delegate() accepts a specially named “->” property in the list of items to add to the destination object. Items in this list can either “shadow null” (hide entirely) the parent’s property or can provide a new name for it, assuming of course that the new object will also have a property of that name. Here’s a quick example of “->” at work with our previous example. This time, foo also has a “testify” method that we’d like bar to be able to control without having to copy the implementation:
var foo = { science: "rocks!", learning: "is how you know you're alive", testify: function(){ console.debug("science ", this.science, "and learning", this.learning); } }; var bar = delegate(foo, { "->": { "testify": "grampsSays" // maps foo's "testify" to bar's "grampsSays" }, testify: function(){ if(this.science && this.learning){ this.grampsSays(); // call the re-named "testify" }else{ console.debug("this object is strikingly ignorant"); } }, }); bar.testify(); // outputs: "science rocks and learning is how you know you're alive" bar.science = false; bar.testify(); // outputs: "this object is strikingly ignorant"
That New Object Smell
The last missing piece of the hierarchy pie here is that there’s no initializer for the objects which come from a delegation. A simple addition of some property detection code to look for an initializer can easily handle that:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
delegate = (function(){
var tobj = {};
var TMP = function(){};
return function(obj, props){
// boodman/crockford delegation w/ cornford optimization.
TMP.prototype = obj;
var tmp = new TMP();
if(props){
var remaps = props["->"];
if(remaps){
delete props["->"];
// like dojo.mixin(), except w/o key/key mapping
for(var x in remaps){
// "safe" copy properties
if(tobj[x] === undefined || tobj[x] != remaps[x]){
if(remaps[x] == null){
// support hiding via null assignment
tmp[x] = null;
}else{
// alias the local version away
tmp[remaps[x]] = obj[x];
}
}
}
}
dojo.mixin(tmp, props);
}
// support for "constructor" functions. The name "init" is arbitrary.
if(typeof tmp["init"] == "function"){
tmp.init.call(tmp);
}
return tmp; // Object
}
})();
And there we have it. A style of delegation that easily supports both Trait-like name aliasing (and null shadowing) as well as internal initializers. Since our upgraded delegate can handle nulling out a parent’s value for a property, we also have a straightforward way to prevent parent initializers from being called (or being called/chained - at our discretion - by a new name):
var foo = { science: "rocks!", learning: "is how you know you're alive", testify: function(){ console.debug("science ", this.science, "and learning", this.learning); } }; var bar = delegate(foo, { init: function(){ this.testify(); } }); // outputs: "science rocks and learning is how you know you're alive" var baz = delegate(bar, { // map away the parent's constructor "->": { "init": "superInit" }, // provide our own constructor init: function(){ console.debug("howdy!"); this.superInit(); // call the super-object ctor } }); // outputs: "howdy", "science rocks and learning is how you know you're alive" var thud = delegate(baz, { "->": { "init": null } // hide the parent ctor }); // outputs: nothing
This form of delegate is likely to appear in Dojo 1.3 along with similar improvements to dojo.declare() to help alleviate the composition problems associated with using complex sets of mixins.
Update: corrected the null-out branch and updated the text with Doug’s note that beget/delegate will be called Object.create() in 3.1.
“Action Oriented Programming”
It’s good to be back in SF after a pretty hectic week in Boston for Dojo Developer Days and The Ajax Experience. There’s a lot to say about them, which hopefully I’ll get to in a longer post. Our first DDD event under Pete’s excellent leadership was a success and Dojo and SitePen very well represented at the conference.
While in Boston, Gavin and Jill joined a gaggle of Dojo hackers at a dinner ostensibly to mourn my birthday (thanks to Dylan and Pete for organizing!) and in the course of conversation Jill asked something along the lines of:
So why do people get so excited about closures?
Which prompted a several of us to flail and flop gasping the salt flats of analogy like fish out of polite-conversation water. After about 10 minutes of this, Jill succinctly summed it all up in the form of a question:
Oh, so it’s like “action-oriented programming”?
This is perhaps the most insightful and succinct description I have ever heard of what JavaScript is all about.
Update: Jennifer just played this for me and it gets right to the heart of this post: the important part of doing what we do with computers, and more importantly, with the web, is to give the power of Computer Science to real people…and it starts with insights like Jill’s that build a shared way of thinking and talking about the world. It makes me sad that many programmers miss that, but when non-programmers can share in the beauty and power of code, it does a lot to make it all seem worthwhile.
ZendCon Notes
I gave a talk on Dojo Wednesday at ZendCon, and when I walked into the room for the talk, there was some disorder as the conference center staff were taking out the tables to fit more chairs in. Even with the extra space, the room was totally packed, thanks in large part to the amazing Dojo integration work that the Zend team has done.
As of Zend Framework 1.6, you can include some trivial code inside your ZF views to pull in Dojo:
1
2
3
4
5
6
7
< ?
// setup required dojo elements:
$this->dojo()
->enable();
echo $this->dojo();
?>
Once enabled on your page, ZF 1.6 also includes a full set of helpers to let you set up Dijit components from PHP. The excellent ZF docs has the full story. Perhaps most exciting from my perspective, though, is how simple ZF makes getting up-and-running with Dojo and how nicely it ties in with custom builds and CDN-hosted versions of Dojo as well. Matthew Weier O’Phinney and Will Sinclair recently did a screencast that walks through a lot of these options. If you’re considering ZF+Dojo, I strongly recommend you check it out.
The talk I gave on Wed was mostly focused on Dojo and the reasons we built it in the layered way that we have and how you can choose to use Dojo at whatever level of abstraction feels right for your app. Slides are here (5.1MB, PDF):
Matthew Russell Keeps The Good Stuff Coming
Matthew Russell, author of ORA’s “Dojo: The Definitive Guide” now has a companion blog where he’s posting new widgets complete with screencasts to explain them clearly. His awesome first outing includes a neat reflection widget that builds on AOL’s high-performance CDN hosting of Dojo and practices what Dojo preaches about pragmatic progressive enhancement. Awesome stuff!
By The Numbers
Note: contents of this post is after the jump due to its political nature.
Thank Goodness…
Note: the rest of this post is after the jump due to it’s political nature.
The Appalling State of Tech Journalism: Reflected in the Chrome
Taking a page (or is it a post?) from Brad DeLong’s long-running laments on the state of journalism in general, I have been reading the coverage of the Chrome announcement and keep asking myself “why, oh why, can’t we have better tech journalism?”
Take, for example, ZDNet’s gutter-to-gutter coverage which, I’m afraid, simply ends in the intellectual gutter. Larry Dignan’s piece does the profession no favors by simply recycling the tried-and-true blogger formula for traffic generation:
I know about X, Google did Y, which is clearly *all about* X
The best of this flavor of “story” approaches the quality level of a plausible but objectively outlandish conspiracy theory, often pulling together bits of fact with a healthy dose of wild speculation (journalistically couched as the unfounded and unquestioned opinion of some supposedly credible third party).
ZDNet piles all aboard the loony-bin express with Paula Rooney’s “analysis” piece, helpfully asking the non-question “is this a prelude to Google acquiring Mozilla?”. In what twisted alternate universe would this wild, hair-brained straw-man garner a full ‘graf in a legit online publication, let alone a respected print daily? A small, tiny dig into the strategy of Google’s Mozilla search placement deal and the infrastructure of the Chrome browser would lead anyone (and everyone) to conclude that Google’s interest here is in keeping the browser a viable platform by any means necessary, not that they would ever gain anything by “acquiring” MoCo or MoFo (an even more nutty idea, since it would be difficult for a 501(c)3 organization to transfer resources and assets to a for-profit entity anyway).
The strategic and tactical incoherence continues with the daringly dumb quote:
Larry Dignan of ZDnet suggests that perhaps Google and Mozilla are working together as a tag team to defeat Microsoft’s Internet Explorer, and that Google may perhaps purchase the Mozilla Firefox crew and integrate the two code bases to deliver a kock out punch to Microsoft’s IE. Will Mozilla become Google browser labs? Given the close cooperation of the two projects, it’s more than possible.
Ignoring the incestuous and dubious use of a fellow reporter’s speculation as a source for an article, the idea that the Google would want much (if any) of the Firefox team (or vice versa) beyond those which they already pulled away. It does Google no good to reduce competition in the browser space, and one can imagine that there’s no love lost at Mozilla over Chrome, particularly after Google shunned the Firefox rendering engine, replaced the JavaScript engine, and re-built the entire visual and end-user experience from-scratch with completely different technology (i.e., not XUL). Good sourcing might have fleshed out the idea and perhaps even made a case for the theory, but alas, that seems far too much for ZDNet to produce on deadline. I mean, it’s not like they cover technology for a living…gosh, that’d be embarrassing. Quick tip for the next time they want to write this story: Google just became “Google’s browser labs” after giving Mozilla a good long run at it. They’re still strategically aligned, but Google seems impatient and is likely most interested in having direct leverage in the browser space (first via Gears and now Chrome) instead of the indirect influence they exerted over Firefox when it was still “Plan A”.
The coupe-de-disgrace belongs to PC World, though. After laying out 7 sensible, but “we’re just cribbing this from the press release, really” reasons to like Chrome they proceed to indulge in 7 forehead-slappingly idiotic reasons why you might consider something announced as a Beta to be…well…a beta. It feels kinda dirty just linking to it. Luckily, the PC World crew was able to get it together enough to publish a scoop-free “I played with it for 5 minutes” piece that WaPo wasn’t embarrassed to run, although the “like being there!” aspect really looses it’s punch when anyone can download the beta and, well, be there.
At least with Wired you know you’ll be getting fawning access journalism without the pretense of objectivity, but damnit, it’ll be well written and vaguely cogent.
I won’t even start on the blags. It’s to depressing. I’ll except Ajaxian and Philipp Lenssen here as they added some useful background from the inside perspective and scooped the story (respectively). “Citizen journalism” has a loooong way to go before it earns a place in the 4th estate, though.
Why, oh why, can’t we have better tech journalists?
The Importance Of Chrome
The rumors seem to have been true…the gBrowser is real. And it looks like it will simply be awesome. To my friends who have been toiling on it in deep secrecy for so very long, congratulations. Yes, yes, more to do, blah blah…screw that. You shipped! Huzzah!
So what does Chrome mean for those of us who aren’t breaking out the champagne? Well, first, it’s the second sign (after Gears and YBP (har!)) that the content authors are taking back the web from the “browser guys”. I’ve been fascinated for the last 6 months or so by the strategic mis-alignment which results when both the browsing and authoring experience in the hands of organizations only care about one but not the other. Mozilla gets paid by search-box revenue and users download it because it’s better for browsing, therefore Mozilla is incented to build new ways to browse, but their investments in content are somewhat mis-aligned (and, frankly, it shows). Google and Yahoo, on the other hand, are critically dependent on the content getting better, so they produce plugins to augment HTML in un-intrusive ways. Chrome crosses over into the browser business from the perspective of content, and it also shows, albeit in a good-ish way. I guess we’ll need to wait and see how browsing-oriented Chrome gets (e.g., will it sprout an extensions platform – ala Firefox – or will the propsect of an ad-blocking plugin for the Google browser make that proposal D.O.A.?).
Regardless of how Chrome evolves as a product, the important question now is: how will it be distributed? The obviously non-evil thing to do is to say “look, it’s great, it’s free” and hope that the world discovers it on its own thanks to word-of-mouth and/or leverage of the Google brand. Given that Chrome delivers new awesome things which are end-user-visible (some “end-user-awesome”, if you will), there’s some real chance that Chrome can get to roughly Firefox level market-share without breaking too much of a sweat. Not that Firefox’s market share is anything to really covet, given that MoFo/MoCo have been toiling at it for a decade now. To get real, honest-to-god leverage out of this process, Chrome is going to need something like 60+% market share, and that means changing ingrained user habits. I put the probability of that happening without distribution channel love at roughly bupkis.
Microsoft killed Netscape by bundling the browser with the OS. Apple is making inroads by bundling. Firefox is even getting aggressive. So where does this leave “don’t be evil”? Given the toolbar promotional deals which Google has cut in the past, I think there’s some organizational capacity inside the Goog to use the distribution channels they’ve already created as a way of getting to critical mass. What I don’t see, though, is a view of how to bring the mission of Gears into alignment with Chrome (or vice versa). They’re both important, but Chrome is a long-term bet while Gears is the near-future solution. They are not in opposition, but their strategies for gaining leverage over the problems facing content authors are very different.
We need what Gears can offer to every browser right now while Chrome dukes it out for market share on the browsing experience merits. Hopefully, if nothing else, the Chrome installer will add Gears to other browsers on the system that users install Chrome to. Even if they don’t pick the googly experience for browsing day-to-day, perhaps Chrome can still serve to give new tools to the content-author side of the house. Other browser vendors won’t do such a thing since they win or loose on an exclusive “I must replace the other guy” basis. Here, Google (and by “Google”, I mean “the open web”) wins either way. Hopefully Google’s interest in making the content experience better trumps the “we’re all browser guys now” instinct in this case.
We’ll find out tomorrow, I guess. Here’s to hoping.
Dojo’s Query System: No, Really, It’s That Fast
As outlined by JQuery lead John Resig in this post, it’s hard not to notice how much Dojo’s query engine stomps on the the competition on current browsers. Dojo will load even quicker when we’re able to remove the XPath branch in the query engine which is currently only being kept on life support for the benefit of Firefox. The rest of Dojo has been designed with the same eye to real-world performance factors in mind, hence the build and package systems which help you implement Steve Souders’ performance recommendations gradually, without major code changes.
Regardless of how good it feels to see our numbers recognized for all the hard work that has gone into the Dojo design, I think it’s also good to keep them in perspective. Most of the available query engines are “fast enough” – although there’s really no reason why your query engine of choice should be twice as slow as Dojo’s, given that ours is 100-point Open Source. Having a native implementation is nice, but the primary benefit now is in reducing the number of bytes we need to send on the wire, not in actual query speed advantages. Making queries faster isn’t in the critical path for improving the real-world performance of any Dojo apps I know of, and I bet the same is true for JQuery users. Reducing the size of the libraries, on the other hand, is still important. Now that we’re all fast enough, it’s time that we stopped beating on this particular drum lest we lose the plot and the JavaScript community continue to subject itself to endless rounds of benchmarketing.
Name Soup
There still seems to be an amazing amount of FUD going around regarding the Harmony announcement. There is clearly a very different perspective from those who have been sitting inside the WG for the past year (as Kris Zyp and I have been lucky to). Inside the WG, the change seems a welcome way to break a logjam of reasonably held opinions of people who are all acting in good faith. From the outside, it all looks like confusion and game-playing.
One of the things, though, that keeps getting me frustrated as I read the “coverage” is that the names people use are confused. Probably because the names are confusing. Here’s a quick glossary:
- ECMAScript 3
- Aka: “JavaScript”, “ES3″, “ECMAScript 262-3″, and “JScript”.
The current JavaScript that every browser implements (more or less). This is the current ratified standard and represents the 3rd edition of the ECMAScript spec. It is very old. Nothing else in this list is (yet) a ratified standard of any sort.
- ECMAScript 4
- Aka: “ES4″, “JavaScript 2″
A new language which was to be mostly backwards compatible but add optional (gradual) typing and class-based inheritance. Based loosely on Adobe’s ActionScript 3. This is the language effort which died as a result of Harmony.
- ECMAScript 3.1
- Aka: “ES3.1″
A set of small additions to ES3. Working drafts are available and will likely go to the standards process with few changes. Planning for this edition was started at Microsoft and Yahoo’s behest late last year, causing the split in the working group which has been healed by the Harmony announcement.
- ActionScript 3
- Aka: “AS3″
Adobe’s current JavaScript-like language, only with many features lifted from languages like Java which also enforce types and class-based semantics. This was the starting point for much of the work which became known as ES4.
- Tamarin
- A JIT-ing byte-code virtual machine (VM) which is at the core of the Flash Player and was donated by Adobe to the Mozilla Foundation. This is the VM that runs ActionScript 3 code today but will likely run “real” JavaScript for Mozilla in the future. It is not a full implementation of ES3 or ES4, but instead implements its own byte-code and needs to be wedded to a “front end” (like the ActionScript 3
compiler from Adobe) in order to be usable by programmers. - Tamarin-tracing
- A VM which implements the same byte-code language as Tamarin (known as “ABC”) but which is designed for use in mobile devices and other scenarios where code size and VM footprint are important. It implements trace-tree JIT-ing as a way to speed up hot-spots. Also donated to Mozilla by Adobe.
- TC39
- The name of the ECMA technical committee which is chartered to evolve the JavaScript language.
- Harmony
- A new code-name for a language which is to come after ES3.1. It will feature many of the things ES4 was trying to accomplish, but may attempt them from different directions and will
focus much more on incremental, step-wise evolution of the language. - JavaScript 2
- A now-defunct name. This name was originally given to Waldemar Horwat’s first proposal at a large-scale evolution of the JavaScript language in 1999. That effort did not succeed (although Microsoft implemented some of it in JScript.NET) and subsequent work via the current TC39 charter to build ES4 has sometimes been given the name “JavaScript 2″, but it never really stuck. Not a name that describes any ratified standard or current proposal.
- ECMAScript
- The formalized name of the JavaScript language. Since Sun Microsystems owns the name JavaScript and has no idea what to do with the trademark (but has been benevolent thus far), the ECMA committee which standardized the language was forced to adopt a different name.
Harmony Fallout
There’s a lot of weirdness going on around the Harmony announcement. This post in particular tries to dig into some of the wrangling that caused the ES4/3.1 split and what the Oslo resolution “means”, but I’m afraid that much of the analysis is being done without the benefit of an inside view of the WG process.
At the risk of talking too much out of school, I want to set the record straight in some ways. First, let me set some facts out:
eval() (ala AS3) would never have cut it as a “real” ES4. Adobe had not donated “ActionScript 3″ to Mozilla nor Open Sourced ActionScript 3. Adobe had donated a high-performance byte-code VM which a separate front-end compiler targeted. It is absolutely possible that the Tamarin VM can and will run whatever syntax for the next version of JavaScript is ratified. The design of the VM is, of course, predicated upon the language semantics but lets not confuse the front-end compiler and the language that it consumes with the VM and byte-code format which it executes. The front-end compiler was not donated to Mozilla (although something similar exists in the OSS’d Flex SDK) nor does it ship inside of the Flash player today. Adobe can continue to evolve their developer languages and byte-code VMs independently so long as they never ship an eval() feature. Even if they do, there are other (harder to swallow) options available, but no road is cut off to Adobe which was not already long-since abandoned in other ways by the ES4 process. Like Adobe, Microsoft has jumped ahead in the evolution of JavaScript via the seemingly forgotten JScript.NET. Like Adobe, Microsoft has had to come back from that position to meet the web where it really is. Microsoft now ships 3 – yes, that’s right, three – JavaScript-ish languages which are capable of running in a browser:
Make no mistake about it, these are all separate implementations which likely share little if any code. The DLR variant is even new in the last several years. Creating a new JavaScript compiler and runtime is not an overly onerous task for MSFT and clearly not one that will take a long time should the occasion arise. What’s confusing and can likely be tied to strategic wrangling is the puzzling lack of progress in the WSH version of JScript (the one everyone uses day-to-day). Any strategic discussion of JScript as a platform needs to start from this perspective.
Much in ES4 was new. The gradual typing system (which I’m a big supporter of) was something of a large-scale experiment coupled with as much rigor as I’ve ever seen in a standards body in proving things out in an RI. The Class system (which I wasn’t a big supporter of) needed to marry class-based inheritance to prototypal inheritance in ways which were new. ES4 contained many good features and syntactic forms which were borrowed from other places, but as Brendan Eich has said, it was a process of synthesis plus invention. In my opinion, much of the failure of ES4 as an initiative can be traced to significant failings of ActionScript 3 as a language. AS3 is a Java-like language with a Java-like execution model. JavaScript is a dynamic language with a dynamic execution model. The gulf in expectations between those camps turns up in every corner of the language design. For instance: what does it mean to load new code? Are classes forever “closed” or can they be re-opened? Do you really need thestatic and final keywords? Solving these issues in the context of the old is easy. In the context of the new, it’s hard. ES4 suffered because it had to do it in a new world which no one was yet writing code for.So, lets pop up and talk about strategy for a minute. Fundamentally, very little has changed in terms of available strategic options for any of the players:
What died here wasn’t Adobe’s attempts to “own” a spec. If there were such hopes in play, they had been quietly put down one rational, backwards compatible decision after another in the year preceding the Oslo meeting. What died was an assumption that the web can evolve without implementations being out in front of the spec. AS3 was one implementation of a JavaScript-like language that might have been a contender for crown of “the next one”, but so was JScript.NET. That neither of them “won” simply because they had been built in good faith is as true a sign as I can find that the process is working. Adobe gets it. Lets end the silly meme that “Adobe lost” or that “Microsoft won”. The game has hardly begun and it won’t be settled in a standards body anyway. What matters – and what we all need to keep our eyes keenly trained on – is what the big implementations do in the way of compatibility, performance, and feature set once ES3.1 arrives.
![[image]](http://mowser.com/img?url=http%3A%2F%2Falex.dojotoolkit.org%2F08%2Ffoundation_crushed.png)
![[image]](http://mowser.com/img?url=http%3A%2F%2Falex.dojotoolkit.org%2F08%2FZendCon%2FPowerOfDojo.001.png)
![[image]](http://mowser.com/img?url=http%3A%2F%2Fdojotdg.zaffra.com%2Fwp-content%2Fuploads%2F2008%2F09%2Fapple.png%3Fw%3D227)



![[image]](http://mowser.com/img?url=http%3A%2F%2Falex.dojotoolkit.org%2Fwp-content%2Fvalidatethis.gif)