• Home
  • About
  • JavaOne 2010 Day Four

    September 24th, 2010

    It’s already Thursday and JavaOne 2010 starts it’s last day. By tradition, the last day of the conference starts with a keynote mostly dedicated to cool Java technology demos and Oracle continued with this tradition. The keynote intro was presented by Ray Kurzweil, who is an author, inventor and futurist. Among others, he made major contributions in OCR and text-to-speech synthesis. His talk focused on exponential growth in information technology, which he illustrated with numerous examples. He claimed that everytime exponential growth reaches its limits a paradigm shift will open the ground for new exponential growth. For example, in the early days of computing vacuum tubes were shrunk exponentially. When this was not possible anymore the shift to the transistor opened the opportunity for exponential growth for quite many years.

    From the demos only one was really remarkable and worth mentioning: Livescribe, a Java-powered pen which records what you are writing and saying. I saw the first demo of Livescribe two years ago at JavaOne and still it impressed me again. Imagine that the pen application tells you how to draw the “user interface” on paper which then allows you to use the application.

    Nevertheless, I missed the enthusiasm of the previous Java technology demo keynotes (not to mention the T-Shirt hurling contest). And I have never seen such a small keynote audience at a JavaOne.

    “The Merging Point of Android and Swing” was my first technical session. It was given by the David Qiao, lead developer of JIDE, a company well known for its Java and Swing components. He had a look at what Android provides for user interface construction and how some of these ideas can be applied to Swing. The talk focused on the areas of resources and themeing. In both cases he demonstrated libraries he has been developing to make life easier for Swing developers. For resources the Android approach cannot really be ported to Swing without changing the API and his solution therefore looked a bit awkward. On the other hand, he showed a nice solution how a theme can be declaratively adapted. Last but not least I learned that colors have to be localized as well, e.g. in Western cultures rising stock prices are emphasized in green, falling stock prices in red; in China it is the other way round!

    The “DSL vs. Library API Shootout” featured Rich Unger (the DSL guy) vs. Jaroslav Tulach (the library API guy). The result of the shootout which luckily both survived was: use an external DSL when your users are more domain experts and less Java developers, otherwise go for a library (or internal DSL) approach. Jaroslav also gave a nice demo how you can use the annotation processor together with IDE facilities to provide much nicer internal DSL support in Java. Both speakers also emphasized that evolution is challenging regardless whether for a DSL or an API.

    The topic of “What’s Happening with My Application?: Java Virtual Machine Monitoring Tool” was the project “Palantir”, a JVM monitoring tool being developed at Oracle. Very impressive stuff: it is based on DTrace which is a non-immersive technique for tracing on the kernel level. It is available on Solaris, Mac OS X and some Linux derivatives. Since Java 6 DTrace can also be used for the JVM. Palantir comprises a set of DTrace scripts tailored to the needs of investigating Java performance problems and a powerful tool for visualizing the trace log. The tracing is accurate since it is not sampling based as with typical profilers and not only shows JVM events but also events of the hosting operating system. They demonstrated a show case where Oracle had a massive performance problem which engineers had been trying to fix for quite some time. With Palantir the problem was identified in about 30 min without any access to the source code. The engineers guessed that it would have taken them at least another month to pinpoint the culprit.

    My last JavaOne session was “Developing Rich Modular Clients with Java, JavaFX, and OSGI Technology”. The speaker is working for Oracle where he and his team developed a bridge between JavaFX and OSGi to create modular JavaFX clients. They used Felix as the OSGi container, defined the OSGi service interface in Java and the service implementation is developed in JavaFX script. Nice but with JavaFX Script on the way out this is kind of pointless. The poor guy learned about JavaFX Script’s demise only on Monday when it was officially announced by Oracle.


    JavaOne 2010 Day Three

    September 23rd, 2010

    My third day of JavaOne 2010 started with “Using Context and Dependency Injection (CDI) in the Java EE 6 Ecosystem”. This excellent talk gave a superb overview of many aspects of CDI. CDI is the JSR-299 (formerly known as WebBeans) which substantially enhances JSR-330. JSR-330 can also be used on Java SE whereas JSR-299 is for Java EE only. Arun Gupta, who is an incredibly fast speaker, started with the basic guiding principles of CDI, such as type safe dependency injection or strong typing and loose coupling. He then covered all the different aspects of CDI, e.g. producer & disposer, interceptors, alternatives or stereotypes. Small code examples demonstrated the application of CDI in different scenarios for JSF, JPA and JAX-RS. He promised to publish the slides on this blog and its certainly worthwile to get them.

    Next up was Paul Marray with “Too Big to Fail: Top Tips for Massive, Mission-Critical Enterprise Applications”. The title was slightly misleading. I mostly expected tips on the architecture and design level but he focused on VM configurations, profiling and low-level coding. Nevertheless, a great talk and highly recommendable. Most tips were really simple but with more than great results, e.g. using compressed pointers on 64 bit VMs can get up to 30% improvement. Or, if you need to cache lots of read-only data and share them among several VMs on the same machine have a look at the DirectMappedByteBuffer class. For me the most surprising tip was how the identity hashcode can really deteriorate your garbage collection both in terms of memory size and execution time. The identity hashcode is for example created when you are serializing objects. Once created you cannot get rid of it anymore, it becomes part of the object as long as it lives and as a consequence the garbage collector needs more space and time to execute. BTW, many years ago Paul Murray used to work on a product called SoftPC, the first Mac VM for running Windows on a PowerPC. No wonder he is a low-level guy.

    The talk “Creating Great-Looking Java Apps for Mac OS X Without Learning Objective-C” was slightly disappointing. The speaker introduced the Xito Dazzle library which provides typical Mac UI components such as source list or sheet dialogs. To me, this library looked inferior to MacWidgets and beyond that I didn’t learn anything new about platform-specific Java UI development. I liked one quote, though. When talking about user interface design being a craft not appreciated by managers he said “Managers who call me a resource don’t consider my work as a craft”.

    Another talk by SpringSource was next: “Standard DI with @Inject and JSR-330″. JSR-330 was one of the fastest JSRs ever. No wonder, since it is very small. The JAR-file is only about 2.5 kB and contains a mere 5 annotations (Inject, Named, Qualifier, Scope and Singleton) and one interface (Provider). The speaker went through each of the annotations and demonstrated how the JSR-330 can be used with Google Guice (which is the reference implementation) and Spring 3.0. Apart from common applications he also discussed corner cases and there was a lively discussion after the talk as well. Bottom line: excellent talk given by a savvy speaker.

    My last session was “Developing Beyond the Component Libraries”, which was about how to customize Swing components, develop Swing components from scratch or customizing a Swing L&F. Each of these topics would have deserved a session of their own and therefore the speaker really had to rush through his many slides. The basic concepts of how the Swing component library separates the functionality of a component from its appearance were conveyed pretty well. The demos, however, were not that convincing. Maybe I am spoiled by the famous Filthy Rich Client sessions of previous JavaOnes.


    JavaOne 2010 Day Two (Part 2)

    September 22nd, 2010
    Spring seems to be a little less prominent this year than in previous years (that’s at least my gut feeling). Nevertheless, the Spring sessions are interesting and well attended. My Spring session today was “A Lean, RESTful Java Architecture for Building Rich HTML5 Web Applications”. It conveyed lots of information about HTML5, but little about RESTful-ness. They might have needed the keyword “REST” in the session title to get past the review process. The session with an overview over HTML5, which took quite long since the feature list of HTML5 is pretty daunting. If you would like to get an impression about HTML5 I can recommend the website HTML5 Rocks (http://www.html5rocks.com/). Then they explained how to use the Spring programming model, esp. the request handling, in this new context. On the one hand it was impressive to see how flexible the programming model is. The combination of convention and configuration (mostly by annotations) leads to considerably less and better readable code. On the other hand, coming from a “traditional” toolkit such as Swing or ULC it is still amazing how many hoops they make a developer to jump through. At the end of the session they gave a demo which used WebSockets. This allows bi-directional communication over a single TCP/IP socket and therefore enables server push. If this becomes available across common browsers this could pave the way for a new type of desktop-like Web applications.
    The “JavaOne General Technical Session” gave an overview on the roadmaps of Java SE, EE and Mobile/Embedded. The Java SE part was a rerun of the Monday session “Java 7: The Road Ahead”. What I didn’t mention in my blog was that Oracle will merge the Hotspot and JRocket VMs. The new VM will mainly be based on the Hotspot VM (the reason being they simply have more knowledgable Hotspot than JRocket engineers). Hotspot will be expanded with performance and monitoring features from the JRocket VM. The Java EE part more or less explained what’s up with Java EE 6. According to the speaker Java EE 6 has seen the fastest adoption of all Java EE releases. The next generation of Java EE will have to deal with cloud challenges, such as alternative persistence or security models. Last was Greg Bollella with an update on Java ME/Embedded. Frankly spoken, Oracle has work extremely hard to regain credibility in this domain. The current story is pretty thin and it is simply not sufficient to point out that more phones are shipped with Java ME than what Google/Apple ship. The action (and the money) is with smartphones and Oracle has nothing to offer there. And the part about embedded Java was even more sobering. Attendants voted on this topic by leaving in droves.
    My last session was a BOF about “Patterns for Modularity”. The pattern part of this talk was less interesting since they had nothing to offer which went beyond the well know patterns Adapter, Mediator, and Facade. However, they gave good comparison of service infrastructure solutions, such as OSGi, lookups from NetBeans, Dependency Injection, and JDK ServiceLoader.

    Spring seems to be a little less prominent this year than in previous years (that’s at least my gut feeling). Nevertheless, the Spring sessions are still interesting and well attended. My Spring session today was “A Lean, RESTful Java Architecture for Building Rich HTML5 Web Applications”. It conveyed lots of information about HTML5, but little about RESTful-ness. They might have needed the keyword “REST” in the session title to get past the review process. The session started with an overview over HTML5, which took quite long since the feature list of HTML5 is pretty daunting. If you would like to get an impression about HTML5 I can recommend the website HTML5 Rocks. After that they explained how to use the Spring programming model, esp. the request handling, in this new context. On the one hand it was again impressive to see how flexible the Spring programming model is. The combination of convention and configuration (mostly by annotations) leads to considerably less and better readable code. On the other hand, coming from a “traditional” toolkit such as Swing or ULC it is still amazing how many hoops they make a developer to jump through for Desktop like applications. At the end of the session they gave a demo which used WebSockets. This allows bi-directional communication over a single TCP/IP socket and therefore enables server push. If WebSockets become available across common browsers this could pave the way for a new type of desktop-like Web applications.

    The “JavaOne General Technical Session” gave an overview on the roadmaps of Java SE, EE and Mobile/Embedded. The Java SE part was a rerun of the Monday session “Java 7: The Road Ahead”. What I didn’t mention in my blog was that Oracle will merge the Hotspot and JRocket VMs. The new VM will mainly be based on the Hotspot VM (the reason being they simply have more knowledgable Hotspot than JRocket engineers). Hotspot will be expanded with performance and monitoring features from the JRocket VM. The Java EE part more or less explained what’s up with Java EE 6. According to the speaker Java EE 6 has seen the fastest adoption of all Java EE releases. Beyond Java EE 6, the next EE generation will have to deal with cloud challenges, such as alternative persistence or security models. However, the roadmap is still fuzzy. The last speaker was Greg Bollella with an update on Java ME/Embedded. Frankly spoken, Oracle has to work extremely hard to regain credibility in this domain. The current story is pretty thin and it is simply not sufficient to point out that more phones are shipped with Java ME than what Google/Apple ship. The action (and the money) is with smartphones and Oracle has almost nothing to offer here. And the part about embedded Java was even more sobering. Attendants voted on this topic by leaving in droves.

    My last session was a BOF about “Patterns for Modularity”. The pattern part of this talk was less interesting since they had nothing to offer which went beyond the well know patterns Adapter, Mediator, and Facade. However, they gave a nice comparison of service infrastructure solutions, such as OSGi, lookups from NetBeans, Dependency Injection, and JDK ServiceLoader.


    JavaOne 2010 Day Two

    September 22nd, 2010

    I chose “What’s new in Enterprise Java Bean Technology” for my first session on Tuesday. The talk started 20 min late since the speakers had a flat tire on the 280. It’s always hardware problems which bugs software people… Due to the late start the speakers had really to rush through the slides. Nevertheless, the talk was quite informative. Some of the new features in EJB 3.1 worth mentioning are:
    Timers: any EJB method can be annotated with timer information. The syntax is quite comprehensive and still easy to grasp.
    Testing of EJBs: client code and EJBs can be run without a container in the same VM when using the limited profile for Web applications. This comes very handy for testing EJBs.
    Portable global JNDI names: the current JNDI specification leaves quite some room for interpretation which led to JNDI names which are non-portable across vendor implementations. With EJB 3.1 the JNDI naming conventions are strict and should therefore be portable among vendor implementations.
    Singletons: by annotation a session bean can be declared as singleton which by default is even thread-safe.
    The new features show that Java EE is still trying to catch up with Spring which continues to set the benchmark for simplified Java EE development by using conventions and a declarative apporach.
    My next session was about Swing and OSGi: “Swing OSGi Modular Desktop Application Framework”. Large application, regardless whether on the client or server tier, need some kind of component infrastructure. OSGi is the de-facto standard in the Java realm and used both on the client tier (e.g. in Eclipse) and on the server tier (e.g. SpringSource dm server). NetBeans uses a component infrastructure of their own. The talk demonstrated how NetBeans can use OSGi bundles and NetBeans plugins can be run within OSGi. To me it looked like NetBeans might eventually drop their module system and replace it by OSGi. This would allow headless Eclipse plugins to be used on the NetBeans platform as well. Eclipse plugins with a user interface, however, would be still excluded from NetBeans since mixing Swing and SWT is not a piece of cake and even not wanted by the NetBeans team.
    Modularization has been a hot topic on the Java platform for years. Project Jigsaw intends to solve this problem, but has been pushed back to Java 8 (end of 2012). The session “The Modular Java Platform and Project Jigsaw” presented all you need to know about Jigsaw. The modularization effort for Java has been going on for years and is desperately needed to address problems like JAR hell, classpath nightmares, download and startup-performance, and scaling Java down to small devices. The technicalities of modularization support in Java are pretty much solved. What remains is the gargantuan task of modularizing the JDK. The first draft had about 50 nodes and 170 edges. It is now down to 27 nodes and 95 edges and might become even more coarse granular. A coarse granular approach is more likely to get accepted by the community and has fewer compatibility issues.
    To be continued…

    I chose “What’s new in Enterprise Java Bean Technology” for my first session on Tuesday. The talk started 20 min late since the speakers had a flat tire on the 280. It’s always hardware problems which bugs software people… Due to the late start the speakers had really to rush through the slides. Nevertheless, the talk was quite informative. Some of the new features in EJB 3.1 worth mentioning are:

    • Timers: any EJB method can be annotated with timer information. The syntax is quite comprehensive and still easy to grasp.
    • Testing of EJBs: client code and EJBs can be run without a container in the same VM when using the limited profile for Web applications. This comes very handy for testing EJBs.
    • Portable global JNDI names: the current JNDI specification leaves quite some room for interpretation which led to JNDI names which are non-portable across vendor implementations. With EJB 3.1 the JNDI naming conventions are strict and should therefore be portable among vendor implementations.
    • Singletons: by annotation a session bean can be declared as singleton which by default is even thread-safe.

    The new features show that Java EE is still trying to catch up with Spring which continues to set the benchmark for simplified Java EE development by using conventions and a declarative apporach.

    My next session was about Swing and OSGi: “Swing OSGi Modular Desktop Application Framework”. Large application, regardless whether on the client or server tier, need some kind of component infrastructure. OSGi is the de-facto standard in the Java realm and used both on the client tier (e.g. in Eclipse) and on the server tier (e.g. SpringSource dm server). NetBeans uses a component infrastructure of their own. The talk demonstrated how NetBeans can use OSGi bundles and NetBeans plugins can be run within OSGi. To me it looked like NetBeans might eventually drop their module system and replace it by OSGi. This would allow headless Eclipse plugins to be used on the NetBeans platform as well. Eclipse plugins with a user interface, however, would be still excluded from NetBeans since mixing Swing and SWT is not a piece of cake and even not wanted by the NetBeans team.

    Modularization has been a hot topic on the Java platform for years. Project Jigsaw intends to solve this problem, but has been pushed back to Java 8 (end of 2012). The session “The Modular Java Platform and Project Jigsaw” presented all you need to know about Jigsaw. The modularization effort for Java has been going on for years and is desperately needed to address problems like JAR hell, classpath nightmares, download and startup-performance, and scaling Java down to small devices. The technicalities of modularization support in Java are pretty much solved. What remains is the gargantuan task of modularizing the JDK. The first draft had about 50 nodes and 170 edges. It is now down to 27 nodes and 95 edges and might become even more coarse granular. A coarse granular approach is more likely to get accepted by the community and has fewer compatibility issues.

    To be continued…


    JavaOne 2010 Day One

    September 21st, 2010

    Deep down in the Hilton dungeons JavaOne started its first day, albeit not with a keynote which was held in the late afternoon at the Moscone center.

    My first session was titled “Java 7 – The Road Ahead”. The last major Java update, i.e. version 6, was way back in 2006. The release date for Java 7 was rescheduled several times. In his talk Mark Reinhold who is the chief architect of the Java Platform Group at Oracle announced a new schedule for Java 7. There will be a Java 7 release around mid 2011. However, Jigsaw, Lambda and some parts of Coin have been pushed back to Java 8 which is planned for a late 2012 release. For a detailed feature list see: http://openjdk.java.net/projects/jdk7/features/

    The next session gave a good overview about the Java Persistence API version 2.0. There are some nice features included:

    • MetaModel API: Access to the OR-Mapping is provided at run-time. The metaclasses are generated by the annotation processor and form the basis for type-safe queries and path navigation
    • Criteria API: Type-safe queries can be built using a builder approach.
    • Collections of basic types: These collections were previously stored as blobs. Now they are mapped to queryable entities.

    What I don’t like so much is that JPA validation now builds on top of bean validation. I am no big fan of bean validation because in my opinion annotation based validation simply does not scale for more complex validation scenarios.

    Dirk Lemmermann was next with “Attractive and Portable Mac OS X Swing Clients for Java EE Applications”. He is known for FlexGantt, an impressive Gantt chart component based on Java and he is also a committer for the MacWidgets project. His talk was full of hints how to make Java applications so Mac-like that you can’t tell it’s not a native Mac application. Using a mixture of layout guidelines, client properties, Apple Java APIs and additional components from the MacWidgets project one can get very close to native apps. In addition, using the SeaGlass L&F this is even portable across Windows and Linux. He demoed the result by means of Collap, a collaboration based project planning tool he is developing. The application looked pretty attractive when run on Mac OS X and still quite nice on Windows 7. The “Java EE” in the session title was only mentioned on one slide and probably just needed to get past the JavaOne session proposal review.

    My next session was “Unit Testing That’s Not so Bad: Small Things That Make a Big Difference” and without doubt it was the highlight of the first day. The talk was full of excellent information about libraries and tools for making test driven development even more effective and fun. Want more information? Have a look at hamcrest, Infinitest, Jester, JTestR, RSpec, Cucumber, and SpecJour.

    The day ended with the JavaOne keynote. Mildly put, it was a mixed experience. The head of software development from Intel,

    Dough Fisher, started the keynote by telling what Intel is doing for software development. Apart from praising its new generation of CPUs he didn’t have much to tell. One topic was consumerization of enterprise IT and on the slide he showed an iPad and an iPhone, both of which are not powered by Intel chips. The keynote host was Thomas Kurian, head of Java product development at Oracle. His presentation was very low key compared to the hyped-up JavaOne keynotes of previous years. This is not a bad thing per se. Sun always tried to release something at JavaOne. Quite often, however, it was half baked and barely usable software which took years to live up the promises of the keynote and too often never took off. Oracle just showed roadmaps for the core pieces of the Java platform and it remains to be seen how they can deliver. Their vision for JavaFX was most interesting, though. JavaFX Script is now officially dead. The JavaFX API will be available for Java and other languages in the Java VM realm. At run-time, JavaFX can be run on top of the Java VM or HTML 5. This gives way to RIA applications which can run in or outside of the browser. JavaFX on mobile devices is on the back burner, though. I think there is no way Oracle can compete in the mobile arena – simply too little too late.

    And by the way, Larry Ellison didn’t make it to the keynote. This is not really an encouraging sign for the Java community.