Devoxx 2012: University Days
Devoxx doesn’t need much of an introduction: it is the largest vendor-independent Java conference in the world, organized by the Belgium Java User Group (BeJUG). Devoxx takes place in Antwerp and is organised yearly. In 2012 the main focus of the conference lies on Java, Android and HTML5. Devoxx 2012 partners with companies such as Oracle, Google, IBM, SpringSource, JBoss and many others. These partnerships illustrate the global importance of Devoxx on the Java community.
I’ve had the opportunity to attend this conference in the past and in my opinion, it’s the most important professional event for Java developers located in Belgium. This year Devoxx attracted 3400 visitors from 40 countries.
Day 1: Modularity
Currently I’m working on a SAAS project for the Flemish Government. In my project different users (eg. municipalities) sometimes have different needs in the same software. Often these needs are difficult to accommodate. Especially when it comes to versioning and deployment. At compile time we use Maven modules and we have a system we call “contract versioning” to insure maintainability. In practice this means that we sometimes have several versions of the same application deployed. Our current setup works fine, but with Mark Reinhold’s deferring of Project Jigsaw to Java 9 (2015), OSGi regained my attention and might have very a interesting future in the form of Project Penrose or on it’s own.
In Modular Architecture Today, Kirk Knoernschild (author of Java Application Architecture: Modularity Patterns with Examples Using OSGi) started with “modularizing” a small monolithic project. While interesting and well presented, this modular architecture is something most people have been doing in Maven. The second part of the talk, was about OSGi, introducing bundles (= JAR + Manifest) and import/export-functionality to make sure some packages are left completely hidden (eg. implementation) while others are public (eg. API). There is no real coupling between implementation and API. With OSGi every module get it’s own lifecycle, which makes it possible to change an implementation at runtime without having to deploy the API (or other unrelated modules). I had seen an example of this in some distant past, but the demo was very interesting nevertheless. Kirk used Spring in his demos, ensuring the audience that there was no explicit dependency between OSGi and the code written. I find this very important. He proved this by running a class outside the OSGi container.
Modularity got my attention, so after lunch break I got ready for the Modular Java EE in the Cloud talk. I saw Bert Ertman and Paul Bakker before at a BeJUG talk, so I expected a lot of live coding and the use of some neat tools. My expectations were met. The talk consisted of 3 parts:
- OSGi: using Bndtools for making a OSGi application. Bndtools has an interesting tutorial on it's website.
- Using Java EE with OSGi
- OSGi on the Application Server with Java EE APIS exposed as bundles, using a WAB that unfortunately had no support for WebLogic Server.
- Hybrid solution: using an injection bridge for use both older and newer code/modules.
- OSGi à la carte: doing it the OSGi-way, but without the Spring configuration Kirk demoed. I have to say that the Spring approach looked easier, faster and less intrusive.
- Cloud: deployment of OSGi bundles using Apache ACE, which I will definitely investigate later as it seems like a possible opportunity to reduce deployment cost.
Day 2: Android and AngularJS
I started day 2 with a University session called Important Android Stuff by Romain Guy and Chet Haase. The first part was about the new Animation system in the Android SDK. Having done some work with the older Animation classes (android.view.animation), it was nice to see how the new system (android.animation) matured and how it was now easier to do more complex animations. The SDK also provides (sane) defaults (eg. duration) which makes the code less verbose. The second part of the talk brought some tips on performance optimization: don’t nest layouts, use the correct layoutmanager, correct use of Bitmaps, overdraw, .. Android 4.2 comes with a new cool Developer option called “Show GPU overdraw” that displays what parts of the View can use optimization.
I also had a very interesting chat with the guys from Zeroturnaround on their LiveRebel product. It promises automated deployment from CI servers (Jenkins and Bamboo) to WLS, GlassFish, Tomcat, .. including hotpatching and rolling restarts. Their demo looked impressive and LiveRebel might be perfect for 1 of the projects I’m working on.