exports.definition = {
config : {
// table schema and adapter information
},
extendModel: function(Model) {
_.extend(Model.prototype, {
// Extend, override or implement the Backbone.Model methods
});
return Model;
},
extendCollection: function(Collection) {
_.extend(Collection.prototype, {
// Implement the comparator method.
comparator : function(book) {
return book.get('title');
}
}); // end extend
return Collection;
}
}
Where should i specify url property to communicate with my rest service.
http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Models
Backbone.sync method executes RESTful JSON requests to a URL specified by the Model.urlRoot or Collection.url attribute, when these classes are created. You can either specify in the
Model or Collection.