0

为了防止正在进行的项目退化,记录整个项目生命周期中的所有变化并更新架构是至关重要的。然而,由于各种原因,情况并非总是如此。因此,已经有一些研究从源代码自动恢复SA。特别有趣的是运行时系统的动态视图。

通过动态视图,我指的是呈现组件之间的方法调用信息的视图(例如 UML 中的序列图)。

由于我没有软件架构设计经验,我的问题是

  • 在分析软件架构动态视图期间,架构师感兴趣的具体信息是什么?通过分析,他需要能够回答哪些具体问题?

例如,

  • 以逐步模式查看组件之间发送的消息是否有用?
  • 呈现方法调用模式有用吗?
  • 呈现高度沟通的组件是否有帮助
  • 组件之间的数据流量是否有助于在动态视图中可视化。
  • 执行方法调用的线程
  • 区分组件的实例(或可视化为类型)。

或任何其他建议。

另外,有趣的是,您在整个职业生涯中都使用过哪些工具?我遇到的一个示例工具是 kieker 框架,它完全符合我的要求,但在我看来缺乏良好的可视化技术。

4

1 回答 1

1

A software architect is typically interested in the components that exist in the application. You should be looking for the things you need in your architecture description (component model, coupling decisions, etc).

Picking the components which have a lot of communication between them might be a point of interest. As far as I can understand from this question you already seem to have an outdated architectural description. Make comparison's with it to see which points have changed, does the new code introduce high coupling? Are the layer rules being violated by the new approach?

Points of interest can include:

  • The class diagram
  • Component model
  • Tier model
  • Layer model
  • Deployment model

Although these might not all be accessible by the tool you can probably work towards them if you keep these things in mind. The process of working from the bottom (source code for example) to the top is called: "Reverse Engineering".

For further reading I would like to recommend these slides.

Update

Dynamic view focuses on monitoring the process and in doing so recovers SA information. As explained by this quote:

Static analysis aims at recovering the structure of a software system, while dynamic analysis focuses on its run time behaviour.

reference

But really, aren't they working towards the same goal? While monitoring the process is different from static analysis both work towards recovering the architecture. The amount of detail such methods should recover (which is likely to be your question) is dependant on the size of your project and the amount of time that is given for this task.

Are we talking about a massive project (complete bank system) or something smaller? It is really a choice between time when it comes to this. As dynamic analysis often takes quite a long time to complete you might ask yourself if you really need all the information the tool can obtain. For a medium sized project I would be interested in the following questions:

  • Which components exist within the project?
  • How are methods called?
  • Which components have to much communication?

With just these three questions it will be possible to recover most of the Component model. In this case you would still be missing a lot of information for your Software Architecture for which I recommend static analysis to recover the class diagram for example/perhaps detect the layer model that is being used (and its rules). Combining the two of them might be a more time efficient solution. The deployment model should not be to hard to create either.

于 2013-08-08T13:33:24.060 回答