Java 9’s much anticipated modularity may have less effect on your coding practices than you think.
Oracle has thus far positioned modularity as a key benefit for the Java platform, in large part because it will enable the JDK to be divided into a set of modules that can be compiled at runtime in a multitude of configurations. That effort should make Java scale down more easily to small devices. Considered a “transitive” direction for the platform, modular Java has been engineered to understand dependencies between modules and will attempt to resolve these transitive dependencies at compile or launch time.
“Modules affect all phases of development: compiling, testing, packaging, deploying, running, so they’re much more connected to the tools ecosystem than a feature like Lambdas (the focus of JDK 8),” Alex Buckley, specification lead for the Java language and the JVM at Oracle, said last year during a presentation on Java 9 at a Silicon Valley Java User Group meeting.
“I don’t think that modularization is going to do much to change how people code or change their coding practices or productivity,” says Azul CTO Gil Tene, who has participated in Java’s development. He believes it won’t bring changes to the extent that Lambda expressions and the Stream API did in Java 8.
Project Jigsaw has been the key to modularizing Java, but the effort has not been without its complications. Initially set for JDK 8, which was released in March 2014, modularity was delayed until JDK 9, which itself has been delayed as builders wrestle with the intricacies of the module system.
Observers, however, are not fully sold on modularity, and Andy Piper, CTO of Java middleware provider Push Technology, believes the capability could, in fact, be too little, too late. “Java 9 modularity is like the Spruce Goose: conceived in a bygone era, overambitious in scope, and woefully late in delivery,” Piper says. “I’m not convinced that the problems it was trying to solve are high on people’s priority list anymore, and for those that care, there are already alternate solutions.”
Developers will make use of modularity, sure, as they always use what’s in the JDK, adds Piper, who has been involved with Java for 20 years. “Will they benefit?” he asks. “Difficult to say. Smaller footprints are good even though device capabilities have radically changed in the 10-plus years since Java modularity was conceived. Modular development is also a good thing but difficult to achieve any useful ROI on without serious commitment and investment.”
“From my own experience of using Java 9 modularity, and my experience as a library developer, making modules a first-class citizen in the language encourages good design practices, and also helps solve the dilemma of how to have code that’s somewhere between private and protected,” says Trisha Gee, Java technical advocate at JetBrains. “The great thing about the approach the JDK team has taken in introducing modularity in Java is that for the majority of developers, it probably has very little impact on them or their code,” she adds.
If code does not use internal APIs, which will be hidden away by modularity in Java 9, everything should work as it used to, Gee says. “There is no need to change an application to use the modular system if it is not needed. But modularity will impact libraries, with many libraries having been forced to use APIs from the JDK internals — the very APIs that modularity is designed to hide — in order to provide the features users need.”
Developers actually could go overboard with modularity, getting very focused on decomposing a system into modules, which can cause complications, Push Technology’s Piper says.
Then, however, stresses that modularization addresses a concrete deployment concern that Java could do better on.
For most Java developers, modularization will be “kind of a shoulder shrug,” Tene quips.
Hope this blog inspires you to embrace change and grow. Whether you are an XPLORER or not, feel free to glance through our blogs and help us guide and support you in your voyage to success. Happy Learning!
- # VLSI
- #Advanced JAVA
- #Big DATA
- #C Programming
- #Cloud Computing
- #CORPORATE Training
- #DATA MINING
- #Embedded systems
- #Ethical Hacking
- #INSTITUTIONAL Training
- #Java Script
- #LAB View
- #MAT LAB
- #Mongo DB
- #PCB Designing
- #Placement Training
- #R Programming
- #Raspberry Pi
- #RETAIL Training
- #Soft Skills
- #software testing
- #Web Designing
- #Windows Server
- #Word press
- #XPLORE IT CORP
- 10 Easy Ways to Facilitate Web Development CoursesPHP
- 7 Essential Ways to Learn Android Course:ANDROID
- Best Internships and inplant training institute in Coimbatore (Xplore IT Corp)Courses
- Five Ways to Learn Internet of Things (IOT) EffectivelyCourses
- Six Ways to Learn Artificial Intelligence Training EffectivelyCourses