ContextMapper / context-mapper-dsl

ContextMapper DSL: A Domain-specific Language for Context Mapping & Service Decomposition
https://contextmapper.org/
Apache License 2.0
224 stars 30 forks source link

Improve support for Bounded Context Canvas and Aggregate Design Canvas #362

Open CesarD opened 1 month ago

CesarD commented 1 month ago

In PR #323 some basic support for Bounded Context Canvas was introduced, but since then (2 yrs ago), there has been some new additions to the canvas definition that I think they deserve to be supported by ContextMapper:

image

Also, I would want to improve support for the Aggregate Design Canvas, which some of its parts are already supported, but others are still lacking:

image

Unfortunately, I'm not very proficient in Java and Xtext so I have only added the definitions for the ContextMappingDSL and I'll need help to understand what other pieces I might be missing to add into this PR, so I'll appreciate any guidance you can provide me to complete it.

stefan-ka commented 1 month ago

Hi @CesarD

Thank you very much for bringing this up! It's highly appreciated!

Since I'm very busy right now, I'll need some days to have a deeper look into your grammar changes. I think we'll definitely have to add some tests in the test project and maybe some semantic validators. The other question will be, whether we have to adjust some generators. Once one can model new stuff in the language, it's also nice to have it in the generated outputs, if possible.

I try to give a more detailed response asap.

Best regards, Stefan

CesarD commented 1 month ago

Thanks a lot for your prompt reply, @stefan-ka!!

Please let me know if I can help in anything. Like I said: I'm not proficient in Java or Xtext, but I'd like to help in whatever way I can.

Cheers!

stefan-ka commented 2 weeks ago

Hi @CesarD

Again, thank you very much for your PR!

We have already tested it manually in Eclipse and it works fine. We are not 100% sure if we agree with all the details in the canvas and if everything is needed at this level of detail. Maybe the DDD crew will decide in the future to add things like "response time" in addition to "throughput"? We were a bit surprised about the level of abstraction here; why not talk about NFRs in general?

However, putting that discussion aside for the moment, we see the following tasks that should be done now to complete this PR:

I think that would be the most important open TODOs. Maybe there are some on which you could help?

Best regards, Stefan

CesarD commented 2 weeks ago

Hi @stefan-ka! Thanks for reviewing this so fast!

We have already tested it manually in Eclipse and it works fine. We are not 100% sure if we agree with all the details in the canvas and if everything is needed at this level of detail. Maybe the DDD crew will decide in the future to add things like "response time" in addition to "throughput"? We were a bit surprised about the level of abstraction here; why not talk about NFRs in general?

What I submitted is just MY conception of how this could be implemented, please feel free to suggest alternatives if you think there're any other better alternatives. Unfortunately, yes, I agree that DDD Crew could add something else that could end up requiring another modification to the DSL. I think it's already the case for some previous version of the canvases that were already supported here in ContextMapper.

However, putting that discussion aside for the moment, we see the following tasks that should be done now to complete this PR:

I can deal with these. The tutorial might take me longer to put together, but I guess the others I can work them out fairly quickly. The generator I agree with doing a Freemarker template like the one you already have for the full markdown sample, since it can be the easiest way to demonstrate how to dump all the information in a useful format to reuse. Speaking of which, what would you think of creating a FM template for generating an SVG with the current version of both canvases? Do you think it can be a useful way people would consume this as well for documenting stuff or you consider it's not as useful as a markdown doc? Or are those much better fit for doing the exercise than for documenting? I'd like to know your thoughts.

These are going to be harder for me as I'm not very proficient in Java and I haven't been able to setup everything with Eclipse yet, which will take me some more time.

Again, thanks for reviewing and getting back to me so quickly.

Kind regards.