Advantages and Disadvantages of JQuery UI over Plugins

时光总嘲笑我的痴心妄想 提交于 2020-01-02 08:22:22

问题


I have spent the last week or so updating my web application to a couple of plugins from JQuery UI, such as autocomplete and dialog. In the past, I have used separate plugins to achieve the same like autocomplete and jqModal. The thing is, the more I play with JQuery UI the more I find issues and complexities that didn't exist in other plugins. Yes, it's modular and allows one to build upon the core plugins and interactions, but it seems to lack features that were just built in to other plugins that are distributed individually. Also, it seems to me that JQuery UI adds another layer over of development JQuery and my current application, especially with its own theming and complicated CSS classes.

So I am thinking of moving back to just combining separate plugins in to one minified JS file. Is that the wrong path to choose? Is it not okay to combine individual autocomplete, form, modal window, datepicker plugins etc.


回答1:


Kinda subjective, but here is my opinion. Do what works. And what works for me is doing exactly what you want to do, combine the plugins and use those. I try to stay away from JQuery UI for your mentioned reason and that the file is too large for my purposes.

The only reason I'm using Jquery UI is when my company is doing Line of Business apps that would be running on the intranet or something.




回答2:


Some other considerations:

  • If anyone else has to read, maintain, support and/or enhance your code, it might be easier for them to learn your code if you use one tool (jQuery UI) rather than a dozen different tools. Some wonderful plugins have a pretty steep learning curve and little or no documentation (SlickGrid, anyone?).
  • Perhaps the jQuery UI will be more reliably maintained in the future than a stand-alone plugin. Some of these tools will need serious upgrades to benefit from HTML5, or they will become out-dated (or worse). Which is more likely, that jQuery UI will keep up, or the other tool?

However, I don't disagree with Shawn. Awesome is better. Use what works best, right now.




回答3:


I would suggest using the "JqueryTools" plugin from jquerytools.org. I personally prefer it because it doesn't have a whole lot of unnecessary files, it it just a single file, you then have control over stylesheets which means that you can customize it easier than JQueryUI.



来源:https://stackoverflow.com/questions/7746695/advantages-and-disadvantages-of-jquery-ui-over-plugins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!