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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Organizing Data in Long Lived Applications

1 点作者 EvilTrout将近 12 年前

1 comment

dave_sid将近 12 年前
Interesting. Using composition of objects like that is a sensible enough approach. What about also just implementing lazy loading in your domain objects. If you try to get details of a user and it's already been fetched from the server, then great. If not then fetch it from the server. I guess that's what you're doing in a way, but with lazy loading, the fetching logic would be tied to the entity class and the rest of the application doesn't need to care.