views:

143

answers:

3

This question is the following of my other question here: http://stackoverflow.com/questions/3707746/cannot-understand-node-js

I decided to learn JavaScript, however and in spite of I learn by doing, I don't find anything I can be doing in order to learn JavaScript.

What projects do you recommend me to start? What cool things can I do to improve my skills from beginning to master? Please don't propose almost impossible projects for a beginner, I'd like to know everything about JS but starting from something not very easy but not very hard.

A: 

I recommend start learning the work of DOM en WOM (Document Object Model) and (Window Object Model) Try change html code with your javescript (delete elements, add elements, edit elements). Do the same for attributes. When you understand this you can learn yourself some ajax. With this you got the core of js functionality. If you want to learn more you can start trying to make movable objects or something.

I recommend looking into jQuery aswell when you mastered the javascript language. This is a great javascript library with really good documentation that makes it a lot easier to develop in javascript. http://jquery.com

(I'm assuming you familiar with some kind of php/java or other language that uses things like functions and objects)

As a project you can think of making a new layout for an excising site using javascript to edit the elements. For example change the layout when some button is pressed. http://www.w3schools.com/js/default.asp is a great site to do some tutorials.

Mark Baijens
Advanced Javascript really is not about DOM manipulation. Moreover, simply using a library will not help you "master" anything but the library. You must understand how the library works, and have the capability to write one on your own. And the unqualified statement "Javascript is not an OO language" is a clear sign that one does not understand the language at all.
MooGoo
I think DOM manipulation is a good start to learn to understand javascript. I learned it this way and helped me a lot. Ofcourse a library is not a good start to learn a language. It was more of a recommendation after learning the language. Your right about the OO statement. It works different as most OO languages but it uses objects aswell. Therefore i removed that part.
Mark Baijens
+4  A: 

If you want to learn about JavaScript with the intent of understanding the language itself and nodejs, you should not do anything that has do to with a browser. That will just force you to focus on quirks and silly DOM-things. Even jQuery would be wrong in my opinion as it is a framework for working with the browser.

Write a good old regular command-line program. Write a blackjack-game. If you like maths, solve some project euler problems. If you want to do some async and webby things, screenscape some site for info and print it in the terminal. Or make a tiny website using node as a server.

Really, just do anything, but stay away from browser scripting (unless that is what you want to learn) :)

Jakob
Hi Jakob. That's exactly that! I do not intend to do any browser scripting at the moment. I'm in my quest to learn node.js and from what I could understand, I need to really understand JavaScript. I really liked your comment and I'd be interested in knowing what learning materials you recommend to reach that goal (books, videos, etc). Thank you.
donald
Anything by Douglas Crockford is well worth a read, but the book "JavaScript: The Good Parts" in particular. Learn from him, but just don't follow everything he says as a religion (he's a bit extreme at times).
Jakob
I also use Mozillas JavaScript reference quite a lot. There's some browser-things in there as well, but most of the reference applies to JavaScript in general, as a language: https://developer.mozilla.org/en/JavaScript/Reference
Jakob
For some reason I couldn't think of them all at the same time, so here come yet another idea! :) Mozillas JavaScript reference is great when you already understand the basics and want to dig into details, but before that this guide is awesome: https://developer.mozilla.org/en/JavaScript/Guide
Jakob
Thank you! I assume those guides focus on the knowledge required for server side and not only on the browser side? (or in the language itself) Thanks again.
donald
A: 

I learned jQuery a LOT by doing a sort of website builder (drag & drop and so on), without knowing a bit of javascript (other than getElementById and innerHTML). I wasn't happy with performance (jquery 1.1.x afterall) and I started to learn and apply various optimization tips. After few months I realized that I know js at a satisfactory level (I was like Neo: I know Kung Fu!)

As a book, I recommend you Professional Java Script. It covers a lot of topics, starting from basic stuff, going to advanced stuff.

Ionut Staicu