Imagine a bacon-wrapped Ferrari. Still not better than our free technical reports.

Building modular Java apps in the cloud by Bert Ertman

Software development is all about shipping code. Building applications and making them available is the core activity that supports our whole industry, community and ecosystem. The latest Virtual JUG session with the excellent Bert Ertman was focused on exactly that. In this post I’ll recap the most important points that were presented on the talk “Building Modular Java Applications in the Cloud”.

Currently, Bert works for Luminis, and pushes Java forward as a Java Champion and a frequent speaker on Java and Software Architecture related topics. He is also a JavaOne Rockstar speaker. So have no doubts about the quality our speaker! In case you missed his session, it’s right here.

So, what was the session about? Continue reading to find out.

Why do we need modularity or cloud for that matter

Software inevitably changes and if you don’t want to rebuild everything every two weeks you have to be prepared for change. After all, we all drank from the goblet of Agile for years now and there’s no more convincing needed to understand that change is real and we should be prepared for it. Right?

Good, then we’re on the same page and the next obvious thing to think about is that changing large systems is painful. And the only way to mitigate that pain and make the process simpler is to break the system down into smaller components. That’s the whole point of modular architecture.

Image 2015-03-18 at 7.12.54 pm

Isolate your functionality into an independent modules and work on them alone. Package it independently, deploy it independently or semi-independently, and allow other modules to perform lookups and consume this functionality through well defined interfaces.

Sounds like a cook-book recipe that you’ve heard about in university, doesn’t it? However, it is real, you just need tools and the runtime that allows you to do it.

Runtime Dynamic Module Framework

Welcome the Runtime Dynamic Module Framework that if used properly can make your dreams come true. Of course I’m talking about OSGi, a very mature choice and probably the de-facto modularity framework for Java today.

Of course the modular framework imposes some rules on your code base, so you won’t be shipping spaghetti code anymore. High coupling, low cohesion won’t be the empty words or something you understand intuitively. The proper module structure will empower you to think about proper interfaces beforehand, foresee how services will consume each other outputs and, well, actually design your application.

Image 2015-03-20 at 12.11.52 am

The best thing about splitting your application into well-defined modules is that you are probably not the first one dealing with these problems. What does a typical enterprise application look for? How many of them are written using OSGi?



Amdatu is a set of open source components and tools to build modular applications in Java. What it does for you is providing independent components to make modular development of all kinds of applications easy.

Screenshot 2015-03-20 10.08.35

In Amdatu you’ll find nice components to handle your various needs like:

  • JPA
  • MongoDB
  • Remote calls
  • Scheduling
  • Security
  • Templating

And that’s not the complete list of features it provides you with. Check the Amdatu site and see for yourself.

What about the cloud?

One way to think about the cloud is to treat it as a hardware rental or pay-as-you-go computational engine. However, for development practices, Cloud is the enabler of change. Managing your application, rolling out new versions, scaling it like there’s no tomorrow and doing that with a click of a button.

Indeed, you no longer need the operations team to run the physical servers, wire the network or worry about separating environments. All that can come later, but when you’re in the zone, creating the meat of your application, you want to have all the possible power at your fingertips. And cloud environments can provide that for you.

At this point, the session moved onto a really interesting demo of how to build an application with OSGi. Bert showed us how to utilise Eclipse (oh, by the way, check out Optimizer for Eclipse) and Bndtools to create a toy project, which nonetheless had the proper design of an enterprise project that utilises modular architecture with OSGi.

Last words

Following the trend that we have set this year, after the session we claimed some more Bert’s time and asked him some questions about software engineering, what he honestly thinks of OSGi and others.

If you want to know what he thinks will happen to OSGi in the age of microservices, what it can take from it and if any xaaS solutions are better than plain old AWS, enjoy the video below.

As always, I’d be really cool if you subscribe to our newsletter, we’ll send you an occasional email about our blogposts, reports, or ongoing surveys that we run once in a while. Just enter your email below and we’ll stay in touch.