You Must Learn JavaScript

来源:互联网 发布:淘宝优酷会员怎么没了 编辑:程序博客网 时间:2024/04/28 19:34
By Kenny Meyers December, 2nd 2010

If you asked me 3 years ago what language you should learn I would’ve said Ruby. If you asked me 6 years ago, it was PHP.

If you’re going to learn a language now, you need to learn JavaScript.

Why?

It’s my belief that every single web programmer should learn JavaScript. There are many new technologies coming out that fuel this principle. There is one single reason behind it. It’s ubiquitous. You can work for anyone and do amazing things if you’re using JavaScript. You can do it instantly on any machine.

Not every company is a Ruby shop. Not every company is a .NET shop. It’s my belief that 99% of the time both of these companies will need someone who knows JavaScript, and knows it well. Microsoft, Facebook, Apple and Google all use JavaScript to make great things.

Knowing JavaScript well is probably one of the most challenging and rewarding things you can do as a programmer. It’s an incredibly diverse language, much larger in application than you think. There are a large amount of gotchas, some great new APIs, and it’s in constant development.

When people talk about HTML5, they are talking mostly about JavaScript.

But where to begin?

The starting point to learn JavaScript is with manipulating a web page: with operating on the DOM. Many JS programmers have issue with this, because before Ajax and the JS revolution JavaScript was underestimated due to its role as a DOM Manipulator. You should know that it’s greater than a show/hide mechanism on your website.

Manipulating the DOM is easy, however, and instantly rewarding. The single greatest book I’ve found on DOM manipulation isDOM Scripting. The great news is that it’s finally getting a much needed update. Jeremy Keith’s book is the best gateway to some basic fundamentals of JavaScript.

This is just the beginning. If you thirst for more knowledge look at this Stack Overflow question. It has some great recommendations, many of which I’ve read.JavaScript: The Definitive Guide is the JavaScript bible. Praise be unto it.

I recommend Angus Croll’s JavaScript, Javascript as the single best blog on understanding core JavaScript. It’s so good and thorough that knowledge practically jumps into your tiny skull.Douglas Crockford is also great, but his writing isn’t as meticulous or detailed as Angus’s.

Frameworks are nice. They are helpful. If anyone scoffs at you for using a framework while you’re learning, don’t listen to them. You’re on the right path. I think jQuery educates more people about the importance of context in JavaScript than any book or reference doc. After you’ve selector’d your face off, dive deeper into the core.

Install Firefox and install Firebug. I still think Firebug is the best setup. Webkit is catching up. Watch the introductory video on the Firebug site to see how it works. As my friend and colleague Leevi Graham said “Firebug… still keeping firefox relevant” (source). A new version just arrived.

Mozilla, to their credit, still has one of the best online documentation sites for JavaScript. It should be your reference.

Learn JavaScript. It’s more important than any other language you’re thinking of.

Ref Link:http://thenerdary.net/articles/entry/you_must_learn_javascript