Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

backbone.js Model Sync and C# .net RESTful web services

I'm completely lost and apparently have fall way behind with regards to my web services. In my current applications I perfer simple ajax calls on .asmx files. With my latest work I'm trying to implement backbone.js and would like to use the models in conjunction with some RESTful web services.

I know I could override the sync function of backbone but I would really like to utilize it with some .net webservices.

Has anyone done this before and might have an example of how, I can't find an example or tutorial anywhere to even point me in the right direction. If anyone has any ideas on where I should start.

i can't seem to add a comment but I will be using JSON

like image 974
Collin Estes Avatar asked Nov 14 '22 13:11

Collin Estes


1 Answers

I would not bother with the backbone synch, don't go overriding it, it will be to tricky to hack in whatever you need.

build your own ajax calls to the webservice with callback functions, that put the returnvalues in models or collections via the model.set(attributes, [options]) && collection.reset(models, [options])

like image 101
Sander Avatar answered Jan 08 '23 19:01

Sander