We have already explained some fundamental architectural decisions, so now the time has come to provide a visual representation of Mr. Sandwich’s system architecture. Thanks to the Structurizr and its DSL it is possible to keep the models as a code.
Is It Suitable When It Comes To Microservices?
When Simon Brown was inventing C4 Model, he was doing this with simplicity in mind. In his idea, C4 works best when describes a monolithic system, but thanks to its flexibility, one is able to describe Microservices in some clear and understandable way. To see how this can be achieved, visit the Microservices Lab repository.
Keeping DSL File Up To Date
The C4 Model provides great foundation for some early architectural work, when many things are still under the design. It makes a ground for a discussion for the stakeholders, product owners and development teams and for all those people, who are unfamiliar with notation like UML. As the time goes by and development is in advanced phase, it may be the right time to generate C4 diagrams from the code, using tools, which will statically analyse your code and produce Structurizr code.
What About Describing Business Rules?
If such question comes into your mind, there is a risk your are expecting too much from this technique. It wasn’t Simon’s intention to create “one tool, to rule them all”, he just wanted a solution, which will solely focus on giving some navigable big picture up to the reasonable component level. The fourth level, which means code, is rarely used. Don’t expect any business rules hidden somewhere in the schemas, it is not their job. As a reader, you have to focus on relations between components, rather than rules standing behind each Controller or View. These are just implementation details.
Do I Have To Be As Specific As Possible?
Since C4 Model is not supposed to be a swiss army knife, in doesn’t exclude using other tools like UML, or some specialized diagrams for other areas of industry like hardware blueprints and schemas. If your controller is complex and hard to follow, you can of course use any other tool, which will provide a deeper level of granularity exposing many more details. In case when controller does some generic tasks, it can be left with some nice and short description.