I have to build a simple app, and I'm not sure if it worth to use the jQuery framework. Besides the complex or fancy applications, When is it recommended to use the jQuery and not the pure javascript.
4 Answers
It's more or less an issue of personal preference: jQuery, MooTools, Prototype and other JavaScript frameworks bridge many browser incompatibilities and simplify many of the common tasks for which JS is used, and thus shorten development time.
IMHO, if you are using JS for the usual "effects, AJAX, input widgets, pre-submit validation" tasks, a framework like jQuery is much faster and easier to use than rolling your own implementation. The drawback of loading one more script file and minding its license is negligible when compared to the flexibility and efficiency that it brings.
(also, most frameworks have plugins for various advanced tasks, but that's a bit beyond the scope of the question)
1 Comment
Besides all the facilities for writing code, I think that you should think at what you will put inside your application (i.e. plug-ins): jQuery offers a lot of useful plug-ins, both internal (calendar, tabs...) and external (e.g. jqGrid for displaying grid data). It is very helpful to have all this things in one single and standard framework (e.g. jQuery): otherwise you'll have to look each time to a different javascript plugin.