用于用户界面定义的 XML
我正在寻找信息来选择用于用户界面定义的 XML 以在新项目中构建 UI。该项目的目标是在 Web 和桌面环境中运行并支持跨平台。因此我关注 XUL 和 XForms,但我不熟悉 XForms。请给我一些建议,有什么缺点和优点以及它们的未来。谢谢。
I'm looking for information to choose a XML for User Interface Definition to build UI in new project. The project's objective is running in both web and desktop environments and support cross-platform. Therefore I focus on XUL and XForms but I'm not familiar with the XForms. Please give me some advices, what are cons and pros and the future of them. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可能需要考虑 Metawidget。选择好的 XML 格式只是战斗的一部分。然后,您需要将该 XML 转换为正常运行的 UI。 Metawidget 负责处理这个问题(对于许多平台),并让您根据需要插入自己的 XML 格式。
以下是将 XML 模式作为格式插入的示例: http://blog.kennardconsulting.com/2013/03/xml-schema-wsdl-and-soap-ui-generator.html
You may want to consider Metawidget. Choosing a good XML format is only part of the battle. You then need to turn that XML into a functioning UI. Metawidget takes care of that (for many platforms), as well as letting you plug in your own XML format as desired.
Here's an example of plugging in XML Schema as a format: http://blog.kennardconsulting.com/2013/03/xml-schema-wsdl-and-soap-ui-generator.html
我会选择 MXML (Adobe Flex)。它可以是闪存(浏览器)和空中应用程序(桌面)。
I would go with MXML (Adobe Flex). It could be both a flash (browser) and air application (desktop).
XForms 现在越来越流行,因为有跨浏览器实现,例如 XSLTForms 和 Ubiquity XForms,不需要安装任何东西。
XForms is more and more popular now because there are cross-browser implementations such as XSLTForms and Ubiquity XForms which don't require to install anything.
我会避免使用 XUL,因为它仅适用于 Firefox,并且将在 Firefox 4.0 中被删除。
I would avoid XUL since it's Firefox-only and is going to be dropped for Firefox 4.0.
如果您希望保留项目的“Web”部分,并且您的意思是它可以在任何浏览器中运行,那么 XUL 不是一个选择。您可以将其用作 Firefox 扩展,也可以使用 XUL 构建独立的应用程序(不在浏览器中运行),但它不是一种跨浏览器构建 UI 的技术。
If you wish to retain the "web" portion of your project, and if by that you mean that it runs in any browser, XUL is not an option. You can use it as a Firefox extension, or you can build a stand-alone application (not running in a browser) with XUL, but it is not a technology for building a UI across browsers.
从此处查找包含大量外部链接的完整综合介绍。包括:
据我所知,JavaFx 与基于 XML 的 UI 定义有着密切的联系。此外,QML 是 Qt 的基于标记的 UI 定义语言,许多项目(例如 Ubuntu)都使用它。在 Gnome 领域中,您可以使用 Glade(开源软件)从拖放创建的 UI 中创建 XML 文件,然后许多库使用该文件在运行时重建预期的 UI。
Find a full comprehensive introduction with lot's of external links from here. Including:
Also as far as I remember, JavaFx has close ties to XML based UI definition. Also QML is a markup based UI definition language for Qt which is used by many projects such as Ubuntu. In Gnome realm you can use Glade (opensource software) to create an XML file from your drag-n-drop created UIs, which is then used by many libraries to reconstruct intended UI at runtime.