{"id":82,"date":"2011-03-11T20:37:23","date_gmt":"2011-03-11T19:37:23","guid":{"rendered":"http:\/\/blogs.igalia.com\/javimoran\/?p=82"},"modified":"2012-08-14T16:34:14","modified_gmt":"2012-08-14T14:34:14","slug":"navalplan-domain-model-diagram","status":"publish","type":"post","link":"https:\/\/blogs.igalia.com\/jmoran\/2011\/03\/11\/navalplan-domain-model-diagram\/","title":{"rendered":"NavalPlan Domain Model diagram"},"content":{"rendered":"<p><!-- p { margin-bottom: 0.21cm; } --><a href=\"http:\/\/www.navalplan.org\">NavalPlan<\/a> is a <em>Java<\/em> application built using<a href=\"http:\/\/en.wikipedia.org\/wiki\/Object-oriented_programming\"> Object Oriented Programming<\/a> and whose data are stored in a relational database &#8211; currently <em>PostgreSQL<\/em> and <em>MySQL<\/em> are the <em>RDBMS<\/em> supported and tested-. To map objects from the objects models to relational tables the <a href=\"http:\/\/www.hibernate.org\/\">Hibernate<\/a> <a href=\"http:\/\/en.wikipedia.org\/wiki\/Object-relational_mapping\">ORM<\/a> is used, which is a well-known framework in <em>Java<\/em> platform widely deployed.<\/p>\n<p>In the business layer, it is applied the <a href=\"http:\/\/martinfowler.com\/eaaCatalog\/domainModel.html\">Domain Model<\/a> 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.<\/p>\n<p>The <a href=\"http:\/\/www.navalplan.org\">NavalPlan<\/a> 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 <em>UML diagrams<\/em> updated is time consuming.<\/p>\n<p>To address the problem above and to have some nice diagrams to teach <a href=\"http:\/\/www.navalplan.org\">NavalPlan<\/a> to new developers, I have being playing today with a tool to infer <em>UML class diagrams<\/em> from the Hibernate mapping files. With a tool like this a lot of time would be saved !!<\/p>\n<p>The tool I found is <a href=\"http:\/\/www.softwaresecretweapons.com\/jspwiki\/linguinemaps\">Linguine Maps<\/a>. 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 <a href=\"http:\/\/www.navalplan.org\">NavalPlan<\/a> from now on.<\/p>\n<p>With <a href=\"http:\/\/www.softwaresecretweapons.com\/jspwiki\/linguinemaps\">Linguie Maps<\/a> 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 <a href=\"http:\/\/www.navalplan.org\">NavalPlan<\/a> 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 \ud83d\ude09<\/p>\n<p><a href=\"http:\/\/people.igalia.com\/jmoran\/navalplan_domain_model.gif\"><br \/>\n<img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/people.igalia.com\/jmoran\/navalplan_domain_model.gif\" alt=\"\" width=\"400\" \/><br \/>\n<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NavalPlan is a Java application built using Object Oriented Programming and whose data are stored in a relational database &#8211; 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. &hellip; <a href=\"https:\/\/blogs.igalia.com\/jmoran\/2011\/03\/11\/navalplan-domain-model-diagram\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;NavalPlan Domain Model diagram&#8221;<\/span><\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,5],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-libreplan","category-navalplan","category-planet"],"_links":{"self":[{"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":1,"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/posts\/82\/revisions\/232"}],"wp:attachment":[{"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.igalia.com\/jmoran\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}