“Premature optimisation is the root of all evil”. Whilst that famous quote from Donald Knuth has some truth it, thinking about performance early on when designing and writing code can be a very good thing too. This article explores this and gives practical tips and advice that Software Engineers could use when writing software, that might yield better performance benefits with less effort.
Backbone comes with methods for fetching and saving data models to and from the server. However, we want an application that works offline and synchronizes with the server when online. Therefore we require to communicate models both with the server and with the browser’s local storage. The good news is that a backbone extension “backbone.localstorage.js” provides the communication with local storage, and by simply dropping its .js file. The bad news is that you then cannot communicate between backbone and[...]