开发者

jquery vs javascript

开发者 https://www.devze.com 2023-02-01 21:00 出处:网络
I have to b开发者_开发知识库uild 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 th

I have to b开发者_开发知识库uild 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.


In addition to complex or fancy applications you could use jquery in applications performing cross browser DOM manipulations and AJAX and which could benefit from the hundreds of available plugins.


using jquery will increase the development speed and you get the benefit of browser compatible code too.


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)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号