In theory, the feature could display a messy body of source code as messy diagrams.
The problem with reverse-engineering is that diagrams have the same level of abstraction as original code. If we add into mix the fact that diagrams are more cumbersome than source code, we receive less efficient representation of what we already have in the code. Why we need that?
I have seen two roles of UML where UML might be useful in the projects:
- UML can be used to document important parts of the application.
- UML could be use as substrate for domain specific language.
Reverse-engineering offers a little for the both of uses.
As documenting usually comes before implementing, there is a little to reverse-engineer when we creating the docs.
When the code is generated from UML-based DSL, mapping is usually one-to-many and mapping functions are not easily reversible. Therefore changing one element in UML model affects many places in source code. And even the code structure could change depending on the changes (consider changing multiplicity of the attribute in OR-mapping). This complicates creation of reverse engineering tools greatly. So there are usually no reverse-engineering for DSLs.
One of few cases where it was at least marginally useful was JBuilder’s UML view of the currently selected class. This view were somewhat convenient when get an idea of what is used by the class. However there was no significant advantage over outline view and Ctrl-LEFT_CLICK
No comments:
Post a Comment