HackerTrans
TopNewTrendsCommentsPastAskShowJobs

simon_brown

no profile record

comments

simon_brown
·tahun lalu·discuss
Most software architecture diagrams are a mess ... partly due to ad hoc notation, and partly because it's very unclear what the boxes represent. C4 resolves the latter problem by introducing a small number of predefined abstractions. This sounds limiting, but the power of C4 is that limited set of abstractions, and the conversations it forces architects/developers to have.

The less prescriptive approach of LikeC4 sounds very appealing, because it provides a way to define your own abstractions. But I don't recommend this approach for most teams -> https://c4model.com/abstractions/faq#can-we-add-more-abstrac...
simon_brown
·2 tahun yang lalu·discuss
> Thank you, but by that argument, I could that for any diagramming / whiteboarding tool.

In theory, sure, but the majority of diagramming/whiteboarding tools are not easily manipulated via code/an API. Structurizr is a modelling tool, and the model can be authored by a number of methods ... manual authoring, reverse-engineering, or a hybrid of the two.

> The point is having a tool that reduces work for me and does these things automatically.

I do hope that we will see some tooling that can do these things automatically, but we're not there yet ... fully-automatic (as opposed to semi-automatic) comes with some serious trade-offs.
simon_brown
·2 tahun yang lalu·discuss
Thank you! :-)
simon_brown
·2 tahun yang lalu·discuss
> Take Structurizr for example, it doesn't automatically create the diagrams for you

The Structurizr DSL is designed for manual authoring (which is what most people tend to do), but there's nothing preventing you from writing some code (using one of the many open source Structurizr compatible libraries) to reverse-engineer parts of the software architecture model from source code, binaries, your deployment environment, logs, etc.

> or notify you when it detects architectural drift

If you do the above, there's then nothing preventing you from writing some tests to notify of architectural drift, etc.
simon_brown
·3 tahun yang lalu·discuss
I don't have the full context of what you're trying to model, but "two components deployed as one service" might be better represented as a container. If that's not the case, you can use the "group" concept to group components together -> https://docs.structurizr.com/dsl/cookbook/groups/

Alternatively, https://likec4.dev provides a way to create an arbitrary number of abstraction levels (although I wouldn't recommend such an approach).
simon_brown
·3 tahun yang lalu·discuss
> But C4 seems almost too lightweight to merit a name.

Fun fact ... it actually didn't have a name for the first few years, and was just the approach I used and taught people on my software architecture workshops.
simon_brown
·4 tahun yang lalu·discuss
Many of the comments here seem to assume that "diagrams as code" == automatic layout. That doesn't need to be the case.
simon_brown
·4 tahun yang lalu·discuss
I know a number of organisations who have done/are doing this, and my key piece of advice is to look at modelling rather than diagramming. Note that I'm not necessarily suggesting a traditional UI-driven modelling tool here. My open source Structurizr DSL is a "models as code" tool that allows you to define a model+views, and have them rendered using a number of tools (e.g. Structurizr, PlantUML, Mermaid, D2, etc). I have some conference talks on YouTube that provide an overview if you want to learn more; e.g. https://www.youtube.com/watch?v=0-gVFWONnQw