Behind Every Great Module There's a Great Design

Software should be modular. It has been a core thought of developers and architects for quite a long time. The microservices style of development and deployment is a thing now, and different projects are taking the modularity from logical design also to physical level. There’s project Jigsaw that’ll offer a way to create modules in Java 9. Liferay is onboard with modularity as well, with their most recent release of Liferay DXP built on top of OSGi framework.

The annual Liferay Developer Conference, DevCon, was set up in Darmstadt once again. One of the keypoints this year was modularity in software, so much so, that there actually was a conference inside a conference. MODCONF to be exact, focusing more on the features of modular software in the big picture.

Ambientia sent four people to devcon

Ambientia Crew in Liferay Devcon

The talks revolved around the idea of creating interchangeable modules where you can just plug in a different implementation through certain extension points. How to accomplish this depends on the framework you’re using but the benefits of this kind of thinking remain the same. Being able to easily extend and provide your own implementation for something is a powerful thing. Testability of the code is usually enhanced as well, almost like a side-effect to modularization.

Modularity is not a silver bullet, however. To really be able to harness the power modularity is offering, you’ll have to spend time to really think about your design. What are the modules, do they offer a simple API which is easily understandable? Clutter your API and you’ll have a hard time extending it. Upgrade and break your API often and you’ll spend your days fixing the implementations. Or answering emails of fellow developers, demanding to know why you broke their code again. Create an API that is easy to understand and try to design it in a way that you don’t have to change it that often.

Modularity in Liferay DXP

Modularity in Liferay DXP

What I was happy to see during the conference was that Liferay is really eating their own dogfood as well. They are modularizing everything and creating guidelines on how the developers should create modules of their own. There were other interesting topics as well, but the main point I took home with me was this: Behind every great module there’s a great design!