TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Backbone: Dealing with stateful applications (part 1)

110 pointsby masylumover 13 years ago

5 comments

jashkenasover 13 years ago
Some of the highlights from the post:<p>* 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.<p>* When navigating around, be sure to cancel outstanding ajax requests if the user clicks on another link before the response arrives.<p>* Lazy-loading of associated models is handy, described further here:<a href="http://backbonejs.org/#FAQ-nested" rel="nofollow">http://backbonejs.org/#FAQ-nested</a><p>... and a few more tips:<p>* You don't need to use an event when a simple callback will do.<p>* In terms of JS apps, Tim Toady is your friend: <a href="http://backbonejs.org/#FAQ-tim-toady" rel="nofollow">http://backbonejs.org/#FAQ-tim-toady</a><p>* 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.
yesbabyyesover 13 years ago
This looks like just what I need. I am trying to use Backbone for the first time after eyeing it for a long while, and I'm completely lost as to best practices when it comes to loading and rendering things, either from the router or from a view, and also when it comes to dealing with collections that are part of a model.<p>Here's hoping the next post comes soon!
deetover 13 years ago
One thing I'd like to see covered in discussing stateful web applications is handling concurrent use and modification of data of data by multiple users or even multiple devices/tabs from the same user. Moving state to the client can result in inconsistencies across clients as each one makes changes.<p>Locking data to prevent this is a usability problem. Pushing changes to the each client is a partial solution, but then you're faced with the users watching the data change in front of them, without any action on their part. This is especially a problem in complex applications with multistep workflows.<p>Perhaps it is outside the scope of this series, since this appears to be focused on the technical aspects of using Backbone rather than application design. But a discussion of patterns that overcome these problems would be very useful.
评论 #3541017 未加载
michokestover 13 years ago
One of the biggest challenges we found with big Backbone apps is serving templates. Looking forward to hearing how you serve assets from the backend!
评论 #3539187 未加载
评论 #3539188 未加载
评论 #3540054 未加载
rorrrover 13 years ago
Every time I start reading Backbone documentation, my head hurts. This article is even worse.<p>What they need is a <i>simple</i>, to the point, complete examples of apps. There's one that I found that makes some sense to me:<p><a href="http://documentcloud.github.com/backbone/docs/todos.html" rel="nofollow">http://documentcloud.github.com/backbone/docs/todos.html</a>
评论 #3539882 未加载
评论 #3541285 未加载
评论 #3539945 未加载
评论 #3539764 未加载
评论 #3540405 未加载
评论 #3541654 未加载
评论 #3540026 未加载