Comments on: jQuery plugins are broken! https://j11y.io/javascript/jquery-plugins-are-broken/ Sun, 22 Mar 2015 15:39:22 +0000 hourly 1 https://wordpress.org/?v=5.0.13 By: yogal https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1301 Tue, 16 Feb 2010 09:13:26 +0000 https://j11y.io/?p=1160#comment-1301 > “This is probably contrary to the concept of code-reuse but this is what I tend to do: If I need a piece of functionality and if I know how it’s achieved then I’ll build it myself. Some may think it foolish to constantly re-invent the wheel but I would have to disagree – doing this allows you to progress as a flexible developer – one who can confront many different problems without having to rely on multiple abstractions.”

This is the single best advice you can give to many web developers. This is exactly what I am doing, I’m writing my own jQuery plugins for things quite popular, like form replacements etc. This is also the reason I started to develop my own CMS. Even I sometimes think that it’s reinventing the wheel but my “wheel” will be different, will suit my needs and the feeling of accomplishment rewards everything.

Maybe things I craft will not be as flexible and as durable as ready-made plugins, but I can improve then all the time, I can write HOW I want and WHAT I want.

And the amount of knowledge you gain by simply researching, tweaking, trial & error is immense!

]]>
By: Roger https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1300 Mon, 30 Nov 2009 22:07:51 +0000 https://j11y.io/?p=1160#comment-1300 I’d have to agree that 99% of the jQuery plugins come packed with a solution for every possible problem adding bulk to the plugin.

However, I wouldn’t specifically state that there is a problem with the jQuery plugin architecture but the plugin author.

It’s entirely possible for a jQuery plugin author to make their plugin modular and load extra scripts as required by the options passed to the plugin.

Cycle does not do this but I would imagine someone has done it before.

]]>
By: Jey Balachandran https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1299 Wed, 07 Oct 2009 02:20:08 +0000 https://j11y.io/?p=1160#comment-1299 I gotta agree with you on this, I usually prefer to write my own JS to do the specific task at hand instead of getting a plugin that does what I want, and a hundred other things. Keep it simple, keep it clean.

]]>
By: Marek Stasikowski https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1298 Thu, 24 Sep 2009 12:17:56 +0000 https://j11y.io/?p=1160#comment-1298 BTW, you all of course know, root of what is pre-optimization?

]]>
By: Josh L https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1297 Mon, 14 Sep 2009 20:12:55 +0000 https://j11y.io/?p=1160#comment-1297 The YUI3 library aims to solve the problem presented by this blog post. Instead of plugins that “do it all” and therefore contain a lot of code that you won’t be using, YUI3 emphasizes a type of granularity where you only use the pieces of a module (plugin) that you actually need.

Check out this video for more information:

http://developer.yahoo.com/yui/theater/video.php?v=desai-yui3

]]>
By: GaVrA https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1296 Sun, 13 Sep 2009 17:52:42 +0000 https://j11y.io/?p=1160#comment-1296 Well i wish it all would be that easy… 🙂 I mean like here i am and i say “im going to build new twitter”! As if… 😀 Thats why i say its better to do everything the way you would do for imba mega sites and if you get lucky there would be sooo much less work to be done when you DO start to optimize your site.

I am not talking about that “its not a big deal”, and neither is James(i think), its weather you should use 20k script and use one of its function or make/pull out that one function and put it into 2k script – that is the issue here.

Ofc if you are using every possible function 20k script offers you – then thats ok because there is no useless code. 😉

]]>
By: Hassan https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1295 Sun, 13 Sep 2009 17:14:53 +0000 https://j11y.io/?p=1160#comment-1295 @GaVrA: Totally agreed with you. But as you say, most of web pages we design is not going to be the new twitter. And your’re right, we should do our best, and I think using a 20k script to make better user experience is one of them! It’s not a big deal! 🙂

]]>
By: GaVrA https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1294 Sun, 13 Sep 2009 12:07:18 +0000 https://j11y.io/?p=1160#comment-1294 “like reducing someone’s 225KB background image to something a touch smaller”

Thats another topic… 😛 But also very important.

Before someone start flaming me for previus post, i do know about caching, i am just saying that 1M of new users(without cache) come everyday… 😛

]]>
By: GaVrA https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1293 Sun, 13 Sep 2009 11:56:25 +0000 https://j11y.io/?p=1160#comment-1293 @Hassan

You must think big, if your site is huge and lets say that js file is downloaded 1,000,000 times a day, that is 30M per month.

30M * 20kb = 600,000,000 kb = 585937.5 mb = 572.20 gb

If you have that same script down at 2kb that is 57.2 gb.

I know it sounds silly but i think you should build any web site the best you can. Just because that site is not new twitter or something doesnt mean that you shouldnt optimize it.

Oh and server bandwidth is ridiculously expensive…

]]>
By: subdigit https://j11y.io/javascript/jquery-plugins-are-broken/#comment-1292 Sun, 13 Sep 2009 09:32:59 +0000 https://j11y.io/?p=1160#comment-1292 I agree with the sentiment, but it’s one of those where you have to pick your battles. Every framework and higher order language that abstracts has costs for the abstraction. Depending on how much of a purist you are, we should all probably be coding in assembly (ever see what folks can do in 4KB?).

Besides, agreeing with some of the others above. The size of the scripts one uses on a page isn’t too bad considering the speeds nowadays combined with subsequent caching, even with the 1st hit costs. There’s bigger fish to fry… like reducing someone’s 225KB background image to something a touch smaller 🙂

]]>