Titanium JIRA Archive
Alloy (ALOY)

[ALOY-576] Upgrade to Backbone 1.0

GitHub Issuen/a
TypeEpic
PriorityMedium
StatusResolved
ResolutionDuplicate
Resolution Date2014-09-26T14:48:09.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsModels, Runtime
Labelsnotable
ReporterTony Lukasavage
AssigneeFeon Sua Xin Miao
Created2013-03-20T12:45:54.000+0000
Updated2015-04-13T16:26:56.000+0000

Description

Comments

  1. Far 2014-05-19

    Any news? Backbone is 1.1.2 already/
  2. Andrew McElroy 2014-05-19

    So i bugged Tony about this at tiConf NY. If you really have to have backbone version X >= 1.0 then do the following create a directory at the root of your alloy project called lib. then do the following lib/alloy/backbone.js clean and compile your project. congrats. I haven't ran alloy through all its paces to know if that breaks anything, but it didn't appear to break models (which was my motivation), nor views or controllers.
  3. Tony Lukasavage 2014-05-19

    [~sophrinix] is right. The only thing I'm aware of off-hand is that it will likely break the sql adapter. We will try to work this ticket into a version soon, but this workaround should suffice in the meantime.
  4. Far 2014-05-19

    Yep. I tried to replace old backbone with new but it broke sql adapter.
  5. Timan Rebel 2014-05-23

    I grew so frustrated with BackBone 0.9.2 that I decided to fix it myself. I downloaded the latest backbone.js and placed in lib/alloy The SQL adapter was indeed the problem and the following line is causing the crashes:
       model.length = len;
       
    (line 176) Backbone 1.0+ does also remove and update models in a collection, not only adds them. It uses the length of the Collection before the fetch, to determine whether and which models need to be deleted. By setting the length of the Collection in the sync adapter, this functionality breaks. The real issue with upgrading will probably lie in the implementation of the developers using Alloy, because several events have changed as well. It's a breaking upgrade for some. If you do want to start using BackBone 1.0+, remove the mentioned line.
  6. Tim Poulsen 2014-09-26

    This is resolved by ALOY-1074 and its related tickets (e.g. ALOY-1075, ALOY-1148)

JSON Source