- Modular Programming in Java 9
- Koushik Kothagal
- 192字
- 2021-07-02 18:38:23
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.
推薦閱讀
- CMDB分步構建指南
- Mastering Python Scripting for System Administrators
- VMware vSphere 6.7虛擬化架構實戰指南
- 薛定宇教授大講堂(卷Ⅳ):MATLAB最優化計算
- C#程序設計
- VMware虛擬化技術
- bbPress Complete
- Android開發:從0到1 (清華開發者書庫)
- Flutter跨平臺開發入門與實戰
- 單片機C語言程序設計實訓100例
- Learning Apache Cassandra
- CoffeeScript Application Development Cookbook
- Hands-On Kubernetes on Windows
- Django 3.0應用開發詳解
- Webpack實戰:入門、進階與調優(第2版)