Replies: 10 comments 7 replies
-
Some sketches regarding this feature are already ready. You can view them here: link. |
Beta Was this translation helpful? Give feedback.
-
Good Idea! |
Beta Was this translation helpful? Give feedback.
-
Sounds good! |
Beta Was this translation helpful? Give feedback.
-
I need this mechanism too! Very good. |
Beta Was this translation helpful? Give feedback.
-
Any pictures? |
Beta Was this translation helpful? Give feedback.
-
A much needed improvement! I support it! =) |
Beta Was this translation helpful? Give feedback.
-
This feature would be useful for me! |
Beta Was this translation helpful? Give feedback.
-
Looks interesting. As far as I understand, this extension will allow to describe custom architecture details in a more correct way (instead of using properties). I support it. |
Beta Was this translation helpful? Give feedback.
-
@simonbrowndotje, hello! I have a question about current discussion. Does it make sense for me to proceed with refining my sketches and submit a PR for review? |
Beta Was this translation helpful? Give feedback.
-
Here’s another example where extending the syntax would make a big difference. In my project (see the "Relevance" section), we currently implement architectural patterns as plugins for Structurizr DSL. But this approach has some serious drawbacks:
Here’s how "Reverse Proxy" and "Saga" patterns are currently represented:
Extending the DSL syntax solves both of these issues by allowing patterns to be defined as first-class entities. This brings:
With the new syntax, these same patterns could be written like this:
This makes architectural descriptions much clearer and more expressive while eliminating the limitations of plugins. Instead of just improving the current approach, this syntax extension introduces a more scalable and conceptually correct way to work with patterns. |
Beta Was this translation helpful? Give feedback.
-
Description
Summary
Feature will allow users to define custom syntax entities within Structurizr DSL,
enhancing it's extensibility and adaptability to diverse modeling requirements.
Background
Currently, structurizr dsl offers a fixed set of syntax entities for modeling software
architectures. While this sufficies for many scenarios, certain use cases necessitate
the definition of custom entities to represent domain-specific concepts more accurately.
Relevance
In large organizations like ours, recurring architectural patterns have emerged across
various projects. To effectively document and communicate these patterns within
our architecture descriptions, we require the ability to define them as distinct entities
in structurizr dsl.
While initial attempts using plugins and scripts provided some flexibility, a more
integrated and flexible approach is now necessary.
Priority
Low (I'm willing to make a pull request - please confirm approach first)
More information
Proposal
Implement functionality enabling users to create their own syntax entities
using a defined structure and parsing mechanism.
Details
Custom syntax entity format
Users can define custom entities using the following template:
Where:
<entity-keyword>
- a unique keyword identifying the custom entity type.It must be alphanumeric and contain no spaces.
<param> ...
- a set of parameters, each representing a distinct token.{ ... }
- a context block containing additional information about the entity,similar to existing entities like
container
orgroup
.Parsing mechanism
Users will implement parsing logic for their custom entities,
adhering to a specified interface. This approach ensures that
the internal components of structurizr dsl remain encapsulated,
allowing users to extend functionality without having to
disclose the internal components form structurizr project.
The proposed interfaces are as follows:

Example
Here is an example of custom entity
example
:Conclusion
Benefits
expressiveness of models.
for extension.
Beta Was this translation helpful? Give feedback.
All reactions