Sunday, September 23, 2012

Douglas Crockford and JavaScript

Why to write anything about Douglas Crockford?

Well he is very important in JavaScript community. His book JavaScript: The Good Parts is considered one of the best book on JavaScript. But why this book is so good and why is JavaScript all of a sudden so important?

In the past JavaScript was simply the language of the browser. But now JavaScript is finding it's way to multiple different areas like server side programming (look at node.js for example),  new old fat client programming with HTML5 (canvas, sockets), cross-platform mobile development (PhoneGap), games development (Unity), Microsoft Windows 8 applications, etc.

I don't think this is happening because JavaScript is good language. It isn't and it's design is driven by browser's DOM which is awful. This is happening because people simply are used to it and more and more people are using it whether they want to or not. I see more and more really good Java programmers using it and struggling and hating it because concepts are not event close to Java's. You are really forced to use it if you want to make good web application, or cross-platform mobile application or to develop games on certain engines. And JavaScript simply works in all of these scenarios.

It's like JavaScript is becoming glue in this highly fragmented proprietary world.

Now why is Douglas Crockford important? It is because he manage to find beauty in JavaScript. And I must agree that there is beauty in it. I love functional programming and functions are first-class citizens in JavaScript. He also make good point that transferring what he calls "classical methodologies" (class designs and pattern) into JavaScript is sub-optimal solution and that we need new way of thinking when code in JavaScript.

You can learn more about  Douglas Crockford from his website: also you can watch some of his great lectures on youtube.