Java 9 Modularity: O'Reilly Early Access Release
Itching for a look at O'Reilly's new Java 9 Modularity book? Come check out what's in the book and how to gain access to the Early Release!
Join the DZone community and get the full member experience.Join For Free
earlier this year my colleague paul bakker and i started working on the first drafts of java 9 modularity . we're proud to announce that the first bits of what will become the final book are now publicly available!
you can now order the early access release of our upcoming book through o'reilly's webshop: http://shop.oreilly.com/product/0636920049494.do . it is also available on safari books online, if you have a subscription there. if you prefer reading the final edition on real paper, you can even pre-order at amazon already.
when you order the early access release, obviously you will get updates on the content as they come. no worries, there's more in the pipeline already. be sure to follow @javamodularity if you're interested in updates, or to give us — much appreciated! — feedback.
as of now, the first three chapters are available. if you happen to be at javaone this year, mark your calendar for tuesday september 22nd, 1:30-2pm (pdt). paul and i will be at the o'reilly booth to sign printed copies of the early access release. come by and say hi!
what's in there?
so, what's all the fuss about? java's upcoming module system has been many years in the making. with java 9 it's finally coming to fruition, and that's a big deal.
on the one hand, it allows new ways of creating strictly more modular applications. the module system introduces a stronger notion encapsulation into the platform and allows for explicit dependencies between modules. on the other hand, it's a logical continuation of java's existing features and philosophy on large-scale software development. access control (private/protected/public), programming to interfaces, and so on were, and still are, important enablers of modular application development. the module system takes these features to next level.
the first chapter will take you from how java works today to how modules currently address pain points (classpath hell, anyone?!). then, the second chapter continues with an introduction of how the jdk itself was modularized using the very same module system application developers can use. meanwhile, you'll gain an understanding of the most important concepts of the java module system. after reading those two chapters you know why and what, so in the third chapters it's time for the how. here, you'll learn how to create your own modules and work with them in practice.
what can you expect?
of course, it doesn't end there (although it does end there, for now, in the early access release). the outline shown at the o'reilly site is somewhat outdated already, but it gives you a good idea nevertheless.
in subsequent chapters we discuss how modules and interfaces together do not fully solve the problem of decoupling consumers and providers of services. one of the solutions lies in the services and serviceloader model that has been updated in java 9 to work with modules.
the next chapters look at so-called modularity patterns . existing wisdom, viewed in the light of the new java module system. in these chapters, some of the more advanced apis of the module system will be discussed as well.
currently, a big focus area for us is the migration of existing codebases to java 9. fortunately, the java module system is designed with migration in mind. that doesn't mean it will be a walk in the park in all situations. the book gives practical advice on how to migrate in several steps, both for application developers and library authors.
last, you can expect an overview of how the java tooling eco-system interacts with java 9 modules. since this is very much in flux at the moment, those chapters will probably be among the last to be pushed out in the early access release process.
the process of writing java 9 modularity is quite challenging, since the final specifications of the module system have not been nailed down yet. even before the early access release we already had some rewriting to do based on developments in the jdk 9 jigsaw prototype. we are very much indebted to alan bateman and alex buckley from the oracle jdk team, who have been graciously reviewing our work and provided valuable feedback. obviously paul and i will stay on top of any developments in the period until the specification is stable, which is hopefully not too far off.
we are writing this book because we truly believe modular development is an enabler of both agile and reliable application development. through this book, we want to show how you can take advantage of age-old principles of modularity in the shiny new version of java. please let us know what you think of the java 9 modularity early access release. it's through feedback of early adopters like you we can shape the book into a useful resource for the whole java community.
the final release of the book is still set for february 2017, right ahead of the java 9 ga release. meanwhile, follow @javamodularity for interesting news about the java 9 module system and updates on the book!
Published at DZone with permission of Sander Mak, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.