Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Resource, DataTransferObject and Delegated operations in the PlantUML generator #315

Open
Adelrisk opened this issue Jan 13, 2022 · 3 comments

Comments

@Adelrisk
Copy link

Is your feature request related to a problem? Please describe.
I enjoy the breadth and depth of support for the Sculpture concepts, such as the plugin syntax support for DataTransferObject and Resource The PlantUML generator doesn't seem as complete:

  • Resource. Resources are currently ignored by the PlantUML generator.
  • DataTransferObject. Also ignored, but PlantUML will render them implicitly (outside of the Aggregate) when referenced, such as in Service operations.
  • Delegated operations. When an operation delegates to another (with the => syntax), PlantUML diagrams will only include the method name, ignoring return type and parameters.

Describe the solution you'd like
I believe the Class Diagram PlantUML generator should include the additional types Resource, DataTransferObject akin to ValueObject and Entity. (I am not concerned about colour choice.)

The delegated operations should probably be generated/rendered as copies of the original operation.

Describe alternatives you've considered
I cannot thing of any alternatives.

Additional context

@stefan-ka
Copy link
Member

Thanks for reporting the issue @Adelrisk!

You have a good point here; we should enhance the generator to support all the Sculptor types.
The current implementation focuses on the tactic DDD concepts only; which was our main requirement... As long as you stick to the DDD concepts while modeling your domain, you should be fine. But I agree that we probably should enhance this, since we adopted all the Sculptor concepts in our DSL.

@BenceSzalai
Copy link

DataTransferObject is also present in the CQRS example page, which is a bit confusing, since someone new to the tool trying out a tutorial may get confused why parts of the .cml did not made it into the .puml

@stefan-ka stefan-ka added this to the m6.10.0 milestone Aug 17, 2023
@stefan-ka stefan-ka removed this from the m6.10.0 milestone Jan 3, 2024
@stefan-ka
Copy link
Member

Tried to implement a quick solutions, but its not as easy as it looks because of Sculptors type hierarchy. A DataTransferObject does not extend DomainObject, which actually makes sense.

We have to think this through in more detail. At the moment I also question whether it makes sense to model a DTO inside an Aggregate, because it does not belong to a domain model. Maybe we should adjust the CML language here and only allow DTOs in the Application layer (could be part of a new grammar to map exposed domain objects to DTOs that are returned by application services). But also not 100% happy with that, because one could argue that DTOs belong to infrastructure. Resources definitely belong to infrastructure and indicate that one is doing something RESTful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants