0

I wanted to ask if anyone has tried to create a Backbone Model on the server?

I appreciate Backbone is mainly for the client side and on a previous question about this no one recommended Backbone for the server...

I'm not creating a MVC website or designing REST services, and looking more to building something similar to a virtual Aggregation Server. A Backbone model would be ideal for me to initialise data feeds and stores based on events - and push data based on those events.

The trouble I have is that Backbone is dependent on jQuery. I am not using Backbone.View - so wondered if there was a way to use Backbone.Model on the server side in a requirejs.config kind of way?

I've looked at things like Rendr and its not suitable.

Any ideas or thoughts would be greatly appreciated :)

Thanks.

Pandafinity
  • 713
  • 2
  • 7
  • 19
  • https://www.npmjs.org/package/backbone-model – vkurchatkin Aug 31 '14 at 15:24
  • Nope....That package still uses jQuery – Pandafinity Aug 31 '14 at 18:53
  • I can use Backbone.Model on server side without jQuery (just save method and other which used jQuery.ajax to send XHR request won't work). Update: you can also assign your own fake jQuery like this: `Backbone.$ = { ajax: function() {} }` – Eugene Glova Aug 31 '14 at 18:54
  • Do you use a different .sync method or have a different set up? I can't seem to get Backbone up and running as it talks about jQuery - which won't work on the server. – Pandafinity Aug 31 '14 at 18:55

0 Answers0