CouchDB:模式驱动的数据输入 UI

发布于 2024-10-08 00:14:28 字数 421 浏览 0 评论 0原文

是否有一个工具(我怀疑 SQL 数据库中存在类似的工具)可以让我定义一个模式并构建一个数据输入 UI,用户可以填写该 UI 将数据推送到 couchDB?

理想情况下,这看起来像这样:

  1. 我定义一个数据模式(XML 或任何东西,如何做并不重要),例如:

名称, 简短的描述, 颜色, 图片(附件)。

它不必支持数据类型、长度、图像大小或任何其他验证。

  1. 有一个 UI 将显示用户可以填写并单击按钮的每个数据字段的字段。

  2. 在 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:

  1. 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.

  1. There is UI that will display fields of each of the data fields that users can fill out and click a button.

  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

中性美 2024-10-15 00:14:28

我不知道有任何类似的开箱即用的东西。有一个 json 模式,但它是相当新鲜的技术,并且没有 UI 工具来自动化它的使用。

最快的解决方法是对 CouchDB 文档数据使用 XML:http: //www.cmlenz.net/archives/2008/03/couchdb-xml-and-e4x

在这种情况下,您可以:

  1. 为您的文档编写 XML 架构
  2. 使用具有 xml 架构支持的编辑器
  3. 将结果批量上传到 CouchDB简单脚本

另一种方法是使用您熟悉的任何快速 UI 框架构建自定义编辑器。巧合的是,我现在正在使用 Adob​​e 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:

  1. write XML Schema for your docs
  2. use an editor with xml schema support
  3. bulk upload results to CouchDB with simple script

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.

寻找我们的幸福 2024-10-15 00:14:28

不幸的是,没有神奇的工具可以根据模式定义为 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文