Tuesday, December 09, 2008

Review: Best Javascript book EVER.

Douglas Crockford's "Javascript: the Good Parts" - go get it. Its concise, and takes you through the semantics of Javascript from first principles. Unlike most such books, which try to make learning JS easier by over-analogizing to other languages, Doug's book also highlights the differences from the very beginning - building a much better foundation for understanding the language, pros and cons.

Heartilty recommended regardless of your level of sophistication or intimacy with Javascript. At a minimum, you'll come away with a better framework for approaching your web applications. And if you're language geek, you'll just like it.

Plus, its concise.

Probably my favorite programming book since
the red book (level 1, natch).

Labels:

Thursday, November 01, 2007

ES4: The Javascript 2.0 Blaze

Updated: Now on Slashdot.

A bit of a flame war going on in the ECMAScript working group (which spices up an otherwise reasonably boring mailing list).

This blog post (from Mozilla Foundation CTO and Javascript creator Brendan Eich) is really only tip of the iceberg - you should follow some of the links from his post, or check out the mailing list archive.

Javascript 2.0, or more formally ECMAScript Edition 4 (or simply ES4) has been in the works for a good, oh.... 8 years now. With the ES4-in-motion work from Adobe (nee Macromedia) in the form of ActionScript 3 (AS3), and the rise of Firefox, Safari, et al. its been getting a serious push to completion over the last year and a half, especially in the face of Microsoft's C#, Silverlight, and (though no one said it directly), I think even Adobe's Flex and AIR.

The battlelines are pretty clearly drawn, with
Microsoft and Yahoo on one side, and the Mozilla team, Opera, Adobe (interesting, eh? "Enemy of my Enemy" anyone?), and oh, pretty much everybody else on the other side. Or, as you might first opine from that cast, Evil v. Good.

MS and Yahoo think the language is changing too much, whilst the others think that it needs to in order to be competitive for the larger scale programming projects the web is increasingly requiring.

My opinion? As is usually the case, they're both right - you only have to look at the Flash community's response to ActionScript 3 .

In short: They like it - a lot, but its very different than AS2 development.

And, oh, from an implementor's perspective, AVM1 and AVM2 (which, roughly, correspond to ES3/AS2 and ES4/AS3) are two completely different VMs. Is it possible to make one that does both? Sure... but there's no denying ES4 requires *substantially* more effort and complexity to implement (note I'm *not* making an argument about code size here....)

An so, in a deliciously Shakespearean turn, Doug Crockford of Microsoft of Yahoo asserts (correctly I think) that the issue is fundamentally one of nomenclature.

Of marketing.

If its not called Javascript, would anyone use it? And if it is, how similar should it be?

Quite frankly, Brendan's probably right in that, whatever justifications the opposition might even believe, there is a bias to keep Javascript "ghetto-ized" to a degree - because of existing investments and strategy considerations.

That doesn't, however, make it wrong to push in that direction.

Personally, I do wish there were less emphasis on the "compiler/VM" split that Java brought into vogue - it seems to be at the the heart of a lot of the design decisions that make AS3 and ES4 feel less "Javascript-y" to me.... but that's both good and bad - ECMAScript 3 is forgiving of errors well past the point of stupidity.

And so, lightweight stuff really is harder, but its also a lot easier to write stuff well...

Labels: , ,

Tuesday, December 12, 2006

Java 6 and Scripting

Sun released Java 6 yesterday. Of particular interest (to me at least) is the explicit direct support for scripting languages as a "core" part of Java (more or less - of the Java 6 edition "package" at least...).

Though I intuitively understand it (and believe it), I've still yet to see a reasoned justification as to why we need scripting languages? Is the compiler that much a barrier to productivity?

Otherwise - some nice additions to Java 6 (especially the XML APIs, which, like E4X, are critical for easing web services development - nice), but despite them, I think Java 6 moves it further away from a credible client-side computing platform - too much increasing complexity, which creates distribution issues. I think Microsoft's mini-CLR is a better step in that direction. Open source and mobile/phone development may change that for Java, but I think a variety of factors will continue to impede relevance in that space.

Labels: ,