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

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.

主站蜘蛛池模板: 清原| 林口县| 保定市| 桐梓县| 灵石县| 合肥市| 聂拉木县| 科技| 屯留县| 唐山市| 垣曲县| 朔州市| 武冈市| 分宜县| 富裕县| 曲阳县| 瓦房店市| 抚松县| 本溪市| 寻乌县| 阜康市| 溆浦县| 周宁县| 五家渠市| 揭东县| 扎兰屯市| 调兵山市| 微山县| 油尖旺区| 牟定县| 阿拉善盟| 荥阳市| 三门县| 银川市| 额济纳旗| 五河县| 孝感市| 拉萨市| 泰州市| 临朐县| 昭觉县|