Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Learning JavaScript... Should I skip straight to the good stuff (the frameworks)?

I learnt HTML/CSS a good few years back, then PHP a little later. I've recently become interesting in web development again, just started playing with frameworks like Django and RoR. I'm curious as to how much time/effort I should spend learning straight JS before looking at frameworks. I've been reading through a let of articles called Mastering AJAX by Brett McLaughlin which seems quite good, but I'm seeing a lot of stuff (such as cross browser compatibility - even for things like XMLHttpRequest) coming up which look like they would be non-issues if using a framework.

So, should I keep reading through these articles and try to build stuff using basic JS, or should I just start looking into jQuery and the like?

Also, I've been watching a few videos regarding GWT from Google I/O. I've been learning Java over the last year, built a few medium sized apps in it. I'm wondering if GWT is something that's worth going straight to, along with gQuery?

like image 645
Grogs Avatar asked Jul 08 '09 01:07

Grogs


2 Answers

Starting with the basics of JavaScript is a good idea, IMHO.

Read JavaScript: The Good Parts, by Douglas Crockford. Very, very good book.

Cover for JavaScript: The Good Parts by Douglas Crockford

You should also check out Douglas Crockford's web site.

I also had to come back here and mention this in an update:

Douglas Crockford presented an illuminating talk about JavaScript - past, present, future - at the Microsoft MIX10 conference earlier this year. You'll find the full video for Crockford's talk at Microsoft MIX10 - The Tale of JavaScript. I Mean ECMAScript.

like image 101
Chris W. Rea Avatar answered Nov 10 '22 01:11

Chris W. Rea


No.

Just as when you are learning to program you are taught first C/Pascal then Java/C++ and finally Python/Ruby/Smalltalk/Lisp, and when learning any language you start with simple language constructs, you should first learn ECMAScript, then learn DOM and finally frameworks.

Why? Because you'll have a deeper understanding of the language, and will be able to debug things that might seem odd unless you've got that learning experience.

If you are a seasoned developer, you can speed up each phase, but don't skip them, or you will have problems due to not fully understanding the small oddities.

Javascript is an interesting and fun language, but can act rather odd at times (Date has bitten me a couple of times in the ass).

Use frameworks to avoid repetitive tasks and to simplify your code, but not as a starting point. Simplicity is a final goal, not the starting point, and frameworks are for that, simplicity, not for learning a language. Frameworks are intended for simplifying things for experienced developers.


Learning the differences between browsers (DOM implementations) will allow you to debug your framework. That is priceless.


I've been learning Java over the last year...

Javascript is not Java. Never was never will.

Even if you can compile to Javascript from Java, it's still a framework, don't jump into it unless you already know what you are doing.

like image 36
Esteban Küber Avatar answered Nov 10 '22 00:11

Esteban Küber