Java - Modularization and Java9 JSR
Recently I've seen good talk from Milen Dyankov about Modularity in general and place of Java 9 in it.
Two slides from hist talk are perfectly depicts a main topic:
- Level#1: Monolith - just JAR in Java or DLL in C#
- Level#2: Composite - description of JAR/DLL dependencies which can be resolved. Package Manager:
- Maven in Java
- NuGet in C#
- NPM, Bower in Javascript
- Level #3: Containers - Dependency Injection/IoC frameworks which works regardless JARs/DLLs:
- Spring, CDI, Castle Windsor,Structure Map and tons of other frameworks.
- Level #4,5:Discovery and micro-Services
- OSGi - ONLY
- MicroServices here - its a same functionality but works inside SAME JVM/process.
- Its level rarely need for Apps, but some big apps use it:
- IDEs (Eclipse, Netbeans),
- Java EE servers (Apache TomEE, JBoss, GlassFish, Apache Geromino).
- Extendable Applications: like Liferay
- Embedded solution witch want to do on-line reload/upgrades
Below Java 9 (JSR 376) place:
- Just implement simple things
- Perfectly reasonable for JDK itself - so its more splitting JDK on modules
- Surprise! It was NOT a goal to provide feature-full modules on Java Language level :(
- Very basic APIs
- Just Module Names
- No versions
- No interfaces/Contract support - you should believe that particular Class/Interface are in those Module.
- You wanted more - use OSGi :)
Here is a full talk itself:


Comments
Post a Comment