[Cubicweb] Upgrading CubicWeb's bundled jQuery ?

Rémi Cardona remi.cardona at logilab.fr
Tue Apr 2 15:14:07 CEST 2013


Hi list,

For the work that was started on Bootstrap during the sprint back in 
December, a new version of jQuery was needed. So I've locally updated it 
to version 1.8.3 which was the latest back then.

Since then, other new versions have been released and I would like to 
discuss the possible upgrade paths:

1. Upgrade to 1.8.3. This looks like a safe upgrade. Its API is broadly 
compatible with the current (1.6.4). Though there have been a few 
removals, they are well documented in the upgrade guides[1][2] and it 
should be easy to spot and fix offending code.

2. Upgrade to 1.9.1. The API it provides is more or less the one 1.8 has 
without all the functions/methods that had been deprecated. To help with 
the migration, a lengthy upgrade guide is available[3] along with a 
special "migrate" plugin[4] that provides a good part of the removed 
APIs (it also spits out warnings when using the old API).

3. Upgrade to 2.0b2. Its API is the same as 1.9. No "migrate" plugin is 
available and support for older IE versions (6 through 8) is removed.

4. Keep the current 1.6.4.

These are the four options, and here are my 2 euro-cents on the matter:

#3 is probably a bad idea for now, as dropping support for IE 8 is 
probably premature for CubicWeb's target audience. Furthermore, 2.0 is 
not even in a final release, so we can probably set it aside for now.

The options boil down to #1 and #2.

#1 is definitely the conservative choice as the migration from 1.6.4 
seems very straightforward and should only require a few greps to make 
sure we're not using deprecated APIs. FTR, I have been running CubicWeb 
along with a full forge instance on 1.8.3 since December without any 
known issue.

#2 (with the "migrate" plugin) is definitely more interesting as we get 
to dip our toes into 2.0 territory without loosing support for old IE 
versions. If the helper plugin does indeed work as intended, the porting 
work for us should be minimal and it buys us time to move to the new 
1.9/2.0 API at our own pace.

My personal preference would be #2, but only #1 is required (for now) 
for Bootstrap.

Cheers


[1] http://blog.jquery.com/2011/11/03/jquery-1-7-released/
[2] http://blog.jquery.com/2012/08/09/jquery-1-8-released/
[3] http://jquery.com/upgrade-guide/1.9/
[4] http://github.com/jquery/jquery-migrate/

-- 
Rémi Cardona - LOGILAB, Paris (France).
Tél: 01.45.32.03.12
Formations - http://www.logilab.fr/formations
Développements - http://www.logilab.fr/services
Gestion de connaissances - http://www.cubicweb.org/



More information about the Cubicweb mailing list