/java-module-workshop

Java Module Workshop

Primary LanguageJava

JAVA MODULE WORKSHOP

As you know, Java 11 had joined to our life with huge changes. One of those changes was Java Platform Module System. You can see the history of Jigsaw project how became a part of Java 11 from https://openjdk.java.net/projects/jigsaw/.

The main goal of this workshop is to get hands-on experience on Java Modules. We will modularize a monolith application by using Java Modules. Workshop has 5 missions. Each mission has some goals and comming with the solution of previous mission. Each mission is located in the branch named as mission-N. You need to follow the instructions located in the main project folder.

MISSION-1

  • Convert maven modules to Java Modules
  • Introducing module-info.java
  • How to export a package in a module
  • How to define a dependency to anothor module
  • List modules in specified module path and limit them

MISSION-2

  • Making modules decoupled by implementing a eventbus structure
  • What is Deep Reflection?
  • What is Strong Encapsulation?
  • Opening a package to a module for deep reflection
  • See description of a module without unpacking it

MISSION-3

  • Applying Service Provider approach
  • Specifying which interface will be provided by which implementer class in the service provider module
  • Specifying which interface will be used by the client module

MISSION-4

  • Investigating a module by calling JDEPS
  • Visualization of JDeps output by Graphviz
  • Generating your own Runtime Image by calling JLink
  • Minimazing Runtime Image size
  • Dockerizing generated Runtime Image

MISSION-5

  • Playing with unnamed, automatic-named, named modules
  • Using old way to use Service Provider approach in defining them in META-INF

REQUIREMENTS

  • min Java 9
  • Linux or Macos and Terminal (Workshop has bat file but not supported any more)

GOOD LUCK & HAVING FUN