Sproutcore 与 Cappuccino 数据模型层
我正在喝卡布奇诺。我没有找到有关数据(模型)层的任何详细信息。 Sproutcore 中也存在同样的情况。我错过了什么吗?
I was going through cappuccino. I did not find any details about the data(model) layer. The same exists in Sproutcore. Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 SproutCore 中,模型层提供完整的对象关系映射并管理数据的存储、状态、查询和后端检索等。 Cappuccino 不提供相同意义上的模型层,因此从我所见(例如 http://github.com/suitmymind/cappuccinocasts-episodes/tree/master/009)您可以直接将请求发送到后端,然后将结果加载到对象中并处理状态,查询等等。
In SproutCore the model layer provides full object-relational mapping and manages things like storage, state, querying and back-end retrieval of the data. Cappuccino does not provide a model layer in the same sense, so from what I've seen (e.g. http://github.com/suitmymind/cappuccinocasts-episodes/tree/master/009) you would instead directly send requests to your back-end and then load the results into objects and handle state, querying, etc. yourself.
正如 bruz 所说,Cappuccino 在数据层上可能比 SproutCore 更加自由。也就是说,您可以插入 Nicholas Small 的 CPActiveRecord 或 Raphael Bartolome 的 Core Data Cappuccino 可以获得更加自动化的模型体验,同时还能以各种方式管理服务器连接。
Like bruz says, Cappuccino is probably more freeform at the data layer than SproutCore. That said, you could plug in Nicholas Small's CPActiveRecord or Raphael Bartolome's Core Data Cappuccino to get a more automated model experience which also manages server connectivity in various ways.