Best Java generation tool from UML in Eclipse [message #1750138] |
Fri, 16 December 2016 05:49  |
Eclipse User |
|
|
|
Hi all!,
I wonder if someone could provide some insights about what is the best Java code generation tool in Eclipse (from UML models built using Papyrus).
So far, the ones I have tested are really buggy and incomplete.
Best,
Víctor
|
|
|
|
|
|
|
|
|
|
|
Re: Best Java generation tool from UML in Eclipse [message #1750267 is a reply to message #1750261] |
Mon, 19 December 2016 06:52  |
Eclipse User |
|
|
|
Hi,
It's true that generating domain specific classes with profiles is more useful, but I don't feel like POJOs are useless, because sometimes you don't want to use a framework. Even for generating POJOs a profile is needed, that's what I'm missing. Also, if you plan to generate code for a specific framework you will probably need most of the POJO generation part.
To me it's quite clear the difference between aggregation and composition in Java code generation. For instance, you can take a look at:
http://stackoverflow.com/questions/11881552/implementation-difference-between-aggregation-and-composition-in-java
Best,
Víctor
Karsten Thoms wrote on Mon, 19 December 2016 12:18What kind of classes would you expect? While "normal" classes could be translated to POJOs that is usually not what you'd expect. Normally code generation from UML makes more sense when it is domain specific, with a profile. Then a class could be mapped to some persistent technology, like Hibernate or whatever. Or how would you map relationship kinds aggregation vs. composite? This is semantically a huge difference, while its implementation might be different approaches possible.
A simple "translate UML to Java" approach is just naive and does not have any benefit in practice. That is also why you won't find good approaches.
If you would start to describe a mapping from UML to Java you will very soon experience that this is too ambiguous how an implementation would look like, especially if you don't work with a proper profile.
|
|
|
Powered by
FUDForum. Page generated in 0.26941 seconds