JavaOne 2008: day 2 javacode 9085791

JavaOne 2008: day 2

The second day of JavaOne 2008 started with a key note by Oracle. After that I attended a presentation about the Swing Application Framework and WebBeans. Next I hung around at the Pavilion and then attended a presentation with THE BEST AND COOLEST demo I have ever seen. Curious? Read on.

 

Key note

So, Oracle kicked off day 2. In a presentation that lasted 45 minutes Thomas Kurian, Senior Vice President for Oracle Server Technologies Development, took us through a nice overview of the features of Oracle JDeveloper 11g. Preview 4 has just been released so it was time to show it to the audience. Using JDeveloper, Thomas and his people showed how to create and modify RIA web pages, orchestrate business processes, manage database schema’s and the like. Pretty impressive stuff, especially the fact that you only need one, yes ONE, IDE to do this!

 

JSR 296: the Swing Framework

Having programmed a Swing app or two, I usually try to attend at least one Swing related presentation when I attend a conference. Hans Muller and Thomas Pavek, both Sun Microsystems, guided us trough all the new and exciting features that Swing will bring us. The first thing is a new lifecycle for Swing apps. Swing apps now will go through six stages from startup to shutdown. Each stage by default does its thing necessary for the app. The startup stage needs to be set up by the developer to build and show the GUI.

Another pretty cool feature are the ResourceBundle extensions for Swing. Using ResourceMaps, developers can tweak many many settings in the Swing app, from prompts and labels to colors and fonts. The cool thing is that the ResourceMap will return Java Objects. If, for instance, you declare aColor to have the value #FF0000; then a Color class instance will be returned!

Next Actions have been wrapped in @Action annotations on class methods getting rid of a whole pile of plumbing code and problems with previous implementations. Defining an Action once this way allows for reuse by calling a getAction method with the name of the method. The actual retrieval of the action is done internally through Reflection.

In the area of multi-threading, the SwingWorker class has been warpped into an @Task annotation. Besides that, Tasks also are Futures from the concurrency framework. Combining Tasks and Actions now allows for asynchronous Actions in Swing. Before, this was quite hard to do and control.

Introduction to Web Beans

Gavin King, JBoss, guided us through an overview of Web Beans. The goal of Web Beans is to provide a unifying component model for Java EE. If you’re a Seam user you may recognise many of the features of Web Beans. No wonder Gavin was presenting. The main feature of Web Beans is to provide a framework that allows for loose coupling with string typing. Strong typing in the terms of EJBs that are and can be used anywhere, from the database tier to the web tier. Loose coupling is achieved by decoupling server and client tiers through “binding types” (more later), by decoupling the lifecycle of collaborating components (one can be in request scope while creating another component in session scope), by decoupling orthonogal concerns (e.g. model layer vs. transactions and security) and by decoupling message producers from consumers.

Binding types are annotations that specify which implementation to inject into other components. If, for instance, there is a Person and a Customer (which sub classes Person), then defining an @Person and an @Customer annotation allows to bind a Person injection to either a Person or a Customer by using the corresponding annotation at the injection point.

Deployment types are annotations that specify in which deployment environment a certain component can and should be used. In a test deploymnet certain components may be made available that are not needed or wanted in a production environment.

Like Seam, Web Beans defines different scopes in which components can be available, e.g. RequestScope, ConversationScope, SessionScope and ApplicationScope. ConversationScope is new and is longer lived than RequestScope and shorter lived than SessionScope.

Apart from all this, Web Beans specifies Producer methods (that control the production of components), interceptors (also available in JEE5 but redesigned), StereoTypes and Events.

THE BEST AND COOLEST demo I have ever seen

The biggest hobby in my life is astronomy. It has been for a long time and I even have a degree in it. Seeing that the science wasn’t as much fun as the hobby, I persued a carreer in ICT. My colleague Lucas told me there was going to be a presentation about porting a planetarium program called Stellarium from C++ to Java using Java OpenGL, or JOGL. Getting a real good overview of what problems you get when trying to port an application from C++ to Java, the demos simply kicked ass! If you have some time, check out Stellarium for Java. It runs fast and smoothly, at least on modern computers. At one point Jerome Beau and Frederic Simon showed a star map and then opened up the Location selector map. While having pressed down the left mouse button and dragging the mouse pointer all over the Earth, the star map in the background got redrawn almost instantaneously. Another pretty cool feature was the fading in and out of constellation lines, azimuth and equatorial grid, etc etc. These guys really have done a tremendously good job with this application. After the presentation I gave them my cards and asked them to contact me. They are in need of astronomers and/or Java coders so if you like, go and help them.

 

The Pavilion

I guess the biggest hit for me so far has been the Pavilion. Walking around the booths of Oracle and Sun has put me into contact with many interesting people. The most notable thing was that everyone is really happy to hear we actually use the products they create. If you value your frameworks, IDEs, application servers, database or any software you use, go out to the Pavilion next year and tell the people that create them. They really are appreciative of it and listen to any request or compliments you’ll have for them!

One Response

  1. Lucas Jellema May 9, 2008