TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Backbone: Dealing with stateful applications (part 1)

110 点作者 masylum超过 13 年前

5 条评论

jashkenas超过 13 年前
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.
yesbabyyes超过 13 年前
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!
deet超过 13 年前
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 未加载
michokest超过 13 年前
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 未加载
rorrr超过 13 年前
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 未加载