views:

1017

answers:

5

jQuery 1.3.2 minified is 55.9K, and jQuery UI core itself has more than 110K and top of that each component adds more to this core.

I am wondering good reasons to use jQuery UI over plugins.

For example jQuery accordion plugin has only 3.8K, jQuery Tools which does accordion, tooltips, tabs, scrollable, overlay and expose has only 5.8K, jQuery drag and drop plugin has total 4.8K etc etc.

What is the benefits of using UI instead of using these plugins? Is it worth to add more than 110k+ for what you are using for?

If so, why do you use it?

Can you post your reasons why you use jQuery UI and why you don't use it?

+1  A: 

Plugins are not mantained by jQuery team. jQuery UI is a set of basic plugins that other libraries usually implement in the core library, that are supported and mantained. Only a select hand of plugins made it into UI, a few special interaction like drag and drop, a few widgets and a few effects, from thousands of plugins.

Elzo Valugi
+11  A: 
  • Better support.
  • Better consistency with jQuery in terms of API.
  • Documentation in the same place / same format.
  • No bloat.
  • Compatibility with new jQuery releases maintained.
karim79
I don't think the "no bloat" is real :D
Ionut Staicu
Fine, how about 'not all that much bloat'? :P
karim79
It's cached on the client, I always wonder why everyone complains about an extra 100k.
Hardwareguy
+11  A: 

jQuery UI doesn't have to be used as whole 110kb library. You can download only parts that you need, and then it would be a smaller 'custom build'.

I prefer using jUI because it is created by jQuery Team, so if there is a bug it will be for sure patched (custom plugins sometimes are not updated). And I think jQuery team will always create most optimized version, and if someone will do better, they will update their code, like it was with introducing Sizzle in 1.3.

Thinker
ONLY the core : 165.61 kb uncompressed~110.3 kb minifiedTotal : 450.5 kb uncompressed~300.03 kb minified
subtenante
Thanks for the minus, but you are wrong. jquery-ui-1.7.2.custom.min.js has 8kb size when I checked only core UI.The Total-file-size value on jQueryUI site works wrong.
Thinker
Precisely. The total file size value on the site includes all of the supporting themes and images for those plugins. The js itself is small.
Peter J
Thanks Thinker. I checked it as well and I confirmed it is only 8k for the core.
shin
+3  A: 

I personally feel that JQuery UI is a bit bloated, especially the whole themes feature which makes things rather complicated. If you just need one thing, such as tabs, there's no problem with other "standalone" plugins.

zooglash
+1  A: 

Check out jQuery Tools. I've used it for a few things (tabs etc) and it's quite nice and super small. I also feel jQuery UI is kind of bloated. I'm using accordion, tabs, and datepicker for a project and that whole ui js is 80k !!! Not exactly lightweight.

jQuery tools unfortunately doesn't do widgets (like datepicker). It's a pretty small feature set, but for basic things like tabs, scrollable interfaces, overlays and tooltips, it's spot on!

brad