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

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.

主站蜘蛛池模板: 灵山县| 永平县| 紫云| 叙永县| 北流市| 虎林市| 农安县| 灯塔市| 日喀则市| 舟山市| 鄯善县| 梧州市| 古田县| 多伦县| 长岭县| 独山县| 福建省| 夏邑县| 甘肃省| 汉沽区| 苏尼特左旗| 左云县| 淮滨县| 南陵县| 灵川县| 堆龙德庆县| 城步| 获嘉县| 郸城县| 宣城市| 慈利县| 万州区| 蒙城县| 奉贤区| 彰武县| 彭阳县| 汉川市| 新建县| 泾源县| 郓城县| 陵川县|