Blog

Devoxx Antwerp 2008 – Impressions

22 Dec, 2008
Xebia Background Header Wave

University

Monday 8th of December 2008 was the start of a week full of information. After attending the complete conference (including the University sessions) last year I felt it would be a good thing to do the same this year.
The university sessions give me a change to get more in-depth knowledge on some of the subjects. For this first day I had chosen the sessions on Scala and Java Power Tools.

Scala

The session about Scala has got me really interested in this (for me) new language. The combination of Object Oriented and Functional programming, the tight integration with Java (in the end its all Java bytecode) and the conciseness makes it worth my while to have a closer look. As Ted Neward mentioned in his talk: ‘Today start with Scala to experiment and prototype, so next year you’ll have the advantage of Scala knowledge to be able to use it in production systems.’

Java Power Tools

The Java Power Tools title got me a little confused. I expected a session about some of the tools in the jdk that can help you to program more powerful, but instead it was a session about automated builds, code coverage and quality metrics. These things are common practice in the projects done by Xebia. The only things that where new to me where the part of the session about the Hamcrest Asserts and the Behavior Driven Development framework easyB.

Hamcrest Asserts

JUnit 4.4 introduces the assertThat method in which assertions can be expressed in a more readable and understandable manner. Instead of saying

  assertEquals(10,x)

you can say

  assertThat(x, is(10))

which to english speaking people makes a lot more sense.

easyB

By using a specification based Domain Specific Language, easyb aims to enable executable, yet readable documentation.
Describing a zipcodevalidation can be done like this:

  given "an invalid zip code",
{ invalidzipcode = "221o1" }
and "given the zipcodevalidator is initialized",
{ zipvalidate = new ZipCodeValidator() }
when "validate is invoked with the invalid zip code",
{ value = zipvalidate.validate(invalidzipcode) }
then "the validator instance should return false",
{ value.shouldBe false }

Later in the week a session about the Feel of Scala described a similar approach used in the ScalaTest framework. With this approach the existence of a key in a map can be expressed like:

map should have key 'a'// because everything in Scala is a method call and an expression
// this results in a java like call
map.should(have).key('a')
// the should method of course doesn't exist so this is a potential compiler error.
// Scala's use of implicit conversions allows you to create a wrapper method
// which add's the should method to a class.

For the second day of the University sessions I chose Java Performance Tooling and Filthy Rich Clients beyond Java.

Java Performance Tooling

This session was a mix of IBM promotional talk about IBM Monitoring and Diagnostic Tools – Health Center (which looks good by the way). And a general introduction on how to analyze performance problems and the tools you can use with that. Overall the session gave me a better understanding of memory management and garbage collection and the difficulties you run into when investigating performance issues.
The most interesting statement was from Kirk Pepperdine saying: The purpose of using Queue’s is, not getting work done!

Filthy Rich Clients (beyond java)

This session was an introduction to Android and Flex and how these two can create Rich Clients. The Filthy Rich Client book uses Java examples and with this session Chet Haase an Romain Guy wanted to show some examples in Android and Flex.

Android

Android is not a Java platform but it uses the Java programming language. The Java bytecode is compiled into dex bytecode which runs on the Dalvik VM. This VM interprets the dex bytecode, but there’s no JIT compilation yet. Furthermore the garbage collection is of a simple mark-sweep type. Every application runs in it’s own process with it’s own virtual machine and as a separate user for security reasons.
From the little coding examples I’ve seen it feels a lot like Swing programming but I will need to further investigate that to be sure. It was a nice first introduction but for me personally not something to dive into.

Flex

I already played a bit with Flex since i got the first introduction on last year’s conference, so the only new things were about the work being done on Flex 4 and some interesting examples about the Pixelbender and Filtering possibilities in Flex.
Some of the other Flex sessions this week make me look forward to the release of Flex 4 and it’s improved possibilities.

Conference

In this section I will highlight some of the sessions I attended.

JavaFX

As JavaFX 1.0 was released just before the conference there were a lot of sessions about this subject. Also the keynote of the first conference day was mainly about JavaFX (As well as a really commercial talk by IBM on how they implemented RFID to monitor the conference)
The most interesting parts of the presentation were about the plugins available for Adobe Photoshop and Illustrator to export design and timelines to a format that can be imported into your JavaFX application. The demonstration showed a somewhat plug and play like experience – Really cool stuff!
The biggest problem in my opinion is the non existence of a UI Toolkit with widgets to support building enterprise applications with a rich user experience. Which leads me to believe that flex is still miles ahead.

Concurrency

The new Fork-Join framework introduced in Java 7 can help in programming for multiple cores. With the increasing amount of cores in the next few years it won’t be enough anymore to separate on the user request level. This means applications must decompose into small units of work that can be run separately. Most promising candidates are sorting and searching.
The new ParallelArray class abstracts the parallelism from you.
The fork-join framework reduces contention for the work queue by using a technique known as work stealing. Each worker thread has its own work queue, which is implemented using a double-ended queue. When a task forks a new thread, it pushes it onto the head of its own deque. When a task executes a join operation with another task that has not yet completed, rather than sleeping until the target task is complete (as Thread.join() would), it pops another task off the head of its deque and executes that. In the event the thread’s task queue is empty, it then tries to steal another task off the tail of another thread’s deque.

Future of RIA

With the introduction of Flash player 10 a lot of new possibilities are available for Flex applications like: 3d (or at least 2.5D), the Pixelbender, Flash text engine and the text layout framework and Sound.
With AIR 1.5 released all the Flash player 10 features are also available on the desktop including encrypted local storage.
The new Flex release (codename Gumbo) will support Flash Catalyst (the integration between Photoshop/Illustrator en FlexBuilder), a new States Model, a new Animation Model and more…
Also Adobe is working with springsource to get a better integration between Spring and Flex.
An interesting demo was shown about the Model Driven Architecture capabilities of the new LiveCycleDataServices suite.
Later in the week James Ward showed a very impressive demo where a PDF was created from a Flex application without losing any functionality of the flex app. All rich user experience stuff was still working (a flash movie can be easily integrated in the PDF) and also the update of the data could still be performed. Wow! Speechless.

Effective Java

This keynote talk was all about the second edition of the book with rewritten examples to reflect the current best practices. The most interesting part was about Enums.
First thing was about adding a constructor to the enum type to be able to add extra information about the enum element. This can help you avoid using the ordinal function which is a bad practice anyway since changing the enum can influence your application if the ordinal function is used.

public Enum Ensemble {
SOLO(1), DUET(2), TRIO(3), QUARTET(4), QUINTET(5), SEXTET(6), SEPTET(7),
OCTET(8), DOUBLE_QUARTET(8), NONET(9), DECTET(10), TRIPLE_QUARTET(12);  private final int numberOfMusicians;
Ensemble(int size) {
numberOfMusicians = size;
}
public int getNumberOfMusicians() {
return numberOfMusicians;
}
}

Second was about singletons which have the need to be serialized. Using the readResolve method to return the instance variable is open for carefully crafted attacks. This way it becomes possible two have multiple instances of that singleton if not all fields are transient.
The easiest way to create a singleton is by using an Enum class. All enum’s are serializable and the JVM guarantees Enum is a singleton.

public Enum Elvis {
INSTANCE;
private String[] favoriteSongs = { "Hound Dog", "Heartbreak Hotel" };
public String[] getFavoriteSongs() {
return favoriteSongs;
}
}

Java 7

Java 7 will contain:

  • modularity
  • JSR 292: VM support for dynamic languages
  • JSR 203: more new IO API’s
  • some small language changes like safe rethrows, better type inference and multi catch.
  • JSR 296: Swing app framework
  • forward-port of jdk6_u10 features
  • Swing updates
  • SCTP (Stream Control Transmission)
  • SDP (Sockets direct protocol)
  • upgrade classloader architecture
  • Unicode 5 support
  • Hotspot runtime compile enhancements
  • G1 garbage collection
  • JSR 308: Annotations on java types
  • JSR 166: Concurrency and Collection updates like the fork-join framework.

But that’s about it. And the most disappointing about this talk was that Java 7 is expected in 2010. Yes, that’s more then a year from now!

Be Smart

This session by Ivar Jacobson was the most entertaining session. In front of a fullyfilled room, he had a very good talk about Being Smart (subtitled: What they don’t teach you about software at school). After OO, UML, Rup & CMMI and XP it’s al about Scrum now. All are good but none is all you need.
Smart means, things should be done as simple as possible (but not simpler). Agile provides simple and lightweight starting points, being Smart is about knowing when to break the rules. Smart is Agile++.
It was very good to hear all the things we already practice within Xebia being called Smart.

Conclusion

This Devoxx conference was a good conference overall. The minor thing was that there was nothing really new that was mentioned. For me the items I will work on in the near future are Scala and the new Flex release. JavaFX will be a good thing to have a look at after that I guess.

Questions?

Get in touch with us to learn more about the subject and related solutions

Explore related posts