11/9/2023 0 Comments Sequence diagram miro![]() It would make it much easier to refresh the diagram the next time I need it for reference. Querypuml -type=fromto -from=Foo.cpp:123 -to=Bar.cpp:456 \ That time when I spent a whole day building a sequence diagram by hand, to document how a certain subsystem is created and used in the very heart of the application, paid for itself very quickly - but I'd much prefer if it was a matter of couple minutes of tuning an invocation like: As I mentioned yesterday, I find myself in need of being able to answer questions like "How does the code get from here to there?", and at least some language servers should have enough information to be able to give that answer. Quite honestly, I'm surprised I haven't seen anyone doing a generalized "Language Server -> PlantUML" tool for asking questions about the codebase and getting responses in graphical form. I might get around to doing that at some point. In that latter case, I've discovered that my "PlantUML notes" follow the code structure close enough that I should be able to coax my editor into generating these for me, semi-interactively. My main use cases are a) when I'm toying with some higher-level design in my head and want to "see it" in picture form, and b) when making notes about the structure of code as I explore gnarly areas of a legacy codebase. I mostly use PlantUML for myself, in lieu of drawing diagrams by hand (or pointing device). Yup, mostly the same set of PlantUML diagrams for me, plus: ![]() You can find some uses-cases of those diagrams here (. I try to follow UML, but I don't care about machine readability and prefer readability over UML compliance. I use them to model simplified class diagrams for documentation purposes, to model data flows, to create primitive mockups, to show the relationship between UI components (as embedded screenshots) and to show component dependencies. Especially as PRs changing the code structure can include diagram changes at the same time. After moving diagrams closer to code, I noticed that it is much easier to keep them in sync with the code base. There is also an extension for IntelliJ and the diagrams work nicely in github readme files. Since I created a drawio integration extension for VS Code, I tend to create much more diagrams during coding, as they are really cheap to create. Open the generated AppMap to view the sequence diagramĪppMap with sequence diagram support is now available for installation from the JetBrains marketplace, and it is free for personal use and for open source projects.I use drawio, as those diagrams are quite future proof (drawio is open source, very old and you can embed diagrams in svg files) but also very expressive (you can even use latex inside drawio diagrams).Run your application (or your tests) with the AppMap library loaded.Install the AppMap plugin into JetBrains.Because AppMap records the runtime behavior of your application, the sequence diagrams it creates are always guaranteed to be accurate and complete.Įasily view database queries - even auto-generated ones □ĪppMap captures all SQL queries made to a database while your application runs, even if your database queries are automatically generated by an ORM/JPA framework like Hibernate. The biggest challenge with manually-created sequence diagrams is that they quickly go out of date compared to the current behavior of the system. ![]() All function call durations are shown, so you can quickly see where your code is spending the most time doing its processing. Loops are automatically detected and rendered in a summarized fashion to prevent the sequence diagram from becoming too long. This is especially useful if you want to hide calls to things which are less important (for example, a logging class). Lifelines can also be hidden to make the sequence diagram even more readable. Once you install AppMap into IntelliJ and generate your own sequence diagrams, you can click on any function call in the sequence to inspect the code.Įach vertical "lifeline" in the diagram floats as you scroll down long interactions, making it easy to keep track of which lifeline is involved in any function call. With AppMap, you simply run your application and accurate sequence diagrams are generated instantly. And they are one of the best tools for developers and technical non-developers (like engineering managers and product managers) to use when discussing code design.ĪppMap can now generate sequence diagrams automatically from any running Java application.īefore, sequence diagrams can only be created by manually inspecting code listings or debugging a system. Their inherent structure - objects flowing across the page, time flowing down the page - is intuitive and easy to learn. Sequence diagrams are incredibly powerful for visualizing and understanding runtime behaviors. The AppMap team is excited to announce that automatic, interactive sequence diagrams for Java applications in the IntelliJ IDE is live!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |