15 Putting the pieces together

 

This chapter covers:

  • a bells-and-whistles version of the ServiceMonitor application
  • whether to use modules or not
  • what an ideal module might look like
  • keeping module declarations clean
  • what else Java 9 has to offer
  • how the the module system compares to build tools, OSGi, and microservices
  • feeling good about a modular ecosystem

After covering pretty much everything there is to know about the module system, it’s time to wrap it up. In this final chapter I want to connect the dots and give a few pieces of advice for creating awesome modular applications.

Navigation

The first step is to show you an example of how the various features that we discussed throughout the book can come together by applying most of them to the ServiceMonitor application (15.1). Then I’ll deep dive into a number of more general concerns that help you decide whether to even create modules, what to aim for when doing so, and how to carefully evolve your module declarations, so they stay squeaky clean (15.2). I’ll close with a review of the technology landscape surrounding the module system (15.3) and my vision for Java’s modular ecosystem (15.4).

15.1  Adding bells and whistles to ServiceMonitor

15.1.1  Diversified dependencies

15.1.2  Reduced visibility

15.1.3  Decoupled with services

15.1.4  Loads code at run time with layers

15.1.5  Handles dependencies on plain JARs

15.2  Tips for a modular application

15.2.1  Modular or not?

15.2.2  The ideal module

15.2.3  Take care of your module declarations

15.2.4  Breaking code by editing module declarations

sitemap