Jquery Framework Internals
Solution 1:
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:
- http://www.amazon.com/Professional-JavaScript-Developers-Wrox-Guides/dp/0764579088
- http://www.amazon.com/Pro-JavaScript-Techniques-John-Resig/dp/1590597273/ref=sr_1_10?ie=UTF8&s=books&qid=1252905139&sr=1-10
- http://www.amazon.com/JavaScript-Design-Patterns-Recipes-Problem-Solution/dp/159059908X/ref=sr_1_16?ie=UTF8&s=books&qid=1252905196&sr=1-16
Other technical references:
- http://www.w3.org/DOM/
- http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf
- https://developer.mozilla.org/en/JavaScript
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.
Solution 2:
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.
Solution 3:
Why not learn from the man himself, John Resig, here : http://ejohn.org/apps/learn/
Based on that, I'd definitely get the book your friend suggested.
You can also find some more nice resources on his website, courtesy of googling site:ejohn.org/apps
Solution 4:
I was also like you interested in how jQuery works internally, I've spent some time learning from jQuery code source and trying to understand the core architecture, then I've created a github repo how-jQuery-works to share my knowledge that I've acquired with other developers, hope you learn something from this repository.
Post a Comment for "Jquery Framework Internals"