November 21, 2013 2 Comments
This year I had the opportunity to attend Devoxx again for the entire week. I usually try to get my hands on a Combi ticket for both the University and the Conference. As always, it was an enlightening and invigorating experience.
For me Devoxx 2013 was all about Java SE 8 in general, Lambdas in particular and the new Java EE 7 stuff.
Java SE, Java EE and Cloud & BigData were the tracks I was most interested in.
I’ll try to give you my perspective on this year’s Devoxx: what I personally liked, what I didn’t like so much and what actions I could take to continue to improve my knowledge and be a Well-Grounded Polyglot Java Developer.
The latter is where I hope to receive some feedback from you.
Cloud & BigData
In the presentation “Data Access Patterns in this day and age (of cloud, bigdata, nosql & other buzzwords)” by Alex Snaps, the concepts of and differences between RDBMS with ORM and BigData with NoSQL were explained.
Basically RDBMS is all about ACID (Atomic, Consistent, Isolated & Durable), whereas BigData is all about BASE (Basically Available, Soft state, Eventual consistency).
Because RDBMS are ACID, they guarantee consistency immediately and at all times. This makes them inherently “slow” due to locking and their CPU affinity. “Slow” needs to be taken with a grain of salt, depending on what kind of environment your RDBMS runs on.
NoSQL stores have much lower latency. They do not pose locks on their data and distribute the processing of data across multiple nodes. This causes them to be not immediately consistent, but eventually consistent. You can use NoSQL stores in cases where eventual consistency is good enough, like in the case of immutable data.
You have different options on how to store your data, like key/value stores, document stores, graph stores, etc.
Architectures like CQRS, Complex Event Processing, etc. make full use of BigData and NoSQL concepts.
The presentations “A hint of NoSQL into my Java EE” by Guillaume Scheibel and “MongoDB for JPA Developers” by Justin Lee put these theories more into practice.
Using Hibernate OGM and Morphia respectively, they showed how you could migrate an existing application from using a relational database to using a NoSQL store.
With Hibernate OGM all you have to do is change the configuration slightly and switch the persistence provider. You also have to create a JBoss AS 7 and MongoDB specific manifest file if you choose to use those platforms. Then you just redeploy and the application should work as before.
Morphia provides an API and annotations to perform a lightweight type-safe mapping of your Java objects to MongoDB. Here, more code changes are involved to allow the application to use a NoSQL store.
I found the “Data Access Patterns” and “NoSQL in JavaEE” presentations more informative than “MongoDB for JPA Developers” because of the fact that more basic concepts of BigData and NoSQL were explained, and developers without prior knowledge could already grasp the basics of the technology.
The demonstration of Morphia already went somewhat faster and deeper into the technology. It was also tuned specifically for Justin’s own project of which I don’t know whether or not it will become widely spread.
As a kind of side-dish I went to the presentation “OpenShift Primer – get your Applications into the Cloud”, given by Eric D. Schabell.
As a JBoss technology evangelist he gave a broad overview of the possibilities of OpenShift, but in my opinion it was somewhat too much of marketing talk. He showed some applications that he had deployed in the cloud, but I had hoped to see more different combinations in action. Not much technicalities were presented.
A lot of presentations at Devoxx this year were about where the Java language is heading to and the changes that are happening in the Java ecosystem.
I attended the “Java EE 7: What’s New in the Java EE Platform” presentations by Java EE evangelists Arun Gupta and Antonio Goncalves during the University, and by David Delabassee during the Conference.
The Java EE 7 presentation of Arun and Antonio was quite theoretical with only a few, in my opinion too fast, demo’s. But they were very enthusiastic speakers and gave a very good overview of the changes to the platform. Also, Arun’s demo code is publicly available at GitHub for your to play with, which is a good thing.
David’s presentation was much shorter of course, but he gave much clearer code examples. Especially the comparison between the JMS 1.1 API in Java EE 6 and the JMS 2.0 API in Java EE 7 was nice to see. I now also have a clearer view on what you can actually do with the WebSocket API.
Java EE 7 focuses on the Cloud, HTML5 and WebSockets as new technologies, support for JSON generation and parsing, simplified JMS and JAX-RS API’s, better integration of CDI, new specifications for Batch applications and Concurrency and some minor developer productivity changes in several other specifications.
I also went to some Tools in Action presentations about Java EE 7 and HTML5 development in the NetBeans and IntelliJ IDE’s. I had hoped to see some live Java EE coding, but in the case of the NetBeans presentation, it was just a pre-generated sample application that was shown. You can generate those yourself using the “New Project” wizard, so I think presenting that at Devoxx wasn’t that useful.
In the IntelliJ presentation I’ve seen a lot of neat code completion and a showcase of IntelliJ’s power. But I didn’t see that much Java EE 7-specific coding, which was what I actually came for.
Of course, you can’t show much during a presentation of just half an hour.
To see “the other side”, I attended Sam Brannen’s presentation “Spring Framework 4.0 – The Next Generation”.
In my humble opinion, Spring doesn’t seem to add much anymore these days compared to the current Java EE. Of course, Java EE used past Spring’s ideas and standardized many of them in it’s recent specifications.
Other than a way of having your application running in a managed environment without the use of a full-blown application server, nothing seems to be really different from Java EE anymore.
Some nice additions, like conditional creation and injection of beans, don’t exactly exist in the Java EE specification. Well, you can write producer-methods in CDI but that is more cumbersome than using Spring’s new
@Conditional annotation. Other additions, like the possibility of having Groovy-based bean definitions, reaches out the hand to the new JVM Languages community but don’t seem of that big importance to me.
Sadly, the presentation was purely theoretical. There weren’t any demo’s or larger code examples shown, which I found pity and not that interesting.
With regard to the Java Core language, Devoxx 2013 was all about Lambdas!
Lambdas are a very popular feature of many modern programming languages. They support a more functional style of programming and support using a “map-filter-reduce” pattern on collection data.
Before the addition of Lambdas to the Java language similar features were already available, but were implemented using anonymous inner classes. Those were hard to read and you had to write a lot of boilerplate code.
Other than because of these facts, Lambdas are also added to the Java language because they make it easier to implement multi-threaded processing of collections, supported by the new Stream API.
The Stream API made changes to the existing Collections API necessary. To support backwards compatibility and not break any existing code that used collections, Java interfaces were changed to include the concept of default method implementations. This concept enables real multiple inheritance of behavior in Java, but specific rules are applied to avoid the “diamond of death” problem. Also, certain interfaces can be annotated as functional interfaces. Functional interfaces are interfaces with a single method, and support Lambda expressions.
José Paumard gave a very good overview on Lambdas and their usage in his presentation “Autumn Collections : from iterable to lambdas, streams and collectors”.
I found his presentation very good and quite clear, although I was new to the subject. In the end I felt like I had a basic understanding of the concepts, but I still didn’t have a complete image of what I could do with Lambdas or what their power really was. I don’t have any knowledge of functional programming principles, so maybe that’s why I didn’t understand Lambdas completely.
Hoping that I would get a better understanding of Lambdas, I attended “Lambda: A Peek Under the Hood” by Brian Goetz. Boy, that was a mistake.
I respect Brian a lot, and he is a very good and enthusiastic speaker, but for me personally the talk went much to deep. Of course, that’s what you might expect from a presentation denoting “A Peek Under the Hood”.
You already had to have some knowledge about JVM bytecode and invokedynamic to be able to follow Brian’s reasoning. I didn’t get any information out of that presentation that would give me a better understanding of what Lambdas are all about, but honestly that’s not Brian’s fault.
One thing I remember well from his presentation: “The first idea that you have, is not always the best!”
The presentation that was my favorite of Devoxx 2013 (except the JavaPosse LIVE –> Beer!!!) was “Java 8 Language Capabilities – What’s in it for you?” by Venkat Subramaniam. That guy can present!
Although it was a very fast paced presentation, mostly due to the fast paced fashion that Venkat speaks in, it was an eye opener for me. Venkat demonstrated the use of Lambdas from the ground up.
He started making a case concerning stock exchange data retrieved from a web service and implementing that the pre-JDK 8-way by using anonymous inner classes. During the examples, the performance of the application was shown. At first, processing all the data took several minutes.
He kept rewriting his example, continuously improving the code until he eventually arrived at an optimal implementation using Lambdas. He gave clear explanations of the different possibilities how you could tune the Lambda syntax and how you could optimize its usage.
In the end he changed the code to allow the data to be processed concurrently by multiple threads, only by changing one word in the code:
parallelStream(). Performance went up from a few minutes to a few seconds!
Venkat has effectively demonstrated and proven the power of Lambdas.
Besides Lambdas, Java SE 8 also includes some other changes.
A new Date/Time API is built into the SDK, based on the popular JodaTime API.
New methods, based on Commons Collections are added to the Java Collection API.
The JVM PermGen space is replaced by MetaSpace where information will be stored in native memory.
Looking somewhat further into the future, I went to take a look at the presentation “The Modular Java Platform and Project Jigsaw” of Mark Reinhold. The goals of project Jigsaw, that was postponed from Java SE 8 to Java SE 9, are modularization of the Java SDK to improve scalability, performance and security. Mark proposed a solution using
*.jmod files describing which modules of the SDK you will include, and effectively create your own custom JRE. He gave an overview of which modules would likely exist and how they could be put together into a working application. This can be a solution if your space is constrained.
Mark gave a nice presentation, and the project can solve some issues still existing in the current SDK.
Web & HTML5
To become a better developer, more specifically a “Modern Java Web Developer”, I went to Matt Raible’s talk.
I had hoped to get code examples, demo’s and best-practices. But I got none of that. For me the presentation only contained a lot of buzzwords, technologies and different frameworks, some of which I even never heard of.
Again, that’s not Matt’s fault.
The thing I remember from Matt’s presentation is that you have to know ALL of it to be a Modern Java Web Developer: You have to be a polyglot programmer.
Things to keep in mind are that you have to use the JVM to its full potential: know how and when to use frameworks and technologies like Groovy, Grails, Play, Scala, etc.
You also have to leverage the power of the most recent SDK’s: the new features of Java SE 7 and 8.
And Java EE is not the only thing that exists. Spring and its sub-projects also have a lot of potential, like Spring Data which can become the next Hibernate.
After that, more buzzwords and frameworks, that are unknown to me, appeared: Google Web Components, Polymer, Dart, Wro4j, … which was the point were he lost me.
What struck me this year is that those new JVM Languages really get a lot of attention. Most of the time the rooms where Groovy, Scala and the like were presented, were stacked.
In the past I did not really pay attention to those languages yet, and did not investigate where they can be used or what their strengths are. So, after all Java SE and Java EE presentations I followed, on Friday it was time for something else.
I attended the “What Makes Groovy Groovy” presentation by Guillaume Laforge and “Coding in Style: How to wield Scala in the trenches” by Joshua Suereth.
I found the former presentation the best. Guillaume really showed me the basics of Groovy and compared it to the Java Core language. He started explaining Groovy’s features and strengths and showed a Java code example which could actually also run as a Groovy class. Piece by piece he removed parts of the code to reduce the boilerplate and diminish it until the very least amount of code that Groovy needed to make it run. The result was astonishing: he showed only how little Groovy code is necessary, which made the result more readable and less annoying to write. While he was reducing the code, he showed specific features of Groovy like default constructors, properties that makes getters and setters redundant, embedded Lambdas and more.
Groovy and Java can perfectly interact with each other, so a slow introduction of Groovy is possible. Groovy can best be introduced in a project for unit testing and scripting.
Joshua’s presentation wasn’t much of my liking, probably because I didn’t know anything about Scala yet and I expected an introductory talk like Guillaume’s Groovy presentation.
I persisted and tried to understand all the stuff that Joshua was explaining, but without any background in Scala and knowledge of the concepts or buzzwords that were thrown around, this presentation wasn’t my thing.
As I already said in the beginning: I really enjoyed Devoxx again this year. It was very informative, a lot of fun and crowded as always.
I now have a clear view of the recent and upcoming changes in the Java SE and Java EE platform. I learned some new technologies and web frameworks that seem to be worth investigating. And it seems about time that I try out Groovy and/or Scala and become more of a polyglot programmer.
I bought the book “The Well-Grounded Java Developer: Vital techniques of Java 7 and polyglot programming” by Benjamin J Evans and Martijn Verburg, which I will try to read soon. This way I hope that I can already discover the basics of those things that are yet unknown to me.
I would like to kindly ask you to give me your feedback about this blog post, your experiences of Devoxx 2013 and your opinions or experiences of what someone has to do to become a Well-Grounded Java Developer.
I would also like to thank my employer for giving me the opportunity to attend this year’s Devoxx, to learn new things and to meet new people.
In the days or weeks to come, I’ll write some more blog posts about each track or technology that I discovered at Devoxx, and I’ll update this post to include links to those other posts.
Disclaimer: The statements and opinions described in this post are solely my own and do not necessarily represent the opinion of my employer, colleagues or of my clients.
With big thanks to BeJUG for the pictures: http://www.flickr.com/photos/bejug/sets/