![]() |
Basics or jQuery?
Just something I thought to myself, reading another thread on this same forum, that I would like to share is the discussion surrounding whether people that are new to javascript should start with the basics, not programming basics but rather basics on how to manipulate the DOM, or go straight into jQuery.
Now for those of you that do not know, jQuery is a popular javascript library that makes the use of javascript as a programming language "easier", in some cases I fully agree it does, but as with all libraries or frameworks this comes at a disadvantage, being the size of it, where sometimes all you need to do is hide a div, which can be written in a total of 1 line of code. <rant>Every time you then need to go hide that div, this whole library will be loaded, yes it is small but the fact still exists that using the library for something so simple is bloating websites/applications all over the net, just to have a quick look at the uncompressed version of the latest jQuery library which is 120kb, sounds small hey? Coming in at 4327 lines of code it really is not that small.</rant> Without going completely off topic, I reckon a user should first know what the DOM actually is, what are elements, how do you manipulate the DOM, what is ajax actually, before jumping into a library which will help reduce the amount of code for larger/complex web applications. So, basics or jQuery? |
Basics obviously, you can't fully take advantage of jQuery without having an understanding of DOM.
|
I'd go so far as to say they should learn much more than merely the basics before diving into any of the frameworks available. Unless they're the type who really don't want to learn the language but rather just get the job done.
Would you recommend someone jumps right in using the Zend Framework, Symfony, etc. before knowing the first thing about PHP? I certainly wouldn't! |
Sometimes, learning the hard first can be a good thing.
But can also damage the learning process. And in the end you end up beeing overwhelmed, so start small and go up slowly -CF |
Definitely learn php before zend framework and definitely learn the basics of javascript before jquery.
|
Basics are very important, you need to know how javascript fully works at a relatively advanced level (at least know how its object model works), this is because jQuery uses a lot of advanced level javascript concepts that may just seem like 'black magic' to people without the necessary grounding in the language. This limited understanding can lead to bad and somewhat slow code.
|
Quote:
http://www.talkphp.com/javascript-aj...avascript.html |
You can learn how to use jquery without knowing DOM, but you will not understand what is happening until you know how jquery works.
|
Quote:
|
Quote:
|
Nay the disaster is when you do this:
javascript Code:
instead of javascript Code:
|
Nay the disaster is when you do this:
javascript Code:
instead of javascript Code:
I've seen the jQuery library - uncompressed - be called into web apps for the sole purpose of changing some attributes. |
Yep, I've actually found JS very simple compared to JQuery.
|
Quote:
Just for interest sake anybody want to benchmark that? Still at work will do when I get home |
Quote:
Also, run the test for yourself. http://selectors.turnwheel.com/slickspeed.php |
Quote:
|
Its difficult to find a balance. But some understanding of javascript is need before using jQuery. For example conditional statements in jQuery are still javascript.
|
Quote:
|
Its all about balance, you wouldn't use the Zend framework for a site with static content, would you? In the case above, yes jQuery is probably overkill.
Quote:
|
jQuery takes the pain away from cross-browser issues too! That in itself is worth a lot! (especially because IE is poo - any chance i get to have a dig at windows - with valid reason ofcourse :) )
|
| All times are GMT. The time now is 01:33 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0