是否推荐使用GAE类型?
我发现 GAE 为其实体。我读过他们不提供任何验证。所以我想知道:使用它们而不是将数据存储在简单的字符串字段上有什么好处?我有什么理由应该使用它们?
编辑:回答了这个问题
I see that GAE provides several types like Email or PostalAddress for its entities. I've read they don't provide any validation. So I wonder: what's the benefit of using them instead of storing the data on a simple String field? Any reason I should use them?
EDIT: answered at this question
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我希望谷歌能够回答这个问题。一些猜测:
Email
属性,然后将其设置在数据存储实体上吗?您的应用程序引擎应用程序(有一天)可以提供 gdata 风格的 Web 服务吗?I hope Google answers this. Some guesses:
Email
property from a gdata feed and then set it on a datastore entity? Could your app engine app (some day) provide a gdata-style web service?目前,它们的唯一目的似乎是无缝转换为 Google 使用的 gdataatom feed。它们可能是在构建 GoogleApps 的框架上实现的字段,并且包含在 AppEngine 数据模型中。这样,如果您想制作一个与 GoogleApps 交互的应用程序,那就容易多了。
我还确信这些值已正确“标准化”以进行索引。 LinkProperty 的值很可能从 www.stackoverflow.com 更改为 com.stackoverflow.www。
Currently the only purpose for them seems to be that they seamlessly convert to gdata atom feeds which Google uses. They are probably fields that have been implemented on the framework which GoogleApps is built on and were included on the AppEngine data model. That way if you want to make an app that interacts with GoogleApps, it is that much easier.
I'm also certain that the values are "normalized" properly to be indexed. The value of the LinkProperty is most likely changed from www.stackoverflow.com to com.stackoverflow.www.