10. Usability Patterns

Although coupling is an important measurement, cohesion is equally important. It’s easy to create and manage module dependencies if I throw all of my classes in a couple of JAR files. But in doing so, I’ve introduced a maintenance nightmare. In this chapter, we’ll see patterns that help ensure our modules are cohesive units that balance reuse with use. It’s interesting that you’ll find some contention between the dependency patterns and usability patterns. I talk about this contention, what you can do to manage it, and when you want to do it. The usability patterns include the following:

Published Interface: Makes a module’s published interface well known.

External Configuration: Modules should be externally configurable. ...

Get Java Application Architecture: Modularity Patterns with Examples Using OSGi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.