I'm a new graduate, but I have been doing web development for about six months. When I was finishing university the server side languages (PHP, Java) were more important then client side languages. JavaScript was only used to validate data or use AJAX to beautify the page. The server side validation was of course done anyways.
As I dive into more projects, I can see that JavaScript is used a lot. It's mostly to create visual effects, but an important part is used to convey data (JSON) and make requests (AJAX). In a project I'm following, JavaScript takes up 30%-40% of the codebase!
My question is: "Is JavaScript that important?".
My first impression was not good, but I also realize that it requires skill to write good JavaScript. It seems to be very easy to write, so it's so damn hard to manage and very hard to identify the flow of JavaScript.
P/s: A lot of tricks, tips, library(like JQuery) and tutorials are out there, they are a lot but I don't know the best way to start. So I'm very grateful if someone could give me an advice.
UPDATE: As now i'm on the way with javascript, thanks for all helpful advices. I will try to summarize the answers, so that it can be a good source for anyone with the same problem.
Javascript:
Why it good:
- Best User interface
- Lots of good framework
- Server side javascript (MongoDB & Node.js)
- Many success application built from it (Gmail is an example)
- Object-oriented able
- Good support (HTML5 included)
Important Concept
- Closure (event handling)
Best practice
- Nothing global. Try to use "namespaces/libraries and classes"
- Never function (controversial). I still use function, and it seems not very bad.
Resources
- Mozilla Developer Network
- Douglas Crockford
- W3Schools (starter)
- Tizag
- Javascript - The definite guide (ebook) (recommended by Douglas Crockford)
- Head first Javascript (ebook)
- Head first Ajax (ebook)
- Head Rush Ajax (ebook)
- Object-Oriented JavaScript: Create scalable, reusable high-quality JavaScript applications and libraries by Stoyan Stefanov.
- Javascript Koans
Framework
- Mootools
- Prototype
- Dojo
- ExtJS
- YUI
- GWT
- Server side: MongoDB & Node.js
Alternative for Javascript (thanks Mike Samuel)
- GWT : code.google.com/webtoolkit (java)
- coffee script (python)
Again, I want to thank you for all the answers and opinion, as I got great benefit from all of them. Still, due to the fact that I just only can accept one answer, the answer of Renesis, for his mention about closure, which is helpful for me.