Modular Programming in Java 9

Koushik Kothagal

  • 出版商: Packt Publishing
  • 出版日期: 2017-08-28
  • 售價: $1,640
  • 貴賓價: 9.5$1,558
  • 語言: 英文
  • 頁數: 298
  • 裝訂: Paperback
  • ISBN: 1787126900
  • ISBN-13: 9781787126909
  • 相關分類: Java 程式語言R 語言
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Key Features

  • Master design patterns and best practices to build truly modular applications in Java 9
  • Upgrade your old Java code to Java 9 with ease
  • Build and run a smooth functioning multi-module application.

Book Description

The Java 9 module system is an important addition to the language that affects the way we design, write, and organize code and libraries in Java. It provides a new way to achieve maintainable code by the encapsulation of Java types, as well as a way to write better libraries that have clear interfaces. Effectively using the module system requires an understanding of how modules work and what the best practices of creating modules are.

This book will give you step-by-step instructions to create new modules as well as migrate code from earlier versions of Java to the Java 9 module system. You'll be working on a fully modular sample application and add features to it as you learn about Java modules. You'll learn how to create module definitions, setup inter-module dependencies, and use the built-in modules from the modular JDK. You will also learn about module resolution and how to use jlink to generate custom runtime images.

We will end our journey by taking a look at the road ahead. You will learn some powerful best practices that will help you as you start building modular applications. You will also learn how to upgrade an existing Java 8 codebase to Java 9, handle issues with libraries, and how to test Java 9 applications.

What you will learn

  • Get introduced to the concept of modules and modular programming by working on a fully modular Java application
  • Build and configure your own Java 9 modules
  • Work with multiple modules and establish inter-module dependencies
  • Understand and use the principles of encapsulation, readability, and accessibility
  • Use jlink to generate fully loaded custom runtime images like a pro
  • Discover the best practices to help you write awesome modules that are a joy to use and maintain
  • Upgrade your old Java code to use the new Java 9 module system

About the Author

Koushik Kothagal is the founder of Java Brains, an online training website that offers courses on various enterprise Java and JavaScript technologies entirely for free. He works as a Senior Staff Engineer at Financial Engines. He has over 14 years of professional experience working on full-stack web applications and has worked extensively with technologies such as Java, Spring, Java EE, JavaScript, and Angular. He loves teaching, and when he's not coding Java and JavaScript, he's probably teaching it! He currently lives in the Bay Area.

Table of Contents

  1. What's Java modularity all about?
  2. Writing your first Java module
  3. Handling inter-module dependencies
  4. Introducing the modular JDK
  5. Using Platform APIs
  6. Module resolution, accessibility and readability
  7. Introducing Services
  8. Understanding linking and using jlink
  9. Module design patterns and strategies
  10. Upgrading your code to Java 9
  11. Java 9 and OSGi
  12. Using build systems and testing Java modules

商品描述(中文翻譯)

關鍵特點
- 精通設計模式和最佳實踐,以在 Java 9 中構建真正模組化的應用程式
- 輕鬆將舊的 Java 代碼升級到 Java 9
- 構建並運行一個運行流暢的多模組應用程式

書籍描述
Java 9 模組系統是語言中的一個重要補充,影響我們在 Java 中設計、編寫和組織代碼及庫的方式。它提供了一種通過封裝 Java 類型來實現可維護代碼的新方法,以及一種編寫具有清晰介面的更好庫的方法。有效使用模組系統需要理解模組的運作方式以及創建模組的最佳實踐。

本書將提供逐步指導,幫助您創建新模組以及將代碼從早期版本的 Java 遷移到 Java 9 模組系統。您將在一個完全模組化的示範應用程式上工作,並在學習 Java 模組的過程中為其添加功能。您將學習如何創建模組定義、設置模組間依賴關係,以及使用模組化 JDK 中的內建模組。您還將了解模組解析以及如何使用 jlink 生成自定義運行時映像。

我們將通過展望未來來結束這段旅程。您將學習一些強大的最佳實踐,幫助您開始構建模組化應用程式。您還將學習如何將現有的 Java 8 代碼庫升級到 Java 9,處理庫的問題,以及如何測試 Java 9 應用程式。

您將學習的內容
- 通過在一個完全模組化的 Java 應用程式上工作,了解模組和模組化編程的概念
- 構建和配置您自己的 Java 9 模組
- 使用多個模組並建立模組間的依賴關係
- 理解並使用封裝、可讀性和可訪問性的原則
- 像專業人士一樣使用 jlink 生成完全加載的自定義運行時映像
- 發現最佳實踐,幫助您編寫出色的模組,讓使用和維護變得愉快
- 將舊的 Java 代碼升級為使用新的 Java 9 模組系統

關於作者
Koushik Kothagal 是 Java Brains 的創始人,這是一個提供各種企業 Java 和 JavaScript 技術課程的在線培訓網站,完全免費。他在 Financial Engines 擔任高級員工工程師,擁有超過 14 年的全棧網頁應用程式專業經驗,並廣泛使用 Java、Spring、Java EE、JavaScript 和 Angular 等技術。他熱愛教學,當他不在編寫 Java 和 JavaScript 時,可能正在教學!他目前居住在灣區。

目錄
1. Java 模組化是什麼?
2. 編寫您的第一個 Java 模組
3. 處理模組間依賴關係
4. 介紹模組化 JDK
5. 使用平台 API
6. 模組解析、可訪問性和可讀性
7. 介紹服務
8. 理解鏈接和使用 jlink
9. 模組設計模式和策略
10. 將您的代碼升級到 Java 9
11. Java 9 和 OSGi
12. 使用構建系統和測試 Java 模組