是否有基于这样的元数据声明生成 UI 的库?>? [英] Is there a library that generates UIs based on metadata declarations like this>>?

查看:15
本文介绍了是否有基于这样的元数据声明生成 UI 的库?>?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否知道一个允许我们通过声明应该生成 UI 来生成 UI 的库?

Do you know about a library that allows us to generate UI by just stating that it should be generated?

我认为一定有人实现了一种机制,允许我们像这样转换代码:

I think there must be a person who have implemented a mechanism allowing us to transform code like this:

class Main {
    @Command
    int add(int a, int b) {
        return a+b;
    }
}

比方说,一个包含 2 个文本字段和一个按钮的对话框?或进入网络表格?你有这个想法,对吗?

into, say, a dialog with 2 text fields and a button? Or into a webform? You've got the idea, right?

UI 的类型和语言并不重要,只要它允许我们简单地说这应该是一个命令",而不会有大量散布在整个应用程序中的 XML 文件.

The type of UI and the language doesn't matter, if it allows us to simply say, "This should be a command" without those lots of XML files scattered all over the application.

顺便说一句,您如何看待这种元编程?

And, btw, what do you think about this kind of meta-programming?

推荐答案

你看过 Naked对象?

这篇关于是否有基于这样的元数据声明生成 UI 的库?>?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆