views:

276

answers:

6

Hi, I like javascript, but I have problem with learning it :) I mean, i use it at work but I would like to know more, and I think the best way to do it is to read and understand someone else's code.

I use ASP.Net MVC and there are some great opensource projects you can use to learn new technology, like NerdDinner, Oxite or SharpArchitecture or even MS starterkits. I was trying to read frameworks like jQuery, but it's really complicated, and I don't think that it was created to learn new things from it.

Do you know any good JS projects that can help with learning javascript ?

I'll try to paste all good sources here :

Nice JS tutorial: Eloquent Javascript

+3  A: 

In essence all javascript is open source. You just go to the webpage and view source.

If you open the JS file directly you will see its source.

There are of course exceptions, with people trying to obfuscate javascript, but they are the minority.

Checkout jQuery and the jQuery plugins to learn more.

Another good source is the talks of Douglas Crockford on javascript. Google has a bunch of them, here.

Oded
Ok, i know that js is opensource :) but try to read it when it's compressed :)
Jarek
@Jarek - there are tools out there to "pretty print" javascript and to reverse obfuscation.
Oded
ok, but again, I'm not looking for a tutorial, or a screencast. I've already seen D. Crockford series, I even have his book :) (I was translated to Polish ;p). As i wrote before, jQuery is really hard to learn from and jquery plugins sometimes are the worst javascript code I've ever seen :)
Jarek
+3  A: 

Did you check out the JQuery tutorial pages? They contain a lot of practical examples http://docs.jquery.com/Tutorials

Karl Johansson
+5  A: 

Have a look at some of the JavaScript projects hosted on Github: http://github.com/languages/JavaScript

J-P
+2  A: 

http://www.jsmadeeasy.com/ scripts exaples - learn by example

Maciek
Learning from examples that start like this — `<script LANGUAGE="JavaScript"> <!-- n = (document.layers) ? 1:0; ie = (document.all) ? 1:0` — does more harm than good and is probably one of the worst places to start with.
kangax
+1  A: 

There's a great interactive tutorial for learning JS, Eloquent Javascript which I would really recommend. Since you already mentioned you tried learning jQuery by the source and it was hard, why not just go this route?

meder
It is totally different from what I was asking for, but it's a relly great link ! THX.
Jarek
+1  A: 

I would recommend to take a look at OpenLayers project.

It's an open source javascript library for creating web mapping "Google Maps"-like applications.

It's a good example of how to write solid, testable and maintainable object oriented javascript code.

igorti