I am a complete noob with Backbone, I've only been learning it for about 8 hours now, so sorry if this question seems basic. The documentation isn't very clear on this.
The model in question, Product
, needs to run a lot of Ajax calls. Within the logic of my model, I need to run at least 2 Ajax calls within the validation of a model depending on certain conditions.
Not only that, but when certain fields change I also need to run Ajax calls as each field triggers its own change field bubbled from the last change, i.e.:
- A price changes
- The model recalcs the price of the product form a server call
- At the same time a change is triggered on the supplier variable of the model from the price change
- The supplier change must do an Ajax call AFTER the price change.
So what I need to know is: Basically how should I go about converting all my Ajax calls to Backbone? What is the best method here?