Here's a challenge, to help appreciate the nature of these: try to find an error in the diagrams.
It's usually harder than you might think, since, even when you know the notation and metamodel semantics, it's information-dense talking about a domain.
You usually have to know or learn a lot about the domain, and/or have an domain expert you can walk through it exhaustively, before you can find errors.
And an error can be whopper: a single graph edge missing, or between the wrong vertices, or with the wrong adornments can have huge implications.
For example, large amounts of work that have to be redone, or a project abandoned, or a mess that takes 10x longer than it should to write, and 10x the tech debt going forward with a bad architecture, or a fundamental security flaw.
One of the mistakes many people make is treating formalized diagrams as "marketecture" visuals, like they only need for handwaving sales presentation slides, where there's some kind of visual for every concept they want to be able to literally point to.
Nope, if you have software engineers and domain experts communicating and reasoning about your system in only the fuzzy terms of sales/exec presentations, you're really stabbing yourself in the face.
Easy peasy, it's the 3rd blue line above the purple line /s
https://github.com/takaakit/uml-diagram-for-ddd-example-in-e...
I can't believe someone took time to generate such a thing, as if it is useful to anyone
Thanks for saying this. UML is beyond useless, almost nobody understands it, almost nobody does it right and almost nobody uses it when they need to (because it makes no sense to them).
Then the company progressed and eventually we got to market fit and for two years the team and I were dealing with this increasingly burdensome complexity that we were not reaping any rewards of. Then one day we had enough and a colleague redesigned the system to ditch the extra complexity resulting in a much more elegant design that was easier to reason about.
That bliss continued for less than a year, until some customers asked for a particular report that we needed to generate based on a structure of the information that was now no longer present. We had to redesign it again, migrating was super painful and involved a temporary workaround that basically involved an extra branch on literally every piece of code that touched the inspection system.
In retrospect, I still don't know how I could have convinced the team that the complexity was something we needed when no customer required it for 3 years. Especially when the colleagues who took over that system from me had gained much more experience and expertise in the domain than I had since I had designed the original.
It would probably have been better if I had recorded the requirement that prompted the complexity, but had not actually implemented it as no customer had actual need for it at the time. Then we would not have had to deal with the complexity the first three years, and then evolved the product when the need arose.
The clients you have on day one are often very different from the ones you’ll have a few years in. Even if they’re the same organisations, their business, expectations, and tolerance for complexity likely have changed. And the volume of historical data can also be a factor.
A pattern I’ve seen repeatedly in practice: 1. A new system that addresses an urgent need feels refreshing, especially if it’s simple. 2. Over time (1, 3, 10 years? depending on industry), edge cases and gaps start appearing. Workarounds begin to pile up for scenarios the original system wasn’t built to handle. 3. Existing customers start expecting these workarounds to be replaced with proper solutions. Meanwhile, new customers (no longer the early adopter type) have less patience for rough edges.
The result is increasing complexity. If that complexity is handled well, the business scales and can support growing product demands.
If not… I'm sure many around here have experiences where that leads (to borrow Tolstoy: “All happy families are alike; each unhappy family is unhappy in its own way.”).
At the same time a market niche may open for a competitor that uses a simpler approach; goto step 1.
The flip side, and this is key: capturing all nuances on day 1 will cause complexity issues that most businesses at this stage are not equipped to handle yet. And this is why I believe it is mostly a business problem.
Even them theyre not great coz they tend to go out of date quite quickly and theyre quite expensive to build.
As a means of software design theyre BDUF crack - theyre an incitement to bad decisions in advance of writing software that would always be much better if done retrospectively via refactoring.
Not great, mind you. 80% of the way there still saves an hour of your time tho
"Then what about complex things? Can't make everything simple"
Do partial diagrams. Simplify or skip things your team already knows.
Also, great UML is no UML. Sometimes the code itself is short and clear enough, requiring no diagram (of course, not all diagrams are about code... but use case diagrams are rare these days anyway).
Also, use cases and use case diagrams are great.
Also, perfect UML is disposable. Thinking of long term diagrams that serve as documentation is a mistake.
I love IcePanel and would recommend everyone try it. But like all these things, it requires an almost superhuman level of commitment to get value out of it. It has built in mechanisms to keep you honest and up to date and I have found it useful both the strategic and tactical level when used right. But ultimately it’s difficult to build an engineering culture around long-term, living diagrams. The moment everything gets out of sync it might as well just be a photo of a whiteboard. I strongly suspect this sort of platform plus AI will be a great combination (I think at least one HNer is working on exactly that and I assume IcePanel too).
Domain expert: “Yes, always”
Analyst: “Any exceptions you can think of?”
Domain expert: “No, none at all.”
—-
Forward to day 1 after “delivery” of the implemented system.
Domain expert is now using the system for the first time in a real-life situation:
“It doesn’t let me save the fizz I’m creating. How does this handle a case where a fizz doesn’t yet belong to a buzz?”
ak_111•15h ago
Is it still around or did it go the way of SOAP, Java Applets? If not, what has replaced it?
zabzonk•15h ago
devenson•14h ago
https://schematix.com/video/depmap
Like UML deployment diagrams, but our models are interactive and can be queried.
We also have a large customer doing DDD modeling and then generating code directly from the models they build.
alganet•9h ago
riffraff•15h ago
SanjayMehta•10h ago
They were part of a telecom language called SDL. There were tools to “compile” to various languages such as C. If you followed their rules, you were supposed to be able to go back and forth between C and SDL.
I only remember this because the biggest tool provider at that time was a French company called Verilog. They preceded the HDL by a few years, I guess.
leoc•9h ago
SanjayMehta•6h ago
dilyevsky•7h ago
billfruit•3h ago
Too bad, they aren't that popular to document behaviour, because sequence diagrams really don't convey that much.
For example timeouts are very neatly described in a harel state chart. How will one describe timeout and timeout handling in sequence diagrams.
ramon156•15h ago
neilv•14h ago
With ZIRP growth scheme startups hopefully over, and more of us having to get jobs building systems that work reliably and sustainably, we might gain a new appreciation for system modeling.
dcminter•14h ago
My very non-scientific impression is that tools like Rational were mostly used for drawing class diagrams and ... that just turned out not to be that useful because the tooling didn't exist to round-trip changes in the code back into the diagrams meaning the diagrams lost parity with the code rather quickly. It was sort of useful in the linear design/code/deliver world, but we're a lot more iterative now.
nickthegreek•14h ago
dcminter•13h ago
There's probably a SaaS product in it for someone sufficiently interested in the topic... probably not at unicorn scale, but enough for a side income perhaps?
afpx•12h ago
That said, I still find plantuml to be helpful, particularly for sequence and activity diagrams. With LLMs especially. Use dependency injection, fine granularity components, sequence and activity flows. At least for me, helps keep my mind organized. But, these days I work alone. I feel it may be too dated for the modern developer.
DaiPlusPlus•9h ago
> I feel it may be too dated for the modern developer.
Sounds like you're still ahead of the curve, worry not.
I'm still too much of a curmudgeon to even give LLMs a try.
NBJack•14h ago
I still see and use a small subset of UML for more complex architecture discussions, but that's about it (i.e. service nesting, message passing, etc.).
whartung•13h ago
[0] https://wiki.c2.com/?GalacticModelingLanguage
oleggromov•13h ago
smcameron•40m ago
[1] https://wiki.c2.com/?InterGalacticModelingLanguage
icedchai•12h ago
Leaving stuff out is also important. (Example: Unless you're building a DNS related product, don't bother to include "DNS" in your diagrams. Your use of it is assumed.)
titaphraz•13h ago
The diagrams are very nice and useful. But the UML as a process, if taken literally, it a total disaster.
hmartin•13h ago
Objectively and utterly wrong.
hnb2137•3h ago
ohgr•12h ago
You can really break UML by specifying a system then changing it a number of times. That process will hurt you. Badly.
hirvi74•10h ago
4b11b4•10h ago
ChrisMarshallNY•9h ago
[0] https://littlegreenviper.com/the-curious-case-of-the-protoco...
codethief•8h ago
watsonjs•6h ago
PaulRobinson•5h ago
All agile does is ask you to iterate, which means updating your design, your code, and your tests & documentation, as you learn.
Please read the agile manifesto again, and actually apply it. It does not say we don’t do design at all. Never did.
elric•5h ago
Had an intern a year ago whose school forced them to go the whole nine yards with UML. Our company gave them a project to build, and their school made them draw use-case diagrams, class diagrams, sequence diagrams, and activity diagrams, before the student was allowed to write any code.
This was a waste of everyone's time, and we gave the school some choice feedback which I'm sure they'll ignore.
Sequence diagrams are still used quite a lot, and for good reason, they're incredibly useful. I see simple class diagrams quite frequently as well, but without the poorly designed arrow nonsense (shaded? open? closed? argh!).
globalise83•4h ago
dwaite•4h ago
Good diagrams are an art form though, just like other forms of good documentation. There is a big difference between a diagram being a normative source of truth, and being a good tool.
Take this diagram as an example: https://takaakit.github.io/uml-diagram-for-ddd-example-in-ev...
* Nearly the top half is taken up by relations which aren't especially helpful, and would be better expressed on the entities themselves.
* The "Location" type looks like the primary type in the system based on nearly half the types in the system connecting with it, creating a nest of graph edges. However, this is likely a simple and immutable record type. If the entities in this diagram had attributes (e.g. like a class diagram), you could refer to it by name, and greatly simplify the cognitive load in understanding this picture.
This is the sort of diagram that gets generated from code, and is at the level of specificity needed to generate code from a diagram. It also isn't very useful for using the model to convey the system to a person - a developer might be more comfortable reading the code rather than looking at a picture generated from it.
IMHO, that split focus in UML between people and tooling greatly reduced the overall usefulness and understanding of the system. It gave UML a bad reputation. Training on MDD tools prevailed over providing a baseline of common nomenclature to enable "team cave drawing on a whiteboard", which has no commercial tooling or market other than the whiteboard and markers.
The areas where visual languages have a bit more prevalence are on the business modeling side, including things like network architecture diagrams.
It is a bit of a shame - going through a set of use cases while iteratively improving the architecture by improving a set of class, sequence and ECB diagrams is something I always found to be crazy efficient vs diving immediately down to prototype code.