Discussion:
jQuery alternatives?
Luke Bryan
11 years ago
Permalink
Greetings all,

I heard about an interesting library some time ago called Zepto js. It's
apparently a very lightweight, jQuery-compatible library that in some cases
can be much faster than jQuery (see http://www.greensock.com/js/speed.html)

Considering that the only downside of this seems to be that it doesn't
officially support ancient IE9 or older browsers, I was curious if
Wordpress developers had considered swapping it out or using some other
jQuery alternative at some point in the future?

Best regards,
Luke
Nikola Nikolov
11 years ago
Permalink
Hi Luke,

That's a little bit off the topic, but I don't think IE 9 is ancient - I
personally don't use it, but I think IE 9 is a browser that should be
supported(IE 8 is questionable, but I don't bother with it).
It's fine for a specific project(where you have a target audience) to drop
support for IE 9, but it's not acceptable to do so in a massively used
product such as WordPress.

Besides - you can always use Zepto.js in your projects - I assume you'll
still end-up loading jQuery, since pretty much any plugin that uses
JavaScript on the front(or back)-end uses jQuery.

All the best,
Nikola
...
Simon Vart
11 years ago
Permalink
Hi Luke,

I just read that last week and thought I could share :
http://zurb.com/article/1293/why-we-dropped-zepto

Regards
--
---------------------
Simon Vart
développement web / informatique
----
c/o M. Cortyl
17 Rue de la Mare Pavée
35235 Thorigné-Fouillard
---
06.09.97.82.91
www.exigences.biz
linkedin : http://www.linkedin.com/profile/view?id=87258047
twitter : @simonvart
skype: carantecinfo
---------------------
...
Chris Williams
11 years ago
Permalink
Given that IE9 and earlier still represent something like 5-10% of a
random sampling of various browser stats sites, abandoning it is done at
your peril.

All of that, and if you look on the front page of jquery.com you'll see
that WP is listed as a "corporate member". :)
...
Scott Herbert (via Phone)
11 years ago
Permalink
OT to something OT

Sadly some of us are stuck with ie8 (running in compatible mode) due to other more important business system only running on ie7 (we want to upgrade, but our supplies won't upgrade their software).

Just a reminded that not every one using an old version of ie can upgrade :(
...
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Otto
11 years ago
Permalink
On Sat, Feb 1, 2014 at 4:22 PM, Scott Herbert (via Phone) <
Post by Scott Herbert (via Phone)
OT to something OT
Sadly some of us are stuck with ie8 (running in compatible mode) due to
other more important business system only running on ie7 (we want to
upgrade, but our supplies won't upgrade their software).
Just a reminded that not every one using an old version of ie can upgrade :(
Chrome has a solution for you or your organization:

https://www.google.com/intl/en/chrome/business/browser/lbs.html

Pass it along. :)

-Otto
Chris Williams
11 years ago
Permalink
In many organizations the dominant restriction is ANY change, not
specifically what the change is.

I'm several hundred hours in the development of a complex web application
where I would LOVE to rely on only standards capable browsers (e.g. IE10
or greater). But alas, I'm not sure the target will even have IE8... And
no amount of push to upgrade -- to ANYTHING -- will gain traction.
Post by Otto
On Sat, Feb 1, 2014 at 4:22 PM, Scott Herbert (via Phone) <
Post by Scott Herbert (via Phone)
OT to something OT
Sadly some of us are stuck with ie8 (running in compatible mode) due to
other more important business system only running on ie7 (we want to
upgrade, but our supplies won't upgrade their software).
Just a reminded that not every one using an old version of ie can
upgrade
:(
https://www.google.com/intl/en/chrome/business/browser/lbs.html
Pass it along. :)
-Otto
Luke Bryan
11 years ago
Permalink
Good point, I suppose Zepto wouldn't be compatible with jQuery-dialog and
other plugins as well?

I see that example I gave was using jQuery 1.10 which is probably the speed
difference.
Andrew Nacin
11 years ago
Permalink
Post by Luke Bryan
Considering that the only downside of this seems to be that it doesn't
officially support ancient IE9 or older browsers, I was curious if
Wordpress developers had considered swapping it out or using some other
jQuery alternative at some point in the future?
We have no plans to drop jQuery.

Few libraries are more battle-tested than jQuery. They account for things
that most libraries dismiss as edge cases. And yes, that includes edge
cases in "modern" browsers, not just Internet Explorer < 8, 9, 10,
whatever. See also https://news.ycombinator.com/item?id=7153630. They also
have been moving forward with their jQuery 2.0 branch, along with newer
tools (say, modularization), all which show they are willing to continue to
evolve.

jQuery also keeps our barrier to entry for core development low, because
we're using a common "language" that is easy to understand, ubiquitous, and
handles a lot under the hood so we don't need to. They also well-backed by
a strong team of contributors and they're going to be around for a long
time. And even if it is slower than some other library than may be out
there (note -- jQuery is by no means slow, and even then they've been making
huge strides), it's absolutely worth every penny for the convenience and
wide knowledge factor. All libraries and languages add some sort of
overhead. The key is to weigh whether the performance cost is worth making
things easier. Otherwise we'd all be writing in ARM machine code.

We also happen to have a fantastic relationship with the jQuery core team.
This cannot be overstated. They help us, we help them, and when bugs in
WordPress or jQuery affect the other project, things get escalated and
fixed very quickly (like, in a matter of hours). They also share our
philosophies not only of an open web and a willingness to work everywhere,
but of backwards compatibility. Shared vision is probably the most
important thing to consider when we look at third-party libraries.

Nacin

p.s. If you re-read this replacing '"jQuery" with "WordPress," you could
re-use this as a spirited defense of using WordPress over some other new
hotness. They are the WordPress of JavaScript libraries.
Paul Menard
11 years ago
Permalink
"They are the WordPress of JavaScript libraries"

Best damn quote so far this year!
...
Loading...