An appropriate interface for a single-page web application?

Historically, I mainly wrote web applications in Django, but now I increasingly find that I want to write single-page web applications using Backbone.js or a similar JavaScript framework with background content that consists entirely of a database and API.

My questions are as follows. If my application structure looks like this:

1. Database | v 2. API methods | v 3. Single-page front-end written with Backbone 

and I'm most comfortable with Django, but also interested in learning new things like NoSQL and Node, if appropriate - what do people recommend using for (2)?

I usually use Django with Piston as an API application, but it seems to have a lot of weight to have all of Django and use it only as an API provider. Perhaps I should not worry.

+8
django javascript-framework single-page-application singlepage
source share
2 answers

If you use Django, which is an MVC framework, and use Backbone, it may be convenient for you to configure the application in pure Node.js or Express.js , with additional modules for connecting to your database choice.

With Express, if you plan to serve only JSON through the RESTful interface, you do not even need to use Views, which is convenient. You will only need to configure models and routes (which also serve as controllers).

+4
source share

Any server structure or language capable of supporting or providing a RESTful API should work. I myself am using Slim PHP right now. But, seeing that you are working against the background of Django / Python, perhaps this post will be useful to you.

Python REST recommendations (web services):

+5
source share

All Articles