In my web app I need to render a category tree, stored in a MySQL database. The data is fetched by the app using AJAX. I can build the tree either on the server or a client. I wonder where to put this logic. Should the server return the prepared tree, or just plain database rows? I'm using backbone.js in the client code.
Asked
Active
Viewed 218 times
1 Answers
1
I would do that client-side by overloading the Backbone.Model.parse()
to add the desired functionality.

TMichel
- 4,336
- 9
- 44
- 67
-
I had the same idea, just using `Backbone.Collection.parse()` :) – planetp Jul 22 '13 at 15:35
-
glad it helped. Consider accepting the answer if you are done. – TMichel Jul 23 '13 at 09:42