In this video, Nick Maiorano shows how to apply qualified exports to a dependency graph in order to better control how modules can depend upon each another.
- [Instructor] Remember the golden rule with JPMS:…Export packages, but require modules.…This means that exporting is always…done at the package level,…so all public classes within the package…are exported as one block.…It's an all-or-nothing deal.…You can't pick which public classes…within that exported package are visible.…This can sometimes introduce unintended consequences.…You may only want some of the public classes…to be accessible by foreign modules.…You can always hide classes by making them package private,…but this would also make them invisible…to other packages in the same module that might need them.…
For example, suppose the red30tech model…is enriched with the Valve class.…The RubberPart package is already being exported,…so any classes added to this package are automatically…visible to foreign modules that use Movement.…This would break encapsulation because Valve…is only meant to be used internally,…but can now be seen externally.…So the Valve class would be the victim of this limitation.…There are several solutions to this problem.…
In this course, instructor Nick Maiorano breaks down this complexity by explaining what modularity is all about, how Java has adopted modularity and how to start using to build better quality applications.
- What is modularity?
- The five pillars of modularity
- Modularity in the real world
- JPMS concepts and syntax
- Designing and implementing a modular structure
- Compiling, packaging and running modular applications
- Using the dependency checking tools
- Creating custom runtime images
- Managing backward compatibility with classes and modules
- Explicit, unnamed, and automatic modules
- JPMS tips and recommendations
Skill Level Intermediate
Java Essential Training: Syntax and Structurewith David Gassner3h 9m Intermediate
1. Introduction to Modularity
2. Java Modularity through the Ages
3. Building Modular Applications with Java
4. Tools and Strategies
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.