
{"id":111,"date":"2012-10-02T07:12:18","date_gmt":"2012-10-02T06:12:18","guid":{"rendered":"http:\/\/serverdude.dk\/?p=111"},"modified":"2012-10-02T07:22:46","modified_gmt":"2012-10-02T06:22:46","slug":"java-application-architecture","status":"publish","type":"post","link":"https:\/\/serverdude.dk\/?p=111","title":{"rendered":"Java Application Architecture"},"content":{"rendered":"<p><a href=\"http:\/\/www.amazon.com\/dp\/0321247132\/?tag=serverdude-20\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws.assoc-amazon.com\/widgets\/q?_encoding=UTF8&#038;ASIN=0321247132&#038;Format=_SL110_&#038;ID=AsinImage&#038;MarketPlace=US&#038;ServiceVersion=20070822&#038;WS=1&#038;tag=serverdude-20\" style=\"vertical-align:text-top;float:left;margin:4px;\"><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.assoc-amazon.com\/e\/ir?t=serverdude-20&#038;l=as2&#038;o=1&#038;a=0321247132\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><a href=\"https:\/\/twitter.com\/pragkirk\">Kirk Knoernschild<\/a>\u00e2\u20ac\u2122s book, Java Application Architecture: Modularity Patterns with Examples Using OSGi, ought to be made superfluous, but as it stands it is direly needed.<\/p>\n<p>\nAt least the first two parts: \u00e2\u20ac\u0153The Case for Modularity\u00e2\u20ac\u009d and \u00e2\u20ac\u0153The Patterns\u00e2\u20ac\u009d should be known by heart by any Java developer. It should be second nature for disciplined and professional developers.<\/p>\n<p>\nIn \u00e2\u20ac\u0153The Case for Modularity\u00e2\u20ac\u009d Kirk goes over the definition of what a module is, whether architecture is a phase carved in stone in the beginning of a project, or whether it is pervasive and should be attended to all the time. <\/p>\n<p>\nHow growing complexity must be countered by disciplined maintenance. <\/p>\n<p>\nWhy Technical Debt and Design Rot must be cleared to keep the source code from succumbing to the development death spiral.<\/p>\n<p>\nWhy cyclic dependencies must be rooted at all costs.<\/p>\n<p>\nAnd what the benefits of modular structures are.<\/p>\n<p>\nWhile you may think that a given piece of software is not ripe for modular extraction, because it will never be replaced or reused elsewhere. This is not the right attitude, as the first or second use of the source code is the test cases preferably developed in sync with the source code, either in a TDD or BDD way. It is simply easier to unit test a unit, no matter how big that unit is.<\/p>\n<p>\nFinally \u00e2\u20ac\u201c just to prove that this is not hot air preached from the pulpit \u00e2\u20ac\u201c Kirk refactors a small application in 7 steps each a tiny isolated step improving on the overall structure. This is how software should evolve once it has fallen prey to design rot.<\/p>\n<p>\nThe second part of the book, The Patterns, describes 18 patterns in 5 chapters, which Kirk has made available <a href=\"http:\/\/www.kirkk.com\/modularity\/pattern-catalog\/\">here<\/a>:<\/p>\n<p>\nThe Base Patterns: <\/p>\n<ul>\n<li>Manage Relationships\n<li>Module Reuse\n<li>Cohesive Modules\n<\/ul>\n<p>Dependency Patterns:<\/p>\n<ul>\n<li>Acyclic Relationships\n<li>Levelize Modules\n<li>Physical Layers\n<li>Container Independence\n<li>Independent Deployment\n<\/ul>\n<p>Usability Patterns:<\/p>\n<ul>\n<li>Published Interface\n<li>External Configuration\n<li>Default Implementation\n<li>Module Fa\u00c3\u00a7ade\n<\/ul>\n<p>Extensibility Patterns:<\/p>\n<ul>\n<li>Abstract Module\n<li>Implementation Factory\n<li>Separate Abstractions\n<\/ul>\n<p>Utility Patterns:<\/p>\n<ul>\n<li>Colocate Exceptions\n<li>Levelize Build\n<li>Test Module\n<\/ul>\n<p>\nThe third part concludes with examples in OSGi, covering Java, Scala, and Groovy implementations.<\/p>\n<p>\nThe book is a must read and must understand for (Java) developers and architects.<\/p>\n<p>\nI highly recommend the book for anyone interested in modularity, especially developers looking at an existing code base resembling a big ball of mud who wants to disentangle it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kirk Knoernschild\u00e2\u20ac\u2122s book, Java Application Architecture: Modularity Patterns with Examples Using OSGi, ought to be made superfluous, but as it stands it is direly needed. At least the first two parts: \u00e2\u20ac\u0153The Case for Modularity\u00e2\u20ac\u009d and \u00e2\u20ac\u0153The Patterns\u00e2\u20ac\u009d should be known by heart by any Java developer. It should be second nature for disciplined and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-books","category-programming"],"_links":{"self":[{"href":"https:\/\/serverdude.dk\/index.php?rest_route=\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/serverdude.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serverdude.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serverdude.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serverdude.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=111"}],"version-history":[{"count":32,"href":"https:\/\/serverdude.dk\/index.php?rest_route=\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":144,"href":"https:\/\/serverdude.dk\/index.php?rest_route=\/wp\/v2\/posts\/111\/revisions\/144"}],"wp:attachment":[{"href":"https:\/\/serverdude.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serverdude.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serverdude.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}