gomoob/backbone.isomorphic

Implement a data server retrieval sample

bgaillard opened this issue · 2 comments

Implement a server side rendering sample which retrieves data from a database, because the sample should be light we could do it using one of those DB / libraries :

Yes an example using data would be great as I'm a little unsure what the best approach would be. I've not had a play around with it yet but i'm guessing you would load your data into the views on the server side routes. This is something I'd typically do in my front end controller so would you leave that in place or remove it.

Hi @dottodot, I implemented a first very simple sample yesterday.

This sample uses node-sqlite3 and can be accessed at http://localhost:3000/frameworks/1.

Please take a look at the following files and directories

  • src/data contains test data
  • src/js/db.js reads the data and initialize an SQLite3 db with those data
  • src/js/dal contains only data mappers for now
  • src/js/service contains business services

I'll improve this later when i'll have more time.