根据.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.

相关文章
|
3月前
|
API
【Azure 媒体服务】Media Service的编码示例 -- 创建缩略图子画面的.NET代码调试问题
【Azure 媒体服务】Media Service的编码示例 -- 创建缩略图子画面的.NET代码调试问题
|
1月前
|
安全 Java 网络安全
Android远程连接和登录FTPS服务代码(commons.net库)
Android远程连接和登录FTPS服务代码(commons.net库)
24 1
|
1月前
|
前端开发 JavaScript C#
CodeMaid:一款基于.NET开发的Visual Studio代码简化和整理实用插件
CodeMaid:一款基于.NET开发的Visual Studio代码简化和整理实用插件
|
3月前
|
Kubernetes 监控 Devops
【独家揭秘】.NET项目中的DevOps实践:从代码提交到生产部署,你不知道的那些事!
【8月更文挑战第28天】.NET 项目中的 DevOps 实践贯穿代码提交到生产部署全流程,涵盖健壮的源代码管理、GitFlow 工作流、持续集成与部署、容器化及监控日志记录。通过 Git、CI/CD 工具、Kubernetes 及日志框架的最佳实践应用,显著提升软件开发效率与质量。本文通过具体示例,助力开发者构建高效可靠的 DevOps 流程,确保项目成功交付。
77 0
|
3月前
|
XML 开发框架 .NET
.NET框架:软件开发领域的瑞士军刀,如何让初学者变身代码艺术家——从基础架构到独特优势,一篇不可错过的深度解读。
【8月更文挑战第28天】.NET框架是由微软推出的统一开发平台,支持多种编程语言,简化应用程序的开发与部署。其核心组件包括公共语言运行库(CLR)和类库(FCL)。CLR负责内存管理、线程管理和异常处理等任务,确保代码稳定运行;FCL则提供了丰富的类和接口,涵盖网络、数据访问、安全性等多个领域,提高开发效率。此外,.NET框架还支持跨语言互操作,允许开发者使用C#、VB.NET等语言编写代码并无缝集成。这一框架凭借其强大的功能和广泛的社区支持,已成为软件开发领域的重要工具,适合初学者深入学习以奠定职业生涯基础。
106 1
|
3月前
|
API
【Azure Key Vault】.NET 代码如何访问中国区的Key Vault中的机密信息(Get/Set Secret)
【Azure Key Vault】.NET 代码如何访问中国区的Key Vault中的机密信息(Get/Set Secret)
|
3月前
|
微服务 API Java
微服务架构大揭秘!Play Framework如何助力构建松耦合系统?一场技术革命即将上演!
【8月更文挑战第31天】互联网技术飞速发展,微服务架构成为企业级应用主流。微服务将单一应用拆分成多个小服务,通过轻量级通信机制交互。高性能Java Web框架Play Framework具备轻量级、易扩展特性,适合构建微服务。本文探讨使用Play Framework构建松耦合微服务系统的方法。Play采用响应式编程模型,支持模块化开发,提供丰富生态系统,便于快速构建功能完善的微服务。
51 0
|
3月前
|
SQL 开发框架 .NET
代码更简洁,开发更高效:从零开始使用Entity Framework Core与传统ADO.NET构建数据持久化层的比较
【8月更文挑战第31天】在.NET平台上开发数据驱动应用时,选择合适的ORM框架至关重要。本文通过对比传统的ADO.NET和现代的Entity Framework Core (EF Core),展示了如何从零开始构建数据持久化层。ADO.NET虽强大灵活,但需要大量手写代码;EF Core则简化了数据访问,支持LINQ查询,自动生成SQL命令,提升开发效率。从创建.NET Core项目、定义数据模型、配置`DbContext`到执行数据库操作,EF Core提供了一套流畅的API,使数据持久化层的构建变得简单直接。
41 0
|
3月前
|
存储 Linux 网络安全
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Linux/Linux Container)
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Linux/Linux Container)
|
3月前
|
网络安全 API 数据安全/隐私保护
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Windows)
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Windows)