官术网_书友最值得收藏!

Handling Inter-Module Dependencies

In the last chapter, we created our first Java 9 module and set up the beginnings of the address book application. However, we built the whole application as a single module, and thus, we didn't really leverage any of the cool new features of modularity. Here's what you'll learn to do in this chapter:

  • You'll break the application up into two separate modules, and thereby create your second Java module
  • You'll learn how to establish dependencies between those two modules
  • You'll learn more about the module descriptor configuration that's required to wire in two separate modules
  • You'll revisit the compilation and execution steps with multiple modules

This all starts with breaking our monolithic address book viewer application into two modules. Breaking the single module into two dependent modules has two consequences:

  • Breaking the application up into modular parts enables these modular parts to potentially be reused in multiple other applications.
  • It's an opportunity to define the interface for the modules. It lets you, as the module author, define what the module exports and how it should be used and consumed.

We'll look at both of these in this chapter.

主站蜘蛛池模板: 广河县| 涿鹿县| 舟山市| 西平县| 巴彦淖尔市| 扎兰屯市| 六安市| 溆浦县| 仪陇县| 水富县| 榆中县| 庄浪县| 黑山县| 乃东县| 衡阳市| 宝山区| 远安县| 伊金霍洛旗| 台南县| 房山区| 井冈山市| 成都市| 迁西县| 上栗县| 南安市| 汝州市| 锦州市| 山阴县| 新和县| 申扎县| 新津县| 怀宁县| 隆尧县| 海南省| 玉门市| 新干县| 临漳县| 金溪县| 青龙| 兴文县| 荃湾区|