使用数据库信息填充 Visual DSL

发布于 2024-08-05 12:23:15 字数 552 浏览 3 评论 0原文

我有以下问题需要解决:

  1. 目前,我们有一个数据库模式的元数据树,它具有内存中表示形式和专有模式 XML 序列化(也就是说,我们可以将所有内存中数据读/写到 xml文件)。

目前,我正在开发一个 Visual DSL 解决方案(类似图表),以便更轻松地操作数据库模式,并需要以下指导:

我想从包含数据库模式信息的元数据树填充 DSL 模型,并且我不确定哪种方法是最好的方法(我是 DSL 新手,所以我不确定是否看到了所有可能的方法)。到目前为止,我知道以下内容:

  1. 在 Visual Studio 中创建 DSL 项目时,我取出创建元数据树的架构,然后将其序列化为为新项目创建的 DSL 文件内的 DSL 的 XML 架构。这样,当 DSL 打开时,它将正确反序列化。然而,这需要大量代码来将我们自己的数据转换为 DSL 所需的数据。

  2. 如果可能的话,我希望实例化一棵元数据树,并遍历它,同时通过代码/API 更改 dsl 模型。

    如果可能的话,

因此,任何朝着这个方向(你正在做的方式)的指导对我来说都是有价值的。

I have the following problem to solve:

  1. Currently we have a metadata tree of the databse schema that has a in-memory representation and a proprietary schema XML serialization as well (that is we can read/write all the in-memory data to an xml file).

Currently I am developing a Visual DSL solution (diagram-like), to allow easier operations with the datbase schema and need guidance in the following:

I want to populate the DSL model from the metadata tree that contains the database schema information, and I am not sure which is the best way (I am new to DSL so I am not sure whether I see all the possible ways of doing it). So far I know of the following:

  1. On creating the DSL item in Visual Studio, I fetch out the schema creating a metadata tree, then I serialize it to a the DSL's XML schema inside the DSL file created for the new item. That way when the DSL is opened it will deserialize correctly. However this requires a lot of code to translate our own data to such required by the DSL.

  2. I would like, if possible to instantiate a metadat tree, to traverse it, changing the dsl model at the same time through code/API.

So any guidance into that direction (the way you are doing it) will be valuable for me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

笑红尘 2024-08-12 12:23:15

您可以尝试询问 MSDN 上的 DSL 论坛:http://social. msdn.microsoft.com/Forums/en-US/dslvsarchx/threads

You might try asking the DSL forum on MSDN: http://social.msdn.microsoft.com/Forums/en-US/dslvsarchx/threads

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