Code Monkey home page Code Monkey logo

Comments (11)

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

This is not documented, because it's a feature that only a couple of people have ever asked for, and it's on the edge of what the C4 model and Structurizr was designed to support, but what you're asking is possible now; for example:

workspace {

    model {
        a = softwareSystem "A"
        b = softwareSystem "B"

        a -> b "send data"
    }

    views {
        dynamic * {
            a -> b
            b -> a "return results"
            
            properties {
                plantuml.sequenceDiagram true
            }
        }
    }
    
}

image

In essence, because the b -> a relationship doesn't exist in the model, but a -> b does, it's determined to be a "response" message, and is rendered as such. It's a feature of the underlying Java client library, and you can read about it at:

from export.

dgutson avatar dgutson commented on August 9, 2024

It does work for all the cases but one: when the "response" does exist in the model, I have no way of letting the exporter knokw that it is a response message. The only way I have is to play with its 'existence'.

from export.

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

I have no way of letting the exporter knokw that it is a response message. The only way I have is to play with its 'existence'.

That's correct. Based upon this and some of the other issues you've raised (relationship cardinality, interfaces, etc), you're skating on the edge of what the C4 model and Structurizr was designed to support, so you may find everything you're trying to do much easier by taking the C4 model concepts (abstractions + diagram types) and applying them to a UML tool, which by definition will have much richer semantics.

from export.

dgutson avatar dgutson commented on August 9, 2024

I was afraid of that exactly answer :) I was discussing this with a colleague earlier today.
I'm "skating" in the edge between C4 and UML overlapping motivations.
So what I need is an integration between C4 and UML. I'm afraid I will need to address it as a separate tool.
I need C4 for certain levels of abstractions (and it is damn good for higher views) and UML for other levels. And they have to be consistent ("compile together"). I need to find such balance and smooth integration.

from export.

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

So what I need is an integration between C4 and UML.

You may want to look at something like pumla, which provides a way to use C4-PlantUML in a model-based manner. Many of the "Visual modelling tools" listed at https://c4model.com/#Tooling have support for C4 and UML too.

from export.

dgutson avatar dgutson commented on August 9, 2024

I still like structurizr's DSL. The DSL is by itself an added value besides the underlying model: it's higher level than plantUML, and even than C4-plantUML.
So it is not only about C4.
That's why I asked about the view/exporter plugin in the other issue. If that will not be possible, we will have to proceed with a pre-processor of an "eDSL" (extended) that would generate both plantUML files and a structurizr DSL file. I want to avoid going there.

from export.

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

I think building a pre-processor for your own DSL is the only option I'm afraid. As I've said before, we have a Slack group, so it would be worth checking that nobody has done something similar already.

from export.

dgutson avatar dgutson commented on August 9, 2024

ok last attempt: would you accept a PR implementing structurizr/dsl#174 (comment) so structurizr DSL could be extensible? We already developed a structurizr DSL parser, and I could go to the "eDSL" approach, but I still think that by enhancing structurizr with a plugin-based view/exporter could be a win-win. I do prefer to contribute back to structurizr.

from export.

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

Probably not. There's some crossover with Support code diagrams #100, so if anything was added, I'd rather it was done in a more general way, and in a way that provides easy integration with the Structurizr cloud service/Lite/on-premises installation, probably in conjunction with something like the example PlantUML plugin. So it's on my radar, but not until 2023.

from export.

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

This might be helpful too -> structurizr/dsl#115

from export.

dgutson avatar dgutson commented on August 9, 2024

Thanks, I contacted @juanrferia and see if we can collaborate. It seems we have both the same problem and the same principle of not dropping structurizr's DSL. I'll check what he did. Whatever I do, I'd like to benefit structurizr, so we will give any plugin to you so you may opt to use it in the cloud service/Lite/on-premises.

from export.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.