-1

UML has come into many projects with object-oriented programming and is widely taught in colleges. However, today many software projects use a more or less agile approach, avoiding up-front in-depth analysis and leading to many changes ("welcome change"). In contrast, creating correct and readable UML (class) diagrams is still time-consuming; hence the value of documenting the model is in practice often considered time waste, as it changes often.

Even autogenerated (from source code) diagrams are not solving the problem, as they cannot correctly resolve class relationships often have insufficient graph layouts and distracting extensions.

Can UML be used in an agile context in a way that avoids the overhead of frequent manual updates? Or are other lighter alternatives to UML more suitable in such a context?

Christophe
  • 68,716
  • 7
  • 72
  • 138
math
  • 8,514
  • 10
  • 53
  • 61
  • You should know that you can't ask such a question since it's off-topic. – qwerty_so Feb 25 '22 at 12:16
  • "...a practical, answerable problem that is unique to software development..." this is an practical problem of software development, isn't it? – math Feb 25 '22 at 12:20
  • _Are there any_ is simply a no-go. – qwerty_so Feb 25 '22 at 12:21
  • So should I better write: "how to solve this dilemma?" – math Feb 25 '22 at 12:23
  • 1
    You could check if this question is a fit for https://softwareengineering.stackexchange.com/ – piet.t Feb 25 '22 at 12:25
  • Your question is interesting and relevant. However, the way it was worded gave the impression that you are looking for resources (out of scope) or try to start an opinion-based debate (out of scope). I tried to reword it in a more objective way, I hope you can agree. – Christophe Feb 25 '22 at 13:02
  • Thanks Christophe, I greatly appreciate your edits. How to reopen it, or what do the others say, will they close again? Is it now sufficient? I don't want to start an edit war. – math Feb 25 '22 at 13:08
  • It needs people that are convinced it's now worth to reopen it. Not sure if you can vote for your own question. Probably not. – qwerty_so Feb 25 '22 at 13:15
  • @math There are already two reopen votes. We must be patient. I hope it will get reopened: I would be very interested to see other arguments than my own ;-) – Christophe Feb 25 '22 at 13:40

1 Answers1

1

UML can be used in a light way in an agile context. The key is simply to be clear about its purpose and what you expect from modeling in your project.

Class diagrams and sequence diagrams are proven to be good candidates for helping teams to discuss points of concerns. It can express clearly ideas that are not obvious in the code (or scattered across many source files).
Scott Ambler for example wrote a lot on agile modeling, based on UML. Of course, you will not use it for producing an exhaustive model with all classes and all properties. But you'd sketch the core with some relevant classes, and only a few properties that matter in the discussion (Ambler says "Just barely enough" modeling).

However, for architectural modeling (deployment diagrams and the like), UML requires a degree of precision that is not always possible in early stages. Here C4 models has established as a convenient and flexible alternative. But C4 relies on UML for the OOP design discussion. There is simply no alternative that allows to easily show classes and interaction between them, and that would be sufficiently widely known.

Conclusion: In an agile context, don't get misguided thinking that UML would require an exhaustive up-front design. Don't use it as for visual programming either, slavishly replicating details of the code. But use it as a communication tool to highlight key ideas and allow everyone to grasp the design and contribute productively.

Christophe
  • 68,716
  • 7
  • 72
  • 138