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

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.

主站蜘蛛池模板: 三原县| 元江| 新巴尔虎右旗| 阿拉善右旗| 牙克石市| 资兴市| 邢台市| 新郑市| 衡山县| 名山县| 涞源县| 巴彦县| 肥东县| 苍南县| 从化市| 桃江县| 古蔺县| 高雄市| 乐至县| 巴彦县| 嘉义县| 乐都县| 宜城市| 景德镇市| 徐汇区| 遂昌县| 温宿县| 祁连县| 简阳市| 靖远县| 乌拉特中旗| 个旧市| 夹江县| 成都市| 阳东县| 方城县| 西峡县| 昌宁县| 黄骅市| 博乐市| 双辽市|