Over at SitePoint I'm sending out the Java Channel Newsletter every other Friday. In it I ramble about what I found interesting in the Java community. You’ll be surprised to hear that we deliver it via email - you can sign up here. This here is Issue II from September 23rd 2016.
But why? What's taking so long? In one word: Jigsaw. In more words: Read on…
The Neverending Jigsaw
(This cultural reference might be a little obscure, so let me drop an explanatory link.)
A Little History
Wishing for modularity in Java has a long history, dating back at least eleven years to when JSR 277 was filed in 2005. Jigsaw itself came a little later – Mark Reinhold announced it on his blog in December 2008. Since then it underwent a series of technical and organizational challenges and reshuffles before going back on track in 2011 when it got fully staffed and started an exploratory phase, which ended three years later.
In that time a lot happened and it is easy to ignore just how much work had to be done! There are three Java Enhancement Proposals (JEPs) just to envision how to cut the JDK, to reorganize the (massive) code base accordingly, and to restructure the run-time image. And none of that even touched on the design, let alone implementation, of the module system itself.
Bones of Contention
Because that's the fly in the ointment – how exactly should the module system behave?
Let's take strong encapsulation as an example. This is one of Jigsaw's two major goals, a way for module developers to keep users from breaking into the module's internals and depending on implementation details, thus deteriorating maintainability and hindering evolution. But it's not that easy. To really encapsulate internals, reflection must also be stopped at module boundaries. And suddenly everybody is up in arms because now many workarounds and performance-critical hacks break down.
The other main goal is reliable dependencies, which allows Java to do some sanity checks during compilation and launch to verify that the setup makes sense:
- Are all dependencies present?
- Are there no statically defined dependency cycles?
- Are there no ambiguous situations, e.g. because of two versions of the same artifact?
Again, this sounds nice. But then someone comes along and starts talking about dependencies that are only required at compile time but optional at runtime. This brings us back to square one, where the JVM could not verify whether the program seems to have everything it needs to run.
These are just two examples and the list goes on. And this is not just a figure of speech, there's an actual list of open issues!
Now, I'm sure that not all items on that list will receive the same level of attention as the two I discussed above. But for these, substantial changes to the existing implementation have been proposed by the Jigsaw team and they are only now making it into the early access builds. The project simply needs more time to kick ideas and feedback back and forth between the Oracle developers and us users. Hence the additional delay.
(If you ask me, I'm not sure whether we will actually download JDK 9.0 in July 2017 or whether it has to be delayed even longer.)
This rabbit hole is deep, though, and a newsletter is not the best medium to explore it. What about this: I'll write more about it if you're interested. Retweet this to show your enthusiasm!
What Else Is Going On?
Again, there is an obvious one-word answer: JavaOne. The next newsletter will cover it in-depth but you should check the YouTube channel if you can't wait that long. If there's something you liked, feel free to recommend it to me via mail or Twitter.
On SitePoint, our Java channel is slowly gaining speed. We started to write about JPA and Hibernate, giving you 5 reasons to use it (Thorben Janssen), which should be interesting even if you're already working with it, and a hands-on introduction (Alejandro Ugarte). Pretty soon Vlad Mihaelca will explain schema migration with Hibernate and FlywayDB. But this is a vast topic and there will be more about it.
By the way, did you know that you can get an RSS feed for pretty much everything on SitePoint by appending /feed to the URL? For channels (Java, obviously), tags (since we were talking about it, what about Hibernate?), and even authors (yours truly). Give it a shot!
Wrapping Things Up
Let me leave you with a couple of articles I think you might find interesting:
- Java EE 8 Delayed Until End of 2017, Oracle Announces at JavaOne
- Private methods in interfaces in Java 9
- TDD for PL/SQL Developement
- Advice on removing javac lint warnings
- How PayPal Scaled to Billions of Transactions Daily Using Just 8VMs
I wish you a great time!
so long … Nicolai