CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About...
Transcript of CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About...
Sven Reimers Martin Klähn
Breaking up the Monolith with Jigsaw CON 4400
About Sven Reimers
• System Engineer @ Airbus Defence and Space
• Founder and Leader of JUG Bodensee
• Member of NetBeans Dream Team
• NetBeans Community Acceptance Testing (NetCAT)
• Duke‘s Choice Award Winner
• Java One Content Committee
• Java Champion
• JCP Associate Member
2
About Martin Klähn
• Software Engineer @ Airbus Defence and Space
• Co-Founder of JUG Bodensee
• Member of NetBeans Dream Team
• NetBeans Community Acceptance Testing (NetCAT)
• JCP Associate Member
3
Agenda
• Introduction to Jigsaw aka JPMS
• Why Modularity Matters
• Live Coding with Apache NetBeans 9 and Jigsaw (JPMS)
4
Introduction to Jigsaw aka JPMS
5
Introduction to Jigsaw
• Reliable configuration
• to replace the brittle, error-prone class-path mechanism with a means for program components to declare explicit dependences upon one another
6
Introduction to Jigsaw
• Strong encapsulation
• to allow a component to declare which of its public types are accessible and which are not
7
The Module Descriptor
8
The Module Descriptor
• [open] module • exports package [to] • opens package • requires [transitive|static] package • provides class with class • uses class
9
Why Modularity Matters
10
JDK Modularization I
11
Modularity
• Definition: Modularity is the degree to which a system's components may be separated and recombined. The meaning of the word, however, can vary somewhat by context.
• In software design, modularity refers to a logical partitioning of the "software design" that allows complex software to be manageable for the purpose of implementation and maintenance. The logic of partitioning may be based on related functions, implementation considerations, data links, or other criteria.
12
Modularity by Example
• Encapsulation
• Complexity
13
other244 kB
spi96 kB
api28 kB
Apache Netbeans 224920 kB
MultiView Windows368 kB
JDK Modularization II
14
JDK Modularization II’ (excluding base)
15
Live Coding with Apache NetBeans 9
16
How to get started with NetBeans and JPMS
• Download Apache NetBeans CI builds fromhttps://builds.apache.org/job/incubator-netbeans-linux/
• Download latest GPL licensed JDK9 build fromhttp://jdk.java.net/9/
• or use http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
17
New in NetBeans 9
• All Details herehttps://cwiki.apache.org/confluence/display/NETBEANS/NetBeans+9.0+-+New+and+Noteworthy
18
References
• JSR 379 http://openjdk.java.net/projects/jigsaw/spec/
• JIGSAWhttp://openjdk.java.net/projects/jigsaw/doc/jdk-modularization.html
• State of the Module Systemhttp://openjdk.java.net/projects/jigsaw/spec/sotms/
19