Blog Logo
TAGS

pumla - re-usable models as code

# pumla [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=pumla%20%2D%20re%2Dusable%20models%20as%20code%20&url=https://github.com/DrMarkusVoss/pumla&hashtags=uml,plantuml,softwarearchitecture,softwaredevelopment,developers) `pumla` = PlantUML Manager Idea It seems that PlantUML is quite liked by a lot of software developers. With PlantUML they do architecture documentation even without an architect forcing them to do. One of the reasons for that is the text-based and code-like approach, I guess. But PlantUML has a big drawback from my point of view (the systems and software architect point of view, but I am also a software developer): with PlantUML you basically program diagrams. What the architect would like to do is to draw/model/program a system/software model with the possibility to re-use the once-modelled elements in different views on different diagrams exposing different aspects, attributes, interactions and relations. So the approach with `pumla` is to dock onto the success of PlantUML but to extend it in order to get rid of the no re-usable model drawback (and some other smaller drawbacks and limitations). Therefore, in order to enable systematic re-use for architecture models with PlantUML, `pumla` is intended to be an extension around PlantUML to organize and enable this systematic re-use. Goals, Use Cases & Principles click to expand! - Architecture modelling of bigger software solutions using PlantUML - Have the same model elements in different diagrams as single source entities - Keep the architecture descriptions close to the Source Code --> Architecture as text - Allow modularity of the architecture elements and loose coupling --> no complicated include mechanisms with paths that then make refactoring hard --> architecture modelling files can be everywhere in the source tree and will be found. - enable better bridging/mixing of the dynamic and the static world, e.g. state or sequence diagrams with deployment diagrams. - Create an arc42 architecture documentation based on common PlantUML description patterns with almost no effort. Context Diagram click to expand! Heres an overview of the idea. In blue you can see the parts developed as `pumla` and how they interact with other applications and documents during software development. Simple example Here is a quick example from scratch to show you how to use pumla to make re-use of PlantUML-modelled elements. It consists of two steps: first you model the element in PlantUML with little pumla-specific adders to make it re-usable. Then as second step, you create a new diagram where you just re-use the element you modelled before on that diagram by putting it there with just one pumla command. See the following chapters for the details: Defining a re-usable element click to expand! Of course you need to have `pumla` installed. See further below for installation instructions. Then: - Create a folder for the example. - Change into that folder. - Call `pumla setupprj`. That prepares your example folder as a project containing a pumla architecture documentation. 3 files should have been created in the folder: `pumla_macros.puml`, `pumla_blacklist.txt` and `pumla_project_config.puml`. - Create a file like this: File: simpleElement.puml ```PlantUML PUMLAMR```