Backbone.js with servlet as backend

2019-08-10 18:57发布

问题:

I'm very new to backbone Js. I have gone through the documentation. I'm trying to create a sample aplication with servlet as the backend for saving models. I could not find any help for that. What i need is:

  1. is it possible to communicate with servlet? And if so, how to communicate with servlet? (some sample code)
  2. is router required to communicate with server?

回答1:

Backbone is a client side framework. Its build to work with a RESTful backend. So all you need is a backend that can compute GET, POST, PUSH, DELETE etc. Maybe Restlet is a solution for your backend.