Open der-On opened 10 years ago
I've kind of started to hack such a thing in. However completely outside of the model module. After some thinking I guess it should provide a RESTfull adapter for the server too.
On the client it actually does not work because of "require('./logger')" in the utilities module. Browserify is not able to resolve this require. (I've first started by copying over the in-memory adapter)
Here's what the adapter interface should support: https://github.com/mde/model/blob/master/lib/adapters/base_adapter.js If you'll start a branch, we can chime in with suggestions.
Cool. Gonna see if I can put it to use on both client and server.
Bookmark: https://github.com/visionmedia/superagent This could be used to do the http request stuff on client and server side and thus make it work in both worlds.
It would be very cool to have a client side adapter that is based on restfull routes.
This way one could write almost the same code in frontend and backend and also share the models.
I would give this a try if you could give me tips on how to write adapters.