Hi there,
I have just stumbled upon spine.js while looking for coffeescript web frameworks.
From a quick look at the docs I gathered that it is pure client-side, server-side agnostic framework. So I am curious to hear what people who use spine on the client choose on the server-side ? What are you using ? Why ?
From the docs I surmise that Rails is a popular option, but I don’t really understand what’s the need for a full-stack server-side MVC framework with a client-side MVC framework such as Spine, so I welcome someone explaining this one to me (apart from the obvious use case of adding complex Ajax to a formerly purely server-side legacy Rails app).
My
noob thinking is the following : if all the user input event
interpretation and resulting html/css template-based UI change is done on the
client with Spine, it seems that the server would only need to perform :
-
model unserialization from JSON REST requests ;
-
user authentication and database access permission verification ;
-
model persistence to a database ;
-
JSON REST response construction from updated models resulting from database operations.
For this, its seems (perhaps naively) to me than neither views nor controllers would be needed. A simple duplication of client models on the server side, together with an http server and authentication library plus a database driver would be enough. Since the Spine models are in coffeescript client-side, a combination of Connect + Express + MongoDB’s NodeJS driver (or Mongoose) + perhaps Passport on top of Node.js server-side looks like it would be enough.
Not so ? What would be missing ? Anyone of you using coffeescript also server-side ?
Thanks a lot in advance for helping out making sense of the too fast growing web framework jungle out there.
Anyway we use Grails on our back end but Rails, Express, Zend or whatever should be just fine. In general though you are right, Spine and other frontend frameworks do open up the door for much simpler back ends or even no back end at all.