3 ms·
Some of the highlights from the post: * You usually want to avoid having multiple client-side models for a single database row. Keeping your client-side schema
by jashkenas 15y ago
Some of the highlights from the post:
* You usually want to avoid having multiple client-side models for a single database row. Keeping your client-side schema close to your database avoids mapping headaches later.
* When navigating around, be sure to cancel outstanding ajax requests if the user clicks on another link before the response arrives.
* Lazy-loading of associated models is handy, described further here:http://backbonejs.org/#FAQ-nested http://backbonejs.org/#FAQ-nested
... and a few more tips:
* You don't need to use an event when a simple callback will do.
* In terms of JS apps, Tim Toady is your friend: http://backbonejs.org/#FAQ-tim-toady http://backbonejs.org/#FAQ-tim-toady
* You often aren't modeling the complete server-side state in the browser, so look for opportunities to simplify by glossing over data that only concerns the backend.