David  Blevins – Apache TomEE

Apache TomEE integrates various Apache libraries into Tomcat to make it a JavaEE 6 Web Profile certified server. It is very small and 100% Tomcat compatible (every application that runs in Tomcat also runs in TomEE).

The advantages of using TomEE instead of manually assembling all libraries: the integration is well-tested, there are no duplicate classes, it is actually faster than adding the needed libraries manually.

  • There are also some special editions of TomEE that contain additional components which are not part of the Web Profile (namely JX-RS, JAX-WS, JMS, and JCA)
  • Side note: with JavaEE 6, you may not (and probably should not) use EAR files, but put everything (EJBs and stuff) directly into the web-app.
  • Recommendation: use Arquillian for testing (TomEE has a big Arquillian test suite)
  • JPA is easy to integrate (which means that it is possible to replace OpenJPA with Hibernate), other parts are not easy to change (like JSF, CDI)

Matthias Wessendorf (Redhat) – Mobile Web apps with HTML5 and JavaEE

This talk covered an introduction to the type of mobile applications (native, plain web, and hybrid), some JavaScript framework overview, and of course AeroGear (a JBoss community project for mobile development – both HTML5 and native – which Matthias is currently working on)

  • Native apps: a problem here is the time to market (e.g. the Appstore approval takes two weeks, and not all users install updates immediately)
  • Plain web apps: often don’t have a very good user experience (e.g. when facing connection problems).
  • Side note: Have a look at the simple AeroGear example application for plain HTML5 (a single webpage based on jQuery, jQueryMobile, and JAX-RS)
  • Hybrid apps: the de-facto standard here is Apache Cordova (former known as PhoneGap, donated by Adobe). Reference app: Wikipedia. Cordova bundles HTML5 apps in a native shell (using an embedded browser, provides some bridging functions and a plugin API)

There are a lot of JavaScript frameworks out there that try to ease the pain of writing mobile web apps, for example:

  • jQuery (low-level, not “framework-ish”)
  • Backbone.js (simple and lightweight; well-structured; real web development – doesn’t hide the DOM like e.g. GWT does)
  • alternatives to Backbone are e.g. angularJS (more like component-based), Ember.js,… and vanilla.js ;)

David Tanzer – Offline Web Applications

David states that many reasons why to build native apps instead of web apps (like native phone features, speed, offline mode) are not that valid anymore. Modern web applications are running the presentation logic on the client, which opens the door for offline features.

The basic steps to make a web application offline available are:

  • Define which application resources must be available offline – and cache them (HTML5 cache manifest, which doesn’t work in IE earlier than 10)
  • Cache the application data: Indexed DB (JavaScript object database, not supported on all browsers – see here and here)
  • Synchronize when online (which is a potentially complex task, e.g. three-way-merge)

The conclusion is that offline web apps can currently be implemented only in restricted environments (because it is nearly impossible to find a solution that runs on all major browsers), and the implementation is fairly complex.

Thomas Sundberg – Clean Code

A very unagitated talk about code quality. I liked Thomas’ style very much (even if some claimed that it made them feel “sleepy”). He didn’t explain what “clean code” is or how to write clean code, it was more like a friendly reminder that there is something called “clean code” and you should think of it more often (and leave the campground cleaner than you found it).

Some quotes:

  • It’s all about maintenance – “easy to read” is the most important property of code
  • …about properties of a good test: No conditions; no repetition; clean setup; simple code (i.e. only one path)
  • …about naming: use domain names instead of technical terms; one word per concept; pronounceable names; no useless prefixes/suffixes
  • …about comments: Don’t comment bad code – rewrite it. Explain yourself in code. Comment only if really necessary.
  • Test-code is most important (production code can always be fixed)

Axel Fontaine – Flyway

Axel is the mastermind behind Flyway. Even though this is an introductory talk (and I am already using Flyway on my current project), there were some noteworthy things:

  • He recommends to always migrate automatically on startup (e.g. the Hibernate session factory @DependsOn the flyway migration) – Flyway automatically performs some locking if multiple nodes access the same database.
  • Flyway now also supports Java-based migrations
  • Another recommendation: Always use backwards-compatible migrations (Example: renaming a column means: add column, copy data, and install a trigger. In the next step, delete trigger and old column).
  • Book: Refactoring Databases (a few years old, but most stuff is still valid)
  • Flyway’s primary “competitor” is Liquibase , which offers more features, but is also more complex.

Andres Almiray – Functional Groovy

Groovy offers some concepts which are kind of “functional” (but the main intention is – as always with Groovy – to make a developer’s life easier). Some things to remember:

  • Closures are functions, but they are not side-effect free (by design)!
  • Partial evaluation is possible with the curry() method
  • Treat objects as functions with the call() method
  • Turning methods into functions: & (ampersand)
  • Create immutable objects with @Immutable
  • Side note: add the @Grab annotation to an import statement to automatically download and add a dependency to the classpath. Nice for self-contained scripts…