I have a Backbone collection with a load of models.
Whenever a specific attribute is set on a model and it is saved, a load of calculations fire off and the UI rerenders
You can define a new resource to accomplish this kind of behavior, you can call it MyModelBatch
.
You need to implement a new resource in you server side that is able to digest an Array
of models and execute the proper action: CREATE
, UPDATE
and DESTROY
.
Also you need to implement a Model
in your Backbone client side with one attribute which is the Array of Models and a special url
that doesn't make use the id
.
About the re-render thing I suggest you to try to have one View by each Model so there will be as much renders as Models have changed but they will be detail re-renders without duplication.