Less mouse timeĭiagrams-as-code eliminates diagram drag-and-drop UI mouse time. ![]() Infrastructure as Code also presents an opportunity for reverse-engineering as we can programmatically generate diagrams based on actual deployed state of the infrastructure – no more out-of-date support diagrams! □Īnother opportunity comes from generating diagrams from code specification files, such as API specifications. Reverse-engineering helps devs to better understand how code is constructed, especially in cases where they have inherited code that is not well documented. Reverse-engineering generates diagrams from existing code, as per Figure 4.įigure 4 – Reverse-Engineering Code to Diagrams as Code Code Forward-Engineeringįorward-engineering is a software engineering paradigm that starts with modelling the concept in a diagram-as-code language that is then used to programmatically generate skeleton code, as per Figure 3.įigure 3 – Forward-Engineering with Diagram as Codeįorward-engineering can have benefits in terms of collaboration and design focus and may be used on specific areas of code (sketches) Code Reverse-Engineering Perhaps even more importantly, diagrams can be included with versions of the code so that they stay in-sync with what they are documenting. Diagram as code source is text, allowing diffs between versions, and also use of check-in comments on commits. Traditional diagram tools use binary files that are opaque to changes between versions. It also decouples the content from the visualisation styles. This may make it easier to describe a system, allowing a text-based description first then tune the visualisation afterwards. how to make more room on the page, etc.) to key concepts such as listing the components then how they relate. ![]() Reasons to consider using diagrams-as-code include: Concentrate on the ConceptsĮxpressing the diagram-as-code shifts the focus from diagram mechanics (i.e. We see this in Figure 2, where a creator writes the diagram code and the diagramming tool renders this to an image file that they and the audience can view.įigure 2 – Diagrams as Code Concept Why use Diagrams as Code? What are Diagrams as Code?ĭiagrams as Code is the generation of visualisations from code source files (abstract instructions) that say how to build the diagrams. I am interested in diagrams-as-code to see if they can be a useful addition to my diagramming repertoire, and thus help me be more effective in my job. Visio, PowerPoint and their ilk are powerful visualisation tools, however they generate binary files that can be large and there is little consistency between diagrams. Hand writing can be hard to read, and the results are not easy to share and build upon at a later date. Whiteboards are great when you need to draw something quickly, and they encourage collaboration, but a downside is they are not very structured. My go-to diagram methods are the whiteboard (physical or virtual) and Microsoft Visio. Diagrams in My WorldĪs a solution architect, I use diagrams to communicate and collaborate on concepts with different audiences. What we can learn from this is a good diagram should be designed to have low cognitive effort for the viewer to comprehend, and thus we often stick to conventions to ease the mental load on the audience. Maps are easier to read when we understand the symbols (conventions), and especially when they describe an area we have been before (familiarity). ![]() The Human and the Diagramĭiagrams are similar to geographical maps, and the link to physical navigation has a basis in cognitive neuroscience – we use the same parts of the brain when viewing a diagram as we do when we use a map to find our way around a foreign city. Sometimes we may be the audience – I often find myself drawing diagrams to remind future me of how a solution is architected. Often, we will draw multiple views of the same system to suit the needs of different audiences, as per Figure 1.įigure 1 – Example of Multiple Views of the Same System to Suit Different Audiences We adjust the diagram to suit the audience, using different views of people / process / technology to inform and engage them. Understanding the knowledge and needs of your audience is critical to creating a successful diagram. Diagrams should engage their audience, informing them and encouraging collaboration. Is a picture really worth a thousand words? What if that picture was a diagram?Ī colleague recently introduced me to Diagrams as Code, using PlantUML, and in this post we explore the concept of diagrams-as-code, and how to use PlantUML.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |