0

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.

Community
  • 1
  • 1
planetp
  • 14,248
  • 20
  • 86
  • 160

1 Answers1

1

I would do that client-side by overloading the Backbone.Model.parse() to add the desired functionality.

TMichel
  • 4,336
  • 9
  • 44
  • 67