Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
It might appear that the runtime model and development model are inextricably linked. A runtime module system makes designing modular software easier but is not required to design modular software. In fact, given the significant advantages of modularity discussed throughout the remainder of Part I, it’s a good idea for development teams to start modularizing their applications right now, even if they aren’t deploying to a platform with runtime module system support. If you’re using a platform that supports modularity, good for you. But if not, you might be wondering how you can design modular software today.
We know a lot about the OSGi runtime model, and details on Jigsaw are emerging.2 It’s likely the platform we’re using is leveraging the OSGi runtime model internally, even if it’s not exposed to us right now. We know the unit of modularity is the JAR file, and we can start modularizing our applications today by emphasizing the JAR file as the unit of modularity and using the patterns in this book. In Chapter 7, “Reference Implementation,” we see firsthand how we can take a system and modularize it by emphasizing the JAR file as the unit of modularity, even in the absence of a runtime module system. The sample for many of the patterns intentionally avoid using OSGi, though we discuss how the pattern can be implemented when using OSGi where it helps offer further clarification.