4 ms·
>We believe that having a consistent interface to complex plugins is a big win for users. Consistent? jQuery UI is one of the (not the, just high on the list
by Groxx 16y ago
>We believe that having a consistent interface to complex plugins is a big win for users.
Consistent? jQuery UI is one of the (not the, just high on the list of) least consistent and least flexible javascript tools I use daily. I have to hack around behaviors and inject buttons into areas that aren't blessed to have them all the time, and it's a royal pain because there are zero tools to help you and doing anything not explicitly supported (and some that are) often causes problems further down the rabbit hole. You've got to dive through div.ui-something > li.ui-another span.ul-cryptic div.ui-some-long-name just to get to the container, and God help you if you put something slightly too large in.
I hope they're at least more consistent than jqGrid. I've been using it heavily lately, and hacking on extra features, and holy cow is that an inconsistent mess. It's horrendous. It works quite well as long as you follow the examples, but try to do anything else and have fun! Out-of-date documentation, inconsistent interfaces, and just-plain-incorrect advice are absolutely everywhere.
---
None of this is to say I don't think they can make a good one. I eagerly await it, and will give it all kinds of hell when it comes out to see what it can do. I just fear the API.
- Griever 16y agoWhile I disagree about your arguments against jQuery UI (I actually quite like it as a whole, and the CSS arragenment doesn't bother me at all), I wholeheartedly agree about jqGrid. What a terribly bloated plugin. I have no idea how it got to earn the 'respected' title it has today.
- Groxx 16y agoI think it's the jQuery UI CSS integration and that it really does do just about everything. You just need to kick it around to get it to do so correctly, and haunt Stack Overflow when documentation fails and the cryptic source code don't help ("rd[ts.p.colModel[j+gi+si+ni].name] = v;" ? WTF?). I have no clue how Oleg does it, I think they may actually be a super-intelligent chatbot that searches against the source code. As to the rant against UI's consistency, I should point out that I deal with jQuery and in-house code almost completely, no Ext / other frameworks, and I'm not counting one-trick-ponies, though those are typically simple enough to re-write to do what I want. And I write freakishly flexible code any time I run across a re-use case (I'm helping build a utility base for the company I'm working with). jQuery is fantastic, but UI has nowhere near that level of polish.
- Griever 16y agoNow that I will agree with. I was just saying that overall, and in comparison to other UI frameworks, jQuery UI works surprisingly well with jQuery. I won't deny that there is definitely room for improvement, but my experiences with it so far have been relatively painless. It should also be mentioned that I work with both quite frequently.
- Groxx 16y ago>in comparison to other UI frameworks That's exactly the way of looking at jQuery UI I wish to squash. Absolutely, it's quite good compared to the alternatives, and definitely the best I've dealt with. But that doesn't mean it's good (I think it is, but it doesn't imply that it is). Holding something in comparison to what exists now is a sure-fire way to never get anything significantly better. Overall, with UI, I generally agree. Most tasks Just Work, display is consistent, and behavior is generally what's desirable. The consistency is a huge boon for cross-browser development, and it's nigh-flawless. But quite a few modifications are utter PITAs, and I find myself constantly needing to make modifications to get X in a UI widget, or to get it to play nicely with Y or not fall behind Z. I may be doing things phenomenally wrongly, but the code hasn't been much of a help and neither has the documentation, so what else is one to do but try and battle the side-effects? I highly doubt my job would pay me to spend the large number of hours necessary to truly understand my way around the codebase, and my free-time is better spent elsewhere, because it's easier to simply do without when major problems crop up. But I'm generally dissatisfied with UI frameworks in general, so part of my ranting may come from that. And I intend to try writing my own, so I'm not just sitting here complaining on the internet :)
- ajpiano 16y agoAll the jQuery UI plugins allow you to fetch cached references to the widget's proxy elements by grabbing the instance from the jQuery data cache. var tabs = $("#mytabs").data("tabs"); tabs.lis.append("<button>Add A Button To All your Tabs</button>"); You can use this to avoid doing crazy DOM traversals to work with and customise widget components. ---- That said, we are aware that the perception you share here is not uncommon and that we need to work to document the shared API of our widgets, and that is something we are planning to address in the near term.
- Groxx 16y agoDidn't know about that one... out of curiosity, where is it documented, and where would I find out what's in each plugin's data (barring inspecting it while it's running)? I haven't seen it mentioned anywhere in the documentation. I may have sounded overly critical / angry with my comment, which wasn't really intended. I fully recognize what a ridiculously hard task making and maintaining the framework has been, and I use a fair number of them frequently and recommend it heavily. It saves me a ton of work. I just fear still having to use a similar-but-updated version of it in a decade; I want something fundamentally different, which is unlikely to come out of jQuery UI (legacy support, large codebase, and all that good stuff), and I'm not even sure what it would look like.
- adovenmuehle 16y agoI'd like to say that Scott Gonzalez and I have been working to unify the API and make it more consistent. When the 1.9 release is out, we're hoping to have less bugs and more consistent code. I believe the effects plugins are also going to be rewritten (draggable, droppable, etc) which should improve consistency and behavior of all the plugins.
- moe 16y agoI agree that Jquery UI leaves a lot to be desired and the widget-selection is an outright pity when compared to the competing frameworks. However in their defense you have to keep in mind that the project is (from what I gather) run entirely by volunteers. It is quite hard to match the inner consistency and widget-count of a YUI or extJS when most of your widgets originally began life as external jquery-plugins from various sources. Under those premises the level of integration they have achieved so far (themeroller et al) is actually quite respectable. Personally I hope at some point a company will step in and sponsor them some fulltime devs. A few dedicated developer-months could probably work wonders here.
- mgutz 16y agoAgree with you. jQuery UI is not at the same level as jQuery. It hasn't been since day one. If it didn't have the jQuery name I wonder how popular it would be. On a related note, jQuery mobile Alpha 3 just released and its awesome. jQuery mobile team has their shit together. Maybe the mobile team should direct the entire UI platform.
- wahnfrieden 16y agoTake a look at Dojo's Dijit widget system for a nice example of consistent and reusable APIs.