Microsoft Visual Studio SDK DSL 工具 - 有认真的人吗?

发布于 2024-07-10 13:35:26 字数 680 浏览 6 评论 0原文

我们正在考虑使用 Microsoft DSL 工具包来创建一些抽象设计器。 我已经做了一些 POC,但想得到一些意见。

这里有人可以分享他们使用 Microsoft DSL Toolkit 和 T4 的经验吗? 此外,任何指向开源 DSL 项目的指针都会有所帮助 - 例如。 Microsoft Service Factory 建模版本严重依赖 DSL 工具包。

由于 OSLO/Quadrant 需要一些时间才能发布,我认为我们唯一的选择就是依赖 Microsoft DSL 设计器。 (请参阅 Kieth 的博客

此外,这里还有一些我已经掌握的有关 DSL 的信息:

1 - MSDN 中的一个不错的实验室DSL 工具

2 - Codeplex 中使用 DSL 工具包的项目列表

We are considering Microsoft DSL toolkit for creating some abstract designers. I already did some POCs, but would like to get some opinions on the same.

Any one here to share their experiences working with Microsoft DSL Toolkit and T4? Also, any pointers to open source DSL projects will help - Eg. Microsoft Service Factory modeling edition is heavily relying on DSL toolkit.

As OSLO/Quadrant will take some time to get released, I think the only option we have is to rely on Microsoft DSL designer. (See Kieth's blog on the same)

Also, here is some information I already have on DSL:

1 - A Nice Lab in MSDN on DSL tools

2 - A List of Projects in Codeplex using DSL toolkit

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

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

发布评论

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

评论(4

以为你会在 2024-07-17 13:35:26

我们在 DSL 方面做了相当多的工作,其中有一些供内部和基于客户的顾问使用,尽管我并不是在这些 DSL 方面做了大量工作的。 一旦你完成了建模(不小的壮举),我会说这些都是很棒的工具。

不幸的是,我无法向您指出任何开源项目,而且我要补充一点,启动并运行一个不平凡的 DSL 的投资相当大,但是如果您正确使用它们,那么生产力的提升将是令人印象深刻的。

编辑 - 经过几年的经验,我做出以下观察

  1. VS DSL 的视觉性能很差 大图,您需要将模型元素折叠起来(隐藏/显示)
  2. 具有许多互连线的大图很难导航(布局很困难)
  3. 大型模型在代码生成等方面表现良好,时间主要花在反序列化上(如预期)
  4. 由于 GUID 数量较多,模型比较很困难
  5. 良好的开发人员体验需要在外部进行大量开发框属性对话框。
  6. 可以对模型进行加密以保护 IP,这使得以后的比较变得极其困难(但对于所有加密文件都是如此。)

We have done considerable work with the DSLs and have a number of them for in house and client based consultant use, though it has not me who has done most work with them. Once you have ironed out the modeling(no small feat) I would say that these are great tools.

I cannot point you at any open source projects unfortuanetly, and I will add that investment in getting a non trivial DSL up and running with is quite large, however if you get them right then the productivity boost is impressive.

edit - after a few years experience I make the following observations:

  1. The VS DSLs have bad visual performance large diagrams, you need fold the model elements away (hide/show)
  2. large diagrams with many interconnecting lines are hard to navigate (layouts are hard)
  3. Large Models perform adequately for code gen etc, with the time taken mostly on deserialisation (as expected)
  4. Model comparison is difficult due to the large number of GUIDs
  5. A good developer experience requires a lot of development over the out of the box properties dialogs.
  6. Models can be encrypted to protect IP, this makes comparison later extremely hard (but this is true for all encrypted files.)
伏妖词 2024-07-17 13:35:26

我研究了 Visual Studio DSL 工具包的使用。 最终,我发现这些工具远远不够。
需要一个 GUI,但没有任何能力来轻松描述底层文本语法,对我来说似乎是不够的。 我需要能够在没有 GUI 的情况下轻松使用 DSL。

Oslo 似乎正朝着一个非常奇怪的方向发展,将 DSL 的所有元数据存储在 SQL DB 中。 这对我来说似乎是无关紧要的,而且肯定会减慢速度,特别是如果您想要快速的 IDE 集成。 诚然我没有深入研究它,所以它可能比我的印象要好。

顺便说一句,我最近使用 Antlr 实现了 DSL。 您可以找到我的帖子作为对有关此问题的答复 这里

I have looked at the use of the visual studio DSL toolkit. Ultimately, I found those tools to be far to constricting.
To require a GUI, without any ability to easily describe an underlying textual grammar, just seems inadequate to me. I require the ability to easily use the DSL without a GUI.

Oslo seems to be going in a very strange direction, storing all metadata for the DSL in a SQL DB. That just seems extraneous to me, and certainly can slow things down, especially if you want fast IDE integration. Admittedly I have not looked deeply into it, so it may be better than my impression of it.

As an aside, I recently implemented a DSL using Antlr. You can find my post as a response to a question on SO about it here

橘味果▽酱 2024-07-17 13:35:26

除了上述之外,还有用于对象角色建模的 NORMA 工具是建立在 DSL 工具之上的。 这是一个非常复杂的示例,说明了可以使用它们做什么,并演示了如何使用 XML 转换进行模型转换和代码生成。

In addition to the above, the NORMA tool for Object-Role Modeling is built on the DSL Tools. It's a very sophisticated example of what can be done with them, and demonstrates using XML Transforms for model transformation and code generation.

能否归途做我良人 2024-07-17 13:35:26

我绝对是一个认真的接受者。 Ivé 最近制作了一个 dsl 来为订购系统的订购流程建模。 我们使用一个 Windows 服务,该服务根据特定行的进程状态连接到不同的 Web 服务,然后根据结果(下一步、错误、拒绝)更改状态。 手动编辑数据库表非常耗时,因此我为 sql 代码制作了一种语言和生成器。

我必须检查是否允许我发布项目中的任何代码,但我发布了数据库结构,以便您可以理解为什么很难手动编辑它。 我必须输入 aprox 的数据。 10 个订单流程,每个流程有 5-20 个步骤,其中包含操作和所有内容(ProcessActionId 是对 Web 服务的引用)。

CREATE TABLE [dbo].[OrderProcessStep](
    [OrderProcessCode] [int] NOT NULL,
    [PreviousProcessStatusCode] [int] NOT NULL,
    [NextProcessStatusCode] [int] NULL,
    [DenialProcessStatusCode] [int] NULL,
    [ErrorProcessStatusCode] [int] NULL,
    [ProcessActionId] [int] NULL,
    [StepComment] [varchar](500) NOT NULL,
    [SecondsToNext] [int] NULL,
    [SecondsToError] [int] NULL,
    [SecondsToDenial] [int] NULL,
 CONSTRAINT [PK_OrderProcess] PRIMARY KEY CLUSTERED 
(
    [OrderProcessCode] ASC,
    [PreviousProcessStatusCode] ASC
)

I´m definitely a serious taker. Ivé recently made a dsl to model orderprocesses for a orderingsystem. We use a windowsservice that that connects to different webservices based on which processtatus a specific row has and then changes the status based on the outcome (Next,Error,Denial). It was very timeconsuming to edit that db-table manually, so I made a language and generators for sql code.

I must check if I´m allowed to post any code from the project but I post the DB structure so you can understand why it´s hard do edit that manually. I have to put in data for aprox. 10 orderprocesses with 5-20 steps each with actions and everything (ProcessActionId is a refrence to a webservice).

CREATE TABLE [dbo].[OrderProcessStep](
    [OrderProcessCode] [int] NOT NULL,
    [PreviousProcessStatusCode] [int] NOT NULL,
    [NextProcessStatusCode] [int] NULL,
    [DenialProcessStatusCode] [int] NULL,
    [ErrorProcessStatusCode] [int] NULL,
    [ProcessActionId] [int] NULL,
    [StepComment] [varchar](500) NOT NULL,
    [SecondsToNext] [int] NULL,
    [SecondsToError] [int] NULL,
    [SecondsToDenial] [int] NULL,
 CONSTRAINT [PK_OrderProcess] PRIMARY KEY CLUSTERED 
(
    [OrderProcessCode] ASC,
    [PreviousProcessStatusCode] ASC
)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文