On 13 November 2015 at 09:45, Óscar Bou - GOVERTIS <[email protected]> wrote:
> > Hi all. > > I’m considering re-introducing UML Class diagrams in our workflow mainly > for: > - graphically design the domain entities. > - modeling relationships. > - agree with names of properties, collections and actions needed. > > It would be wonderful if the UML solution could also be “integrated” with > Apache Isis or Java, automating at least the entities Java skeleton > generation. > > This is full circle for me... I wrote a book on TogetherJ back around 2002; and it was at that time that I first met Richard (Pawson) and Rob (Matthews) presenting the Naked Objects at an OO conference in Oxford. TogetherJ provided design-time synchronicity between the UML class diagram and the code, while Naked Objects provided run-time synchronicity between the code and the UI. In the original Naked Objects book you'll see some screenshots from the app that I wrote during that all-afternoon workshop. But I've never found a tool that was as good as TogetherJ (may it rest in peace) at doing the design-time synchronicity . I did think that Omondo [2] would fit the bill, but last time I tried it (many years ago) it didn't work as seamlessly as I wanted. I haven't looked again for a while. > I’ve worked extensively with Rational Rose and Sparx EnterpriseArchitect, > but was thinking about an Eclipse-based solution that could “potentially” > be adapted to generate the Java entities with Isis annotations. > > A different approach might be to build a round-tripping tool from a simple DSL such as plantuml [3] or graphviz,[4]. I like these "low-fidelity" diagramming notations for several reasons: a) they are fast to work with b) their lack of UI features means that the temptation to waste time fiddling with the layout is much reduced c) they don't really scale to large diagrams. I see this as a benefit because (i) one must focus them to a single module within an app and (ii) it limits that module's size to no more than 10 classes or so. What's interesting to me is that both of these DSLs are understood by asciidoctor-diagram [5]; we of course use asciidoctor for the Isis documentation; so there's the possibility of generating the diagrams easily. Moreover, there are also integrations of both plantuml and graphviz with xtext, meaning that one can take a plantuml diagram and visualize it in Eclipse. A quick google threw up [6] Presumably also there is some sort of metamodel within these tools that could be leveraged. I'm thinking that this could be fed into a code generator to create Isis entities. This raises the question, what sort of code generator? Well, coincidentally, I've actually started building such a code generator, isis-cli [7]; a la Grails / Spring Roo / JHipster. It would be kinda cool to be able to pipe from a file containing plantuml to the isis-cli, and have it create/update Java classes with appropriate Isis annotations. ~~~ Going the other way, we could also have update the maven-isis-plugin so that it could generate plantuml diagrams based on an Isis metamodel; this could then be fed into Asciidoctor in order to generate documentation from the code. > Before joining the Apache Isis community I developed [1] for Enterprise > Architect for automatically generating Spring Roo-based classes, but Isis > was better suited for our project and I abandoned it. > > > Any ideas? > > I have a related idea on all this, which ties in with BDD stuff, namely that (via the wrapperfactory) the test framework could emit a transcript of a user interaction. Rob Matthews actually did this originally many years ago in the first Naked Objects book, which shows how far ahead of its time some of those original ideas were. We should probably resurrect this. But we could go further, because we could also, I think, emit plantuml sequence diagrams [8] for such BDD spec/integration tests. I know you've done lots of BDD tests, so interested in your thoughts on that. . Cheers Dan > Thanks, > > Oscar > > > [1] http://roomodeler.com > > > [2] http://uml2.org/livecodemodel.html [2] http://jankoehnlein.github.io/FXDiagram/ [3] http://plantuml.com/classes.html [4] http://www.graphviz.org/ [5] http://asciidoctor.org/docs/asciidoctor-diagram/ [6] https://borisdevnotes.wordpress.com/2013/12/09/xtextplantuml/ [7] https://github.com/danhaywood/isis-cli [8] http://plantuml.com/sequence.html
