根据.Net代码自动生成UML Sequence 图。

简介: Sequence Diagram Generator for .NET I was recently asked about programs that can automatically generate sequence diagrams from code.

Sequence Diagram Generator for .NET

I was recently asked about programs that can automatically generate sequence diagrams from code. While this seems like a somewhat trivial task, there aren’t any good ones. I figured I’d share what I knew, tho. Maybe someone else knows of something better.

The first option that came to mind was Visio. I have to admit I’m not a fan of Visio. If you’re designing or documenting network topology, I’m sure it’s great. I don’t do that, tho. I work with software, and Visio is horrible for that. If you want to give it a try, tho, you can export your project from Visual Studio. Unfortunately, this won’t create a sequence diagram for you, so it was even more useless for what I was needing.

The next thing that came to mind was a tool built to do exactly this, SequenceViz. This tool analyzes an assembly and creates a sequence diagram. You’d think the search would be over, but not quite. The problem with SequenceViz is that, if you try to map out anything complex, the diagram is useless. Not because it’s all jammed together; the tool doesn’t scale… at all. Beyond this, the tool has some promise. The only other complaint I really have is the install experience. There are some odd dependencies that aren’t included in the installer, so you have to go hunt them down and install them separately. I hate this. Given the power of WPF, I would’ve preferred to use the capabilities built into .NET.

The next thing I thought about was my favorite modeling environment, Sparx Systems Enterprise Architect. The problem here is the automatic generation thing. To my knowledge, it doesn’t do that. I could be wrong, tho, so if you’re looking for an all-up modeling environment, I recommend you start here. If the price tag is a problem, take a look at StarUML, which is open source. StarUML hasn’t updated in a few years, tho, which is disappointing.

The last tool I found was a Visual Studio add-in called Flow Chart 4 C#. This tool generates a flow chart – not a UML activity diagram – for a given code block. This isn’t exactly what I was looking for and, honestly, I wasn’t impressed. If I were to need something like this, I’d prefer standard UML over some non-standard flow chart visualization.

One thing I’ve wanted for a long time has been a complete MDA environment for Visual Studio. When the domain specific language (DSL) Tools was released, I thought this would be a great tool to help get there, but it seems I’m the only one interested in it. Microsoft has a vision, but it’s at a much higher level. I’m thinking about an almost completely pure MDA approach where you don’t need much code. Most are probably scoffing at this, but I’m not talking about getting rid of code. I’m talking about code = model and model = code. There should be no difference between the two. I’ve put some thought into it, but don’t really have the time to dedicate to working on it. Maybe after a few more side projects.

相关文章
|
监控 物联网 API
【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示
MQTT广泛应用于工业物联网、智能家居、各类智能制造或各类自动化场景等。MQTT是一个基于客户端-服务器的消息发布/订阅传输协议,在很多受限的环境下,比如说机器与机器通信、机器与物联网通信等。好了,科普的废话不多说,下面直接通过.NET环境来实现一套MQTT通信demo,实现服务端与客户端的双边消息发布与订阅的功能和演示。
955 0
【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示
|
4月前
云效静态代码检测可以检测.net吗?
云效静态代码检测可以检测.net吗?
28 1
|
7月前
|
算法 编译器 API
|
11月前
|
开发框架 .NET 数据安全/隐私保护
ASP.NET验证控件合集 含代码演示
ASP.NET验证控件合集 含代码演示
|
11月前
|
数据挖掘 Python
4.【.netcore Configuration】理解Configuration中Section弱方式读取和Binder模式的强类型读取代码
4.【.netcore Configuration】理解Configuration中Section弱方式读取和Binder模式的强类型读取代码
86 0
|
存储 开发框架 前端开发
ASP.NET 中验证的自定义返回和统一社会信用代码的内置验证实现
本文介绍 ASP.NET 中内置的验证功能,并介绍如何自定义验证返回信息,最后以统一社会信用代码为例,实现自定义的数据验证。
188 0
ASP.NET 中验证的自定义返回和统一社会信用代码的内置验证实现
|
JSON 缓存 小程序
.NET生成小程序码,并合自定义背景图生成推广小程序二维码
.NET生成小程序码,并合自定义背景图生成推广小程序二维码
209 0
.NET生成小程序码,并合自定义背景图生成推广小程序二维码
|
监控 Shell
.NET自动安装zabbix客户端(代码)
using System; using System.Collections.Generic; using System.Text; using System.
897 0