The upcoming Java 9 module system will affect existing applications and offer new ways of creating modular and maintainable applications. With this hands-on book, Java developers will learn not only about the joys of modularity, but also about the patterns needed to create truly modular and reliable applications. Authors Sander Mak and Paul Bakker teach you the concepts behind the Java 9 module system, along with the new tools it offers. You’ll also learn how to modularize existing code and how to build new Java applications in a modular way.
Understand Java 9 module system conceptsMaster the patterns and practices for building truly modular applicationsMigrate existing applications and libraries to Java 9 modulesUse JDK 9 tools for modular development and migration
My goal in reading this book was to supplement online documentation about packaging Java applications. In particular, I wanted to learn how to make use of JLink, to customize a runtime for making a smaller self-contained package. JLink requires use of the Java-Module, which was introduced in Java 9.
This book helped a great deal. My focus was on Chapters 1-3, and parts of 13. The writing is clear, explanations thorough, going to fuller detail than the online docs I could find. Editing and proofing was of a high quality: no bugs in the programs I ran. The example code (both code in the text and code from a github repository) was very helpful.
My resulting runtime was reduced by about 2/5 (177 MB to 74 MB). For now, I am going to stop here with reading this book, but I will hold on to it as my first choice if or when I have to deal with more complex projects.
One minor speed-bump encountered: in chapter three we go from an example with a single package to one with three packages. While the explanation for how to set up the module-info is clear and thorough, steps for the actual compilation and running of the programs were kind of glossed over, and I had difficulty deducing the exact syntax and form required. What I overlooked was that these commands were present in a script file in the github code examples.
The only other troubles I had were also due to a lack of experience with command-line Java and the Windows shell environment. My preferred IDE (Eclipse) has done a good job of shielding me from having to deal with this level of tech! I can hardly fault this book for that, especially since expanding the topic to cover shell commands would require cluttering the text with info pertaining to multiple OS's.
If you are an infrequent user of your system's command-line shell, it might be worth considering supplementing this book with another about the shell environment.
Excellent book for explaning and diving to the new module system of Java 9. It doesn't only introduce the concepts, benefits of modularity (strong encapsulation, reliable configuration, security, optimization), but also list out the problems of before Java 9 (classpath hell, old legacy libraries for compatibility). It also comes with good code demo, illustration, migration guide and a migration case study.
What is a great book. Modular system described very thoroughly as far as I can say. Nevertheless, at first it was a bit disappointing that there are no examples of how to use all this goodness with Gradle. But! Checkout the mentioned GitHub repository and you'll find it there and even more! Thank you, Sander and Pak! You've done an awesome work!
Você conhece o sistema de modularidade do Java 9? E sabia que o Java já tinha um sistema de modularidade antes? Bom, esse livro vai responder essas duas perguntas. É execelente. Muitos projetos parecem Frankensteins porque não conhecem a Modularidade que já estava no Java há bastante tempo. Recomendado para qualquer Engenheiro e Arquiteto Java;
Excellent and exhaustive book about modules in Java 9. I did not expect such detailed explanation and examples of how to use modules and how to migrate existing applications. I would definitely recommend this book.
I really enjoyed this book; it's well written, contains lots of practical examples and should appeal to a broad audience. If you're at all interested in learning about Java 9 modularity, read this book.
Very well written book about Java modularity. Very clear examples. Covers migration, libraries, caveats, etc. Allows the reader to make well informed decisions about migration to Java 9+ and adoption of the module way of working.
Really good book to understand what the Java Module System is, what it offers and how to use it. Also ideal to understand what is required to move past Java 8, even if don't want to use modules. What is required? Not much.