Optional patterns

Much has been said about Java 8 and about the way it will change the way we design applications and APIs. Of course the fisrt big thing is lambda expressions, followed by the Stream API.

Another element was introduced, the final class Optional, which also changes the way we can write API and applications, leading us to better and more fluent patterns. The purpose of this article is to detail the concept of optional, and show the available patterns to use optionals efficiently and elegantly. There are very powerful and very elegant way to mix optionals and streams, the aim of this article is to describe those patterns.

Continue reading Optional patterns

A week in Devoxx

Infinite possibilitiesWhat really stricked me in Devoxx this year is the real momentum around Java 8. I cannot remember any version of Java that arrived with such enthousiasm. All the Java SE 8 talks were packed, the “Ask the expert panel” was packed, and the prospective talk by Brian Goetz was packed too. Java developers want to get to know Java 8 better, want to learn about the new patterns built on lambdas and streams, and they also want to know what lies ahead for us.

And indeed, Java 9 is already around the corner, there are already preview versions available, with already new things implemented.

Continue reading A week in Devoxx

Java 8 and Streams at Devoxx

Devoxx is running nicely so far, with many people and lots of very interesting topics. We saw cool news about the future of Java. First from Paul Sandoz (@PaulSandoz) about the project Jigsaw. This one could look like old stuff, but it seems it’s going to make it in Java 9, with some nice features. And second from Brian Goetz (@BrianGoetz) about projects Valhalla and Panama. Only speculations in these, with of course no release dates, but really exciting features too.

One of the great announcement from Stephan this morning is the release of new stuff in Parleys. Parleys is the platform on which all the content from the different versions of Devoxx and so many other conferences, including JavaOne, is published. With about 3500 talks, I think it must be the top platform for us Java developers. And so now, Parleys is also publishing online courses. A few have already been published, and more will be coming in the next few months of course.

I also made my University talk, about Java 8, the Stream API and Collectors. Here are the slides. The code is here: https://github.com/JosePaumard/jdk8-lambda-tour


Back from Devoxx

Devoxx is some kind of obligatory pilgrimage for Java developers, at least European. Antwerp is a bit like the forest of the Carnutes. Every year at this time, the druids of Java development, Web, Android, gather there, attracted by a strange call.

Once again this year the tribes came from many countries, more than fourty, and from far beyond the seas. This year again, the high priests were there, and brought us the good word. Because by next year we will have a new version of Java, the 8th, the long-awaited 8th should I say. Being there to present this new version is a challenge, both on the strategic and business sides for Oracle.

So Java 8 arrives, in a bit more than four months at the time of publication of this blog, even if with the version available today, one can begin to learn the new APIs, including Stream and Collectors. Because yes, with the arrival of Java 8, we will have to sharpen our knowledge. New things there are: the language changes, the APIs and the patterns. And even if it affects us less as developers, the JVM itself changes.

With the presence of Mark Reinhold, Brian Goetz and Paul Sandoz, Devoxx 2013 was undoubtedly the best opportunity to make an inventory of all this. Brian described the whys of everything, tracing the path of his thoughts. Paul explained how the Stream API works internally. An expert speaking, since he is the one who wrote the Stream API. And finally, Mark gave us the road map of the development of Jigsaw, or what remains of it, or more precisely what it will become.

Continue reading Back from Devoxx

Devoxx from above

Devoxx (not only the 2013 edition !) takes place in a cinema complex, the Kinépolis. It is the second largest in Europe, the first one is located in Barcelona. Although this complex is also the site of conferences (Devoxx is one of them!) and corporate events, it is primarily a place for the cinema, in which you can even watch films with real actors, with no slides and no live coding (yes, it’s a little disappointing, but it seems that some people like that …). I had the chance to visit the backstage (thank you Stephan), and even if the advent of digital technology has changed the organization of theaters, the atmosphere is still incomparable. So let’s go to a little guided tour, in a place where you’ll hear about picture in picture, terabytes and optical fibers. This not the Cinema Paradiso we all once loved, but still an amazing place !

Continue reading Devoxx from above