• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mastery: JavaScript vs jQuery

 
Geff Chang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Keith,

Which would you focus mastery on? JavaScript, or jQuery?
This is with the assumption that you only have basic background on JavaScript.
 
Keith Wood
Author
Ranch Hand
Posts: 38
jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean in the book or as a developer?
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, jquery uses javascript only. It's only a library of javascript
 
Geff Chang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keith Wood wrote:Do you mean in the book or as a developer?


As a developer.

I know jQuery is just a javascript framework.
But javascript in itself is complicated.
That is why we have jQuery to simplify javascript,
and extend it if necessary.

Knowing this much,
would you rather spend more time understanding javascript?
Or just forget about javascript, and specialize (or master) in jQuery?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knowing just jQuery can get you only so far. jQuery can not do everything for you. You need to know JavaScript for those situations.

Eric
 
Geff Chang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:Knowing just jQuery can get you only so far. jQuery can not do everything for you. You need to know JavaScript for those situations.

Eric


What would be an example that would not be possible with jQuery?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geff Chang wrote:
But javascript in itself is complicated.
That is why we have jQuery to simplify javascript,

Yes, it's true that jQuery makes doing things in the browser a lot simpler -- I can't imagine dealing with event handling or Ajax without jQuery for example -- but that does not mean that you can get away without knowing JavaScript. It's just like using Java libraries doesn't mean you can skip learning any Java.

Effective use of jQuery requires a good grasp of basic JavaScript, and even some advanced concepts such as functional programming, closures and function contexts. While you can get away without know much about those, your code will suffer for it. jQuery makes effective use of JavaScript as a functional language and not understanding how JavaScript works in this respect will severely hamper your code.
 
Keith Wood
Author
Ranch Hand
Posts: 38
jQuery
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need a bit of both. As the others have said, jQuery is a JavaScript library and you still need to use JavaScript to implement basic functions and processes. Knowing more about jQuery's abilities would allow you to reduce the amount of code you write yourself by taking advantage of the functionality built into jQuery.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic