CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About...

19
Sven Reimers Martin Klähn Breaking up the Monolith with Jigsaw CON 4400

Transcript of CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About...

Page 1: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

Sven Reimers Martin Klähn

Breaking up the Monolith with Jigsaw CON 4400

Page 2: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

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

Page 3: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

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

Page 4: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

Agenda

• Introduction to Jigsaw aka JPMS

• Why Modularity Matters

• Live Coding with Apache NetBeans 9 and Jigsaw (JPMS)

4

Page 5: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

Introduction to Jigsaw aka JPMS

5

Page 6: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

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

Page 7: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

Introduction to Jigsaw

• Strong encapsulation

• to allow a component to declare which of its public types are accessible and which are not

7

Page 8: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

The Module Descriptor

8

Page 9: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

The Module Descriptor

• [open] module • exports package [to] • opens package • requires [transitive|static] package • provides class with class • uses class

9

Page 10: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

Why Modularity Matters

10

Page 11: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

JDK Modularization I

11

Page 12: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

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

Page 13: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

Modularity by Example

• Encapsulation

• Complexity

13

other244 kB

spi96 kB

api28 kB

Apache Netbeans 224920 kB

MultiView Windows368 kB

Page 14: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

JDK Modularization II

14

Page 15: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

JDK Modularization II’ (excluding base)

15

Page 16: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

Live Coding with Apache NetBeans 9

16

Page 17: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

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

Page 18: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

New in NetBeans 9

• All Details herehttps://cwiki.apache.org/confluence/display/NETBEANS/NetBeans+9.0+-+New+and+Noteworthy

18

Page 19: CON4400 - Breaking up the Monolith with Jigsaw...Breaking up the Monolith with Jigsaw CON 4400 About Sven Reimers • System Engineer @ Airbus Defence and Space • Founder and Leader

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