简体   繁体   English

如何从Java代码生成系统架构?

[英]How to generate System Architecture from java code?

By System Architecture I mean the computational components of the software system and interactions/relationship among those components. 我所说的系统体系结构是指软件系统的计算组件以及这些组件之间的交互/关系。 The components may be tasks, processes, objects or modules etc. Different components are connected by connectors(procedure call, implicit invocation, message passing, instantiation, shared database etc). 这些组件可以是任务,流程,对象或模块等。不同的组件通过连接器连接(过程调用,隐式调用,消息传递,实例化,共享数据库等)。

I have generated UML diagrams via reverse engineering using Visual Paradigm, but can I also generate Architecture? 我已经使用Visual Paradigm通过逆向工程生成了UML图,但是我还能生成Architecture吗?

Since components and interactions can be not explicit in code in general case you can not generate such diagram automatically. 由于通常情况下代码中的组件和交互无法明确显示,因此您无法自动生成此类图表。 You should study different aspects of your application: source code, existing documentation, user interface, configuration, jira tasks, etc and try to restore the original architecture. 您应该研究应用程序的不同方面:源代码,现有文档,用户界面,配置,jira任务等,并尝试还原原始体系结构。

An "architecture" is just a view of some code properties, that don't change very fast. “架构”只是一些代码属性视图,不会很快改变。 (If a property changes fast, it isn't the basis of an architecture). (如果属性快速更改,则它不是体系结构的基础)。

From this perspective, UML diagrams are a kind of architecture. 从这个角度来看,UML图是一种体系结构。 So is a call graph, and so is any modularization scheme you might have chosen. 调用图也是如此,您可能选择的任何模块化方案也是如此。

The lesson is that "extracting architecture" first requires you decide what properties of the code you want to see abstractly, and then building (if you can) machinery to extract that information. 课程是,“提取体系结构”首先需要您确定要抽象地查看代码的哪些属性,然后(如果可以)构建机器以提取该信息。

Since people mostly don't agree on what properties are useful, you gets lots of arguments about "what's an (my favorite) architecture", and you don't get a lot of tools since they are hard to build and there are lots of them. 由于人们通常不同意哪些属性有用,因此您会收到许多关于“什么是(我最喜欢的)体系结构”的论点,并且您不会得到很多工具,因为它们很难构建并且存在很多他们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM