Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

restful backend framework for backbone.js and co

what's left to do for a backend framework in order to provide a restful service to a frontend application based on backbone.js or other full MVC frontend framework?

I can think of

  • data
    • storage
    • versioning
    • validation
    • authorization
    • (refential) integrity
  • user authentication
  • event notification to client

what else?

like image 809
Benoît Pointet Avatar asked Feb 19 '11 11:02

Benoît Pointet


1 Answers

A few additional things (though any could probably be considered parts of things you've already mentioned in the question):

Acting as an intermediary

As long as we have domain restrictions on Ajax, it will be necessary to offer a proxy to enable mashups. Even once we fix that problem, though, there are other cases for an intermediary. Take, for example, Twitter's streaming API. Twitter only allows one stream per API key, so your backend app will have to be the consumer that then sends search results to the clients.

Search

Bandwidth and client processing capabilities both limit the degree to which search can be done on the client.

Jobs

Background or batch job processing is often best done on the server. A good RESTful practice is to POST to /jobs, get a 202 Accepted with a Content-Location header pointing to the running job. Subsequents to that job return a status and, if it's complete, a link to the results.

like image 174
James A. Rosen Avatar answered Oct 13 '22 00:10

James A. Rosen