CouchDB:模式驱动的数据输入 UI
是否有一个工具(我怀疑 SQL 数据库中存在类似的工具)可以让我定义一个模式并构建一个数据输入 UI,用户可以填写该 UI 将数据推送到 couchDB?
理想情况下,这看起来像这样:
- 我定义一个数据模式(XML 或任何东西,如何做并不重要),例如:
名称, 简短的描述, 颜色, 图片(附件)。
它不必支持数据类型、长度、图像大小或任何其他验证。
有一个 UI 将显示用户可以填写并单击按钮的每个数据字段的字段。
在 couchDB 中创建文档。
Futon 似乎不适合这里,因为它的数据输入过程是无模式的,此外,我还没有弄清楚如何在其中附加文件,而且我不希望用户学习所有的木东西。
非常感谢您对此的所有想法。
Is there a tool (I suspect something like this exists for SQL databases) that will allow me to define a schema and build a data-entry UI that users will fill out to push data to couchDB?
Ideally, this would look like this:
- I define a data schema (XML or anything, that's not important how) something like:
Name,
Short description,
Color,
Image (attachment).
It does not have to support data types, length, image size or any other validations.
There is UI that will display fields of each of the data fields that users can fill out and click a button.
A document is created in couchDB.
Futon does not seem to suit here since it's data entry process is schema free, besides, I haven't figured how to attach files in it and I don't want to users to learn all the woodoo.
Many thanks for all your ideas on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道有任何类似的开箱即用的东西。有一个 json 模式,但它是相当新鲜的技术,并且没有 UI 工具来自动化它的使用。
最快的解决方法是对 CouchDB 文档数据使用 XML:http: //www.cmlenz.net/archives/2008/03/couchdb-xml-and-e4x
在这种情况下,您可以:
另一种方法是使用您熟悉的任何快速 UI 框架构建自定义编辑器。巧合的是,我现在正在使用 Adobe Flex/Air 为我的工作项目构建这样一个编辑器。
I'm not aware of anything like this working out of the box. There is a json schema out there but it's rather fresh technology and there is no UI tools to automate it's use.
The quickest work around is to use XML for CouchDB documents data: http://www.cmlenz.net/archives/2008/03/couchdb-xml-and-e4x
In this case you can:
The other way to do it is to build custom editor using any rapid UI framework you are comfortable with. By a coincidence I'm building such an editor for my work project using Adobe Flex/Air right now.
不幸的是,没有神奇的工具可以根据模式定义为 Couch 数据库创建 UI。但是,您当然可以编写 CouchApp 或任何类型的 Web 应用程序来显示 UI,无论您如何编写。 Couch 和 RoR 都有驱动程序,因此您可以通过这种方式生成脚手架,但目前还没有适用于 Couch 的脚手架生成器。
Unfortunately there is no magic tool to create a UI for a Couch database from a schema definition. However, you can certainly write a CouchApp or any sort of web application to display the UI however you write it. There are drivers for Couch and RoR, so you could generate a scaffold that way, but again currently there is no scaffold generator for Couch.