Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Provide modules with a default implementation.
To maximize reuse, a module must be flexible enough so that it can function in a variety of different operating environments. Yet, for a module to be usable, it must be independently deployable. To address this tension, a module can be given a Default Implementation with well-defined extension points so that the module can be extended when necessary. This balances the desire for use with the desire for reuse.
reuse versus use, 62
Figure 10.7 shows Default Implementation. The default.jar module contains the DefaultImpl class, which is the default implementation for the DefaultInterface. The default.jar module contains the appropriate configuration to use this default implementation. The betterimpl.jar module also uses the default.jar module but provides its own implementation of DefaultInterface, as well as the appropriate configuration to configure the default.jar module.