0

I have an old backbone-rails application which was written back in 2011 (probably dependencies last updated in 2013 or so). It has a very old UI so I thought to update it by applying nice bootstrap material design. It is not so simple as it sounds because jquery is a backbone dependency which is 2011 version. As I import any bootstrap theme, things like navigation drawer don't work because backbone's jquery (older version) overrides newer jquery due to order of imports. If I remove older jquery and just use newer one from CDN, app crashes due to probably some methods which were there in older jquery but not in newer one. Even if I try to upgrade backbone version to latest, app breaks (as expected).

I am confused, how to start about upgrading this ? I understand that this is a very specific problem, probably some experienced guy can help who had a similar one.

PS : No option to move to angular or react, backbone code is too much to be rewritten right now (and is a management call)

Gagan93
  • 1,826
  • 2
  • 25
  • 38

1 Answers1

1

jQuery has an upgrade guide. They even have a migration plugin. So you need to follow it and upgrade jQuery to the latest version that is supported by the bootstrap version you're using.

Upgrading jQuery might break old backbone code, so afterwards you might need to upgrade backbone but this will be relatively as easy as just updating the CDN to newer version of Backbone.

T J
  • 42,762
  • 13
  • 83
  • 138