views:

406

answers:

2

Hi

I am trying to understand the internals of how jquery framework is written and finding it hard to understand the code.

Does anyone have any suggestions regarding a good way to get started.

Thanks for all the useful input. Editing the topic since I had limited space for adding individual comments. I have written a lot of basic javascript code. I know basic DOM, have used event handlers, know CSS basics. I have read about many of the topics you have mentioned and I am familiar with it although not an expert and have not coded some of the advanced topics like closures. Here are the books I have used so far Head first javascript - good in the beginning as a starter. Books my friends have recommended and I use regularly are Javascript - The Definitive Guide, Javascript - The good parts (I read this a while ago and it was hard for me at the time). My friend just recommended Secrets of Javascript Ninja - John Resig. Seems like a good one. I ordered the Javascript Design patterns book you recommend last week

I have read the https://developer.mozilla.org/en/JavaScript you pointed me to. I will checkout some of the other resources you pointed me to.

Let me think a little more regarding if I want to do a little more reading before I post specific questions I have on jquery.

Thanks Susan

+19  A: 

To comprehend the actual source would require some degree of Javascript knowledge - If you don't already know what's going on then you basically need to learn more Javascript.

Key things to learn:

  • Prototypal inheritance ( the inheritance used in ECMAScript, the core language on which Javascript is based upon )
  • Lambdas ( inline functions )
  • Closures ( outer variables from outer scope accessible from inner functions )
  • Regular expressions ( used for matching the selector strings fed to jQuery )
  • DOM ( The DOM API which is used to interact with markup languages )

When learning, use Firebug so you can evaluate your expressions interactively and immediately see what's going on

An excellent free resource for learning that I would recommend: http://eloquentjavascript.net/contents.html

If you're a beginner to DOM Scripting/Javascript:

If you're intermediate level:

If you're past intermediate level and want to be an expert:

Other technical references:

If you have specific questions about a certain code snippet just ask here. Another resource that I can recommend for more advanced questions would be the jQuery mailing list or irc://irc.freenode.net/jquery where jresig hangs out himself and comes by and answers questions. There are other guru ops who reside there like ajpiano/paulirish/nlogax.

meder
Thanks for your quick response. Please refer my original question above. Sorry did not have sufficient space to add comment
Susan
+4  A: 

If you're looking for insight about how jQuery is written, the uncompressed source code is pretty readable. There are a few books mentioned in SO74884 that are worth a read. Resig's book doesn't really cover jQuery at all, but is good about teaching object oriented javascript.

If you are having a problem understanding something in jQuery's code (why it was done/how it works), you should post a question with some code bits to Stack Overflow, asking for some help understanding it.

gnarf
Thanks for the link which points to useful resources. I have used many of the resources pointed out in that link. Let me think a little more regarding if I want to do a little more reading before I post specific questions I have on jquery
Susan