JavaOne 2007 – Day One
The first session I attended was titled “Java Desktop“. It was good to hear about the progress Sun is making to provide Java on as many desktops as possible. The vast majority of Java VMs out there are now some version of Java SE rather than the outdated Microsoft VM and about 60% of the PCs are equipped with Java by default. If you have the impression that Java is mainly used on the back-end you have to think again. According to Sun, most Java development time is spent on Java desktop applications. This clearly underlines the importance of Java client development. Maybe it is also a sign that Java development for the desktop is still too hard and takes too much time.
In any case, they are working hard on several issues to lower the barrier for installation of the Java VM and the use of Java applications on the desktop:
- A coldstart of the Java VM, which now takes way too long (5-10 secs) will get a lot faster. Starting the Java VM puts a heavy load on file system access. Hence, they preload the necessary files in the Windows disk cache to bring down startup time.
- The JRE install will get much smaller, i.e. one has only to download a kernel of about 2MB rather the full 13MB. All the other components will get downloaded either lazily or on demand. Typical applications need only a fraction of the entire JRE, for example SwingSet requires about 3.5 MB, Limewire about 4MB.
- Another pain for developers is figuring out the JVM versions available on a desktop. Java Web Start already does a pretty good job, but for applets it’s a challenging task. Sun will provide a number of JavaScripts that help in figuring out JVM versions. An upcoming Java plugin (Windows only) will help even more.
All these extensions will be made available as part of an update for Java 6 for consumers in the first half of 2008. Sun’s goal is to make the Java SE platform the consumer web client of the future. This is really good news for technologies like UltraLightClient which try to leverage the power of Java, both on the server and the client side.
The next session was about the Swing Application Framework. Hans Muller, one of the leads, gave a brief introduction into this framework. The Swing Application Framework is targeted at small and medium sized Swing applications. One of the goals was to keep it so simple that you can cover the entire framework in an hour’s presentation, which Hans actually did. This is in contrast to most application frameworks which try to cover the entire application problem space and usually turn out as untameable monsters. The Swing Application Framework just handles the few issues which probably every Swing developers had to find some solution for. They are:
- Resources: easy resource conversion and even resource injection into properties by annotation.
- Actions: actions are defined by annotating methods, their state can be bound to a property, and the action attributes can be loaded from resources as well.
- Tasks: everything you need to run background tasks including notifying the user about the state of the background task.
- Storing session state: make your application’s state persistent and reload it when starting the application again.
If you are developing Swing-based application then have a look at this framework. It most likely will make your life easier. The framework is planned for inclusion in Java 7.
My third session was about “Easy deployment is finally here“. Basically, it was a more in-depth rerun of “Java Desktop”. The only addition was a demonstration of the new Java installer which is definitely more user friendly. Java updates will also become more lightweight and they will update in place rather than proliferating Java versions on your PC. One remark of Ethan Nicholas slightly amused me: he claimed that Mac users have to get a new version of the operating system in order to update their Java version which is simply not true.
The last session was “Swing in a Multithreaded World“. This was mostly about the SwingWorker class which is part of Java 6. It gave some valuable tips and tricks how to efficiently use the SwingWorker class and how to implement custom executors. The presenter was talking really fast, it felt like he tried to cover up for his Russian accent which made it hardly comprehensible. As a result, the one hour session was over after 30 minutes. If you are using an earlier version of Java: there is a backport of the SwingWorker implementation available at https://swingworker.dev.java.net/.
