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

相关文章
|
6月前
|
API
【Azure 媒体服务】Media Service的编码示例 -- 创建缩略图子画面的.NET代码调试问题
【Azure 媒体服务】Media Service的编码示例 -- 创建缩略图子画面的.NET代码调试问题
|
2月前
|
算法 Java 测试技术
使用 BenchmarkDotNet 对 .NET 代码进行性能基准测试
使用 BenchmarkDotNet 对 .NET 代码进行性能基准测试
66 13
|
2月前
|
开发框架 .NET PHP
ASP.NET Web Pages - 添加 Razor 代码
ASP.NET Web Pages 使用 Razor 标记添加服务器端代码,支持 C# 和 Visual Basic。Razor 语法简洁易学,类似于 ASP 和 PHP。例如,在网页中加入 `@DateTime.Now` 可以实时显示当前时间。
|
3月前
|
敏捷开发 缓存 中间件
.NET技术的高效开发模式,涵盖面向对象编程、良好架构设计及高效代码编写与管理三大关键要素
本文深入探讨了.NET技术的高效开发模式,涵盖面向对象编程、良好架构设计及高效代码编写与管理三大关键要素,并通过企业级应用和Web应用开发的实践案例,展示了如何在实际项目中应用这些模式,旨在为开发者提供有益的参考和指导。
53 3
|
4月前
|
安全 Java 网络安全
Android远程连接和登录FTPS服务代码(commons.net库)
Android远程连接和登录FTPS服务代码(commons.net库)
61 1
|
4月前
|
前端开发 JavaScript C#
CodeMaid:一款基于.NET开发的Visual Studio代码简化和整理实用插件
CodeMaid:一款基于.NET开发的Visual Studio代码简化和整理实用插件
101 0
|
6月前
|
Kubernetes 监控 Devops
【独家揭秘】.NET项目中的DevOps实践:从代码提交到生产部署,你不知道的那些事!
【8月更文挑战第28天】.NET 项目中的 DevOps 实践贯穿代码提交到生产部署全流程,涵盖健壮的源代码管理、GitFlow 工作流、持续集成与部署、容器化及监控日志记录。通过 Git、CI/CD 工具、Kubernetes 及日志框架的最佳实践应用,显著提升软件开发效率与质量。本文通过具体示例,助力开发者构建高效可靠的 DevOps 流程,确保项目成功交付。
124 0
|
6月前
|
XML 开发框架 .NET
.NET框架:软件开发领域的瑞士军刀,如何让初学者变身代码艺术家——从基础架构到独特优势,一篇不可错过的深度解读。
【8月更文挑战第28天】.NET框架是由微软推出的统一开发平台,支持多种编程语言,简化应用程序的开发与部署。其核心组件包括公共语言运行库(CLR)和类库(FCL)。CLR负责内存管理、线程管理和异常处理等任务,确保代码稳定运行;FCL则提供了丰富的类和接口,涵盖网络、数据访问、安全性等多个领域,提高开发效率。此外,.NET框架还支持跨语言互操作,允许开发者使用C#、VB.NET等语言编写代码并无缝集成。这一框架凭借其强大的功能和广泛的社区支持,已成为软件开发领域的重要工具,适合初学者深入学习以奠定职业生涯基础。
132 1
|
6月前
|
API
【Azure Key Vault】.NET 代码如何访问中国区的Key Vault中的机密信息(Get/Set Secret)
【Azure Key Vault】.NET 代码如何访问中国区的Key Vault中的机密信息(Get/Set Secret)
|
6月前
|
微服务 API Java
微服务架构大揭秘!Play Framework如何助力构建松耦合系统?一场技术革命即将上演!
【8月更文挑战第31天】互联网技术飞速发展,微服务架构成为企业级应用主流。微服务将单一应用拆分成多个小服务,通过轻量级通信机制交互。高性能Java Web框架Play Framework具备轻量级、易扩展特性,适合构建微服务。本文探讨使用Play Framework构建松耦合微服务系统的方法。Play采用响应式编程模型,支持模块化开发,提供丰富生态系统,便于快速构建功能完善的微服务。
71 0

热门文章

最新文章