NavalPlan is a Java application built using Object Oriented Programming and whose data are stored in a relational database – currently PostgreSQL and MySQL are the RDBMS supported and tested-. To map objects from the objects models to relational tables the Hibernate ORM is used, which is a well-known framework in Java platform widely deployed.
In the business layer, it is applied the Domain Model architecture pattern which briefly consists of having rich business objects which encapsulate in the same class the data and the behavior related to them. I think that it was a good decision and I am happy with it. Among other advantages, it allows to organize complex behavior and to reuse business logic easily.
The NavalPlan domain model is large and complex, and one of the problems is its maintenance from documentation point of view. This is so because to have UML diagrams updated is time consuming.
To address the problem above and to have some nice diagrams to teach NavalPlan to new developers, I have being playing today with a tool to infer UML class diagrams from the Hibernate mapping files. With a tool like this a lot of time would be saved !!
The tool I found is Linguine Maps. You have to develope a program to use it but, after resolving some configuration issues, I got a quite good result. Therefore, we will use it in NavalPlan from now on.
With Linguie Maps you can configure several things and create diagrams just with the classes you are interested in. As an example and to view a whole picture of NavalPlan I generated a chart with all the classes. I know that maybe it reminds you of an Indian war with so many arrows, but I think that it could be got a good poster from it 😉