SE-Radio Episode 316: Nicolai Parlog on Java 9

Topics covered
Popular Clips
Episode Highlights
Module System
The Java Module System, introduced in Java 9, aims to address several longstanding issues in Java development. explains that the system provides a structured way to manage dependencies and encapsulation, breaking down the monolithic nature of Java into smaller, more manageable modules 1. This modular approach not only reduces the size of the Java runtime but also enhances security by ensuring that only authorized code can access certain parts of the JDK 1.
The big change in Java nine is the introduction of modules. How do you like to explain modules to people who know Java perhaps, but are new to the concept of modules.
---
uses a graph metaphor to describe how classes and methods interact within this system, highlighting the improved organization and clarity it brings to Java codebases 2.
Dependency Mgmt
The Java Module System revolutionizes dependency management by enforcing strict rules on module dependencies. notes that the system prevents the launch of applications if any required dependencies are missing, ensuring a complete dependency graph before runtime 3. This approach eliminates common issues like version conflicts by disallowing multiple versions of the same module on the module path 4.
The JVM would not let me launch because something's missing. So it understands the concept of this, of this dependency graph of their nodes, and if they are gone, then something's not right.
---
Additionally, the system requires explicit declarations of transitive dependencies, promoting clearer and more maintainable code 5.
Encapsulation
Enhanced encapsulation is a key benefit of the Java Module System, providing developers with greater control over code visibility and usage. explains that this system allows developers to define clear boundaries for their code, reducing the risk of unintended dependencies on internal APIs 6. This encapsulation not only aids in code maintainability but also accelerates development by allowing changes within modules without affecting external code 7.
It gives the developer more power, the maintainer of a library of code, more power to say what is going to be used and what is not going to be used.
---
emphasizes that while some may view this as an added complexity, it ultimately simplifies project management by enforcing a disciplined approach to code organization 8.
Migration Process
Migrating to Java 9 and its module system involves a two-step process: migration and modularization. advises developers to first ensure their Java 8 applications run on Java 9 without modules, addressing any compatibility issues that arise 9. This initial step is crucial for a smooth transition, as it involves updating dependencies and resolving potential conflicts 10.
Going all the way from Java eight to modules is by and large a two step process.
---
Once the application is stable on Java 9, developers can gradually introduce modules, taking advantage of the system's benefits without overwhelming changes 11.
Related Episodes


Episode 171: Scala Update with Martin Odersky
Answers 383 questions

SE-Radio Episode 291: Morgan Wilde on LLVM
Answers 383 questions

SE-Radio-Episode-266:-Charles-Nutter-on-the-JVM-as-a-Language-Platform
Answers 383 questions

SE-Radio-Episode-267-Jürgen-Höller-on-Reactive-Spring-and-Spring-5.0
Answers 383 questions

SE-Radio Episode 240: The Groovy Language with Cédric Champeau
Answers 383 questions

SE-Radio Episode 320: Nate Taggart on Serverless Paradigm
Answers 383 questions

SE-Radio Episode 357: Adam Barr on Code Quality
Answers 383 questions

Episode 97: Interview Anders Hejlsberg
Answers 383 questions

SE Radio 618: Andreas Møller on No-Code Platforms
Answers 383 questions

Episode 22: Feedback
Answers 383 questions

SE Radio 638: Nick Tune and Jean-Georges Perrin on Architecture Modernization
Answers 383 questions

Episode 69: Nico Josuttis on SOA (SOA Pt. 3)
Answers 383 questions

Episode 129: F# with Luke Hoban
Answers 383 questions

Episode 140: Newspeak and Pluggable Types with Gilad Bracha
Answers 383 questions













