Should We Upgrade ImpressCMS Core to jQuery 1.4?

Recently, jQuery 1.4 was released, with a maintenance release 1.4.2 a few days ago. In a move comparable to what we are doing with ImpressCMS release 1.3, the jQuery developers chose the jQuery 1.4 release to be a release focused on speed and cleanup of the codebase. Mostly, just cleaning up the codebase results in quite some speed advancements, so those two efforts are frequently combined.

The changelog for this latest release of the Javascript library mentions performance improvements in many areas : CSS methods, Attributes and many of the most-used functions. However, the changelog also details some backward incompatible changes with previous versions. These incompatibilities can be countered by installing this specific plugin.

[ad name=”horiz-banner”]

At ImpressCMS, we had a short discussion  about switching to the latest-and-greatest release of jQuery, which is our default bundled javascript library. Some people wanted to switch immediately to get the speed increase, others (including me) advised more caution. At the moment of writing this however, I’m still reviewing the options before we start development on ImpressCMS 1.3 at full speed.

Why not to upgrade

When changing one of the dependencies of the ImpressCMS core, it has impact on almost every part of your system. That impact can be quite widespread, certainly in a system that uses modules quite extensively. At the moment we’re still integrating jQuery usage into the core of ImpressCMS, so the module needs to include jQuery explicitly before it is used. That lessens the impact of a jQuery version change, but it doesn’t ensure all will work well.

We could also upgrade to 1.4 and include the compatibility plugin, but that might negate most of the speed gains again. That will need to be tested though.

Why upgrade?

In the near future, marcan has indicated that the people at INBOX are considering adding some more jQuery functionality to the IPF layer on which the core is built. Also, Skenow has proposed plans for a new and improved Forms class, and that class could also introduce jQuery usage in the core.

Upgrading in the maintenance release 1.3 would mean that the upgrade to the latest jQuery 1.4.2 is done before usage in the core takes off. That means less (or no) migration for core Javascript files.

In short

jQuery upgrades shouldn’t be done without considering the impact they might have. In the end, the gains should outweigh the effort and risk involved.

To be continued…

Leave a Reply