Open CesarD opened 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
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!
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
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:
[ ] We also need a PR in https://github.com/ContextMapper/contextmapper.github.io for the documentation on the Context Mapper website.
- Adjusting https://contextmapper.org/docs/bounded-context/
- Adjusting https://contextmapper.org/docs/tactic-ddd/#aggregates
- Very nice would be a tutorial (such as https://contextmapper.org/docs/event-storming/) that describes how CML can be used to model BC canvas and Aggregate design canvas. But thats of course category "nice to have" :)
- [ ] At least one generator would be nice that use the new data. I would suggest (thats an easy way to solve this) that we create a Freemarker template for the Freemarker generator that uses all the BC + Aggregate canvas data and produces a Markdown file for the canvases. What do you think? That would just need a *.ftl file here: https://github.com/ContextMapper/context-mapper-dsl/tree/master/org.contextmapper.dsl.ui/samples/freemarker
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.
- [ ] We need some unit tests for the new grammar elements. These are in the test-module, see example here: https://github.com/ContextMapper/context-mapper-dsl/blob/master/org.contextmapper.dsl.tests/src/org/contextmapper/dsl/AggregateDSLParsingTest.xtend
- [ ] We have to adjust the formatter so that models can still be serialized with a proper formatting.
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.
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:
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:
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.