0

i would like to go for a step-by-step migration of my existing "serverside rendered" webapplications to a more "cientside rendered" approach.

my preferred starting-point would be to change the existing data-handling layer towards an ajax style approach using a rest http-api to handle put/post/get/delete requests.

so my question is... is there an appropriate way to use the collection/model concept of backbone.js to my existing webapplication, without having to use routing/controller/views/templates?

i can add here, that i already have a working rest-httpapi using slimframework. and i would like to use backbone.js model/collections to fetch/save data. but html-rendering and event-binding should be out of backbone.js' responsibility for the moment.

thanks

engulfing
  • 11
  • 3
  • Backbone Models & Collections dont need views or a router to work, so do what you want. – Loamhoof Jul 08 '13 at 11:41
  • i know that backbone.js is flexible enough to support that. but any tutorial/example i found always used the full stack of backbone.js so i would like to get an idea of how the fetch/save on backbone-models could look like without the whole view/template/routing functionality of backbone.js – engulfing Jul 08 '13 at 11:51
  • Have you tried anything? You would really just have to do the same without the views' bindings... Just use some `fetch` and `save`. – Loamhoof Jul 08 '13 at 12:34
  • i tried a lot of things. the main challange i face is synchronization between the html-form's data and the model. and the event binding. i feel that it should be possible. but i am not skilled enough to implement it. so i would like to have some kind of tutorial which shows, how to make the synchronization between the html formular ant the backbone-model, and the event-triggering when pushing the save button needs to be implemented. – engulfing Jul 08 '13 at 15:15
  • Make it easier on yourself and use a view to handle the user interaction with your form. – kinakuta Jul 09 '13 at 01:08
  • well.. i finally went for the whole-stack approach. indeed that made myself easier ;) – engulfing Jul 12 '13 at 08:22

1 Answers1

0

i finally ended up with the "whole-stack" approach. after many hours of elab, there is no doubt to me, that an isolated usage of models without backbone-views and controllers is more painfull, than it helps.

thanks for all input.

engulfing
  • 11
  • 3