Enterprise-wide use cases for the DSL #225
Replies: 5 comments 7 replies
-
Thanks for your speedy and considered reply, Simon. Pulling together something describing the various approaches being used to scale Structurizr DSL would be very valuable, and yes, there are always trade-offs. I like the system catalogue / workspace extends approach you've described. I can see it'll work well where you have common, shared model elements higher in the hierarchy, and add more detail as you descend the hierarchy. In our case, we want to model relationships across our models, often at the more detailed container-to-container level, so I can see we'd end up pushing more and more detail to the root of the hierarchy; which mirrors the classic problem with OO single inheritance, of course. The trade-off with my merge() approach is repetition of external element declarations. Inspired by a comment Chris made, I'm toying with a refinement that might help: having the maintainer of a workspace put the external declarations they want to 'export' for use in other workspaces into a sibling DSL fragment. Then, rather than authors of other workspaces having to individually declare the external elements they depend on, they can simply Regarding I can either stick with my External tag, or as you suggest, use a suitably-named group. |
Beta Was this translation helpful? Give feedback.
-
I'm curious ... why do you want to do this? It's not something I recommend, and I actually wrote a Twitter thread about this exact topic yesterday. |
Beta Was this translation helpful? Give feedback.
-
I don't want to speak out of turn as @chrisjschultz has primarily driven the modelling effort using Structurizr within the organisation, but here is my take on some of the reasons why:
Your thoughts, Chris...? |
Beta Was this translation helpful? Give feedback.
-
As a follow-up to this discussion ... I've added an example of one approach to enterprise-wide modelling with the Structurizr DSL, which you can find at https://github.com/structurizr/examples/tree/main/enterprise (it's example 1 ... where the DSL is used to define a system catalog, with individual teams extending this to describe their own software systems and an automatically generated system landscape). |
Beta Was this translation helpful? Give feedback.
-
Great thread, the examples are great. I am trying to come up with a way to work with our solutions level (composed of several systems) using the C4 toolset, posted a question about it as a separate topic here: #240 Would appreciate any suggestions or insights. |
Beta Was this translation helpful? Give feedback.
-
@iambic69 @chrisjschultz
Thanks for the info. No need to add this to the
WorkspaceUtils
, but I will happily create a page about enterprise-wide modelling and add a link to your repo. I have my own approach that I've showing at conferences over the past few months too (https://github.com/structurizr/examples/tree/main/dsl/system-catalog ... it similarly parses DSL files owned by each team, albeit with a central catalog to avoid reconciliation/merging issues), so it would be nice to centralise the various approaches to using the DSL at scale, because they all have trade-offs.The "enterprise" concept isn't fit for purpose (many teams want to model multiple enterprises), so I've added support for nested groups instead. See https://github.com/structurizr/dsl/tree/master/docs/cookbook/groups#nested-groups for an overview.
Beta Was this translation helpful? Give feedback.
All reactions