Jump to content

Thoughts On Using A Library Vs. Normal Javascript?


Recommended Posts

I personally think that libraries have their uses -- they're useful (see what I did there? :) ) in some cases but most the time what you're trying to do can easily be accomplished without it. For example, some people haven't a clue how to do DOM manipulation without jQuery; that causes them to rely on it and suffer the consequences of loading what they don't need as well as what they do. The main reason I don't like using libraries (external ones, that is) is because they give wayyyy too many features that I *don't* need, and sometimes what they do can be done with pure CSS.

 

Your thoughts?

Link to comment
Share on other sites

While I see your point, JQuery is more of a cross-browser easy-to-do library. It's not necessarily meant to do exactly what you want. I personally use JQuery only in situations that have need for it in readability. For example, I originally wrote one of my open source projects in JavaScript and later re-wrote it in JQuery. The difference was substantial in the amount of lines, and the performance was not effected noticably. If anything it may be faster since that is one of the goals in JQuery as well.

 

I use pure JavaScript in simple things such as embedding flash, HTML5, etc. Those are really the only situations in which I need simplicity. I may be biased however since I make a living on open source projects and freelance. I don't necessarily use simplicity on a daily basis.

 

I'm not exactly sure why you would compare using a JavaScript library with using CSS. Perhaps you could give an example.

Link to comment
Share on other sites

If you dont need more than 3-4 features of jQuery I would not recommend using it. The client's browser has to process lot of things to just do 3-4 tasks. For simple tasks, one should use javascript and then just check the cross browser compability.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...