I’m learning Backbone.js for a new app I’m building.
I need to perform an AJAX call to get more properties for my model object (image, title & description of a book).
Where is the correct place for this call? In the Model, View or somewhere else? specifically related to Backbone.js MVC model.
Additional Info
I’m using LocalStorage and not a server. The AJAX call will be to a web service API and constitutes only part of my actual model data.
If you have properly configured your model you can just call
model.fetch()which will issue a HTTP GET to whateverurlyou have configured and refresh the model with the results from the server.