If you don’t use JavaScript and not interested in learning it, you can stop reading now.
What always disappointed me in books on JavaScript is the fact that authors seldom separate JavaScript from Web programming. Thus, most books on JavaScript provide the description of features (syntax, built-in objects) and then jump to DHTML, DOM, AJAX and JavaScript libraries, producing a thousand-page tome.
The impression that one can get from these books is that JavaScript looks much like Java but doesn’t have “proper” inheritance, though the latter can be emulated. There is even a book which exercises in implementing GoF patterns in JavaScript.
A notably different view on JavaScript is presented in a recent book by Douglas Crockford called “JavaScript: The Good Parts”. The first difference is that it’s just about JavaScript itself. The second difference, implied, is the size of the book—it’s just about 150 pages, so you can grasp it in a weekend.
The most outstanding difference, though, is that it describes JavaScript as “Lisp in C’s clothing”. In fact, it is. As JavaScript’s designer Brendan Eich recounts, the language was initially designed as a functional one with Self-ish prototypal inheritance, and it was wrapped in Java-like syntax due to Java’s positioning as a language for the Web, back in middle 1990-s. If you are interested, here is a link to Mozilla’s CVS with experimental JavaScript implementation in Common Lisp.
So, Douglas explains JavaScript from this very point of view, in somewhat different way. As an example, he advocates against the common practice of using the new operator for creating new objects. Why? Because if you forget to specify new, the code will still “work”, producing hard to debug invalid behavior. And how properly create new objects then? Read the book!
Personally, I deal with JavaScript since 2001, mostly using it as an application scripting language. And, nevertheless, I discovered lots of new stuff in this small book. Apparently, most of book’s material flies around in the Web, I just was too lazy to pick it up. But I think, most of us are.
Recently I’ve been looking at Javascript willing to learn more and the most useful documentation about the language itself I’ve been able to find so far is Mozilla’s at http://developer.mozilla.org/en/docs/JavaScript
Perhaps the book you mentioned is what I need.
Yes, Mozilla’s docs are good. You can also look at JScript docs in MSDN: http://msdn.microsoft.com/en-us/library/hbxc2t98.aspx but be aware that some of the features described can be Microsoft-specific.
I agree with you about the problem of people thinking that JavaScript is just for Web programming. In my last job I was using it to run Adobe Studio applications to automate graphics production and it worked great.
http://elfz.laacz.lv/beautify/
My beother suggested I might like this blog.
He was totally right. This post actually
made my day. You cann’t imagine just how much time I had spent for this info!
Thanks!