开发者

Advantages of jQueryUI

I am more and more tempted to try jQueryUI. I'm sort of scared, though, that whenever a feature I need is missing, it will be hard to customize the widgets to my needs, so rolling my own widgets as needed may be a ore secure bet.

In particular what I'd like to know is:

  1. How difficult is it to go beyond the basic themes? Say I want to widgets to match the design of my sit开发者_JAVA百科e, can I do this?

  2. What if I need a widget to do a more complex interaction than it is designed for? For instance I created a widget for multiple inputs which works like this. The user writes the input in a text field. If he clicks on a + button, the input is copied in another place, and the input text is emptied, and so on. All the input is then submitted as a multiselect. Now, what if I wanted to use jQueryUI autocomplete on the input field? Can I expect that the other custom interaction will break the widget?

In the end, is it worth the pain to use jQueryUI? I feel like I will lose more time in customizing it than I would in writing the widgets myself. Is this true?


In general, I would say it is worth it to learn any library if you will be reproducing similar functionality. Even if you end up customizing it, your time spent on fixing bugs will most likely be far less.


There are lots of jQuery plugins out there that are very good. They can all interoperate with jQuery UI. I say take from jQuery UI what is useful to you, use other people's plugins where possible, and write your own plugins as necessary.


You can use the ThemeRoller application provided by Jquery-ui to build custom themes. Use the following link: http://jqueryui.com/docs/Theming/Themeroller


In my opinion jQueryUI is well-written and thouroughly designed.. just don't expect a 1000-controls library able to fit every possible need.

It is more or less a framework, a set of pieces you are encouraged to put together to assembly your stuff in a easier way.

See for instance http://jqueryui.com/docs/Theming/API - it gives you directions on how to use it's CSS framework to give a consistent behaviour and look&feel to your pages. UI controls follow a similar idea..

Besides all it's well documented and mantained and there are lots of working examples for you to get an idea of it. You should get a glimpse of the way it's meant to be used to fully appreciate it: if you follow good guidelines I doubt you will get in troubles. And yes, you have jQuery under the hood, which is really a good engine!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜