• Home
  • About
  • Sample Apps
  • RIA talks at JAX India 07

    May 29th, 2007

    Canoo’s Janak Mulani is speaking on the following two Rich Internet Application topics at JAX India:

    Rich Internet Applications and AJAX - Selecting the Best Product
    Thursday, May 31 at 10:20 am

    Java Rich Internet Application (RIA) Patterns
    Thursday, May 31 at 1:30 pm

    JAX India speaker


    Smart technologies for web clients

    May 29th, 2007

    There was a presentation by Nikolaos Kaintantzis of Zühlke at SET 2007 in Zürich that discussed various web technologies for Rich Internet Application development.

    Canoo’s UltraLightClient was part of the technologies discussed.

    Here are the slides (in German):
    Smarte Technologien für Web-Clients – Orientierungshilfe im Java-Client-Dschungel.


    Orbit / iEX session on RIA and AJAX

    May 15th, 2007

    Orbit iEX

    Hans-Dirk Walter and Patrick Lisser will be presenting at this year’s Orbit / iEX 07 in Zürich:

    RIA und AJAX - Ein Wegweiser durch den Dschungel (in German)

    on Tuesday, May 22, at 15:30 at Messezentrum Zürich.

    This session is specially suited for IT managers and architects interested in using Rich Internet Application technologies.


    JavaOne 2007 – Day Four

    May 13th, 2007

    Now for the final stretch of this year’s JavaOne conference: the pavilion closed on Thursday and we dismantled the booth pretty quickly. After half an hour everything was packed and we took our equipment back to the hotel. Hence, today I could really enjoy the conference without any booth duties.

    Comparing the Developer Experience of Java EE 5.0, Ruby on Rails, and Grails” looked really promising to me. I know Java EE from real programming practice, Rails and Grails just from reading some articles. The speaker, Thomas Daily, had a funny Australian accent and made quite a good show. He demonstrated how easy it is to create a simple CRUD application with all three technologies. For Java EE he had to use heavy machinery (i.e. NetBeans), though. He then presented some performance benchmarks which claimed that Java EE scales way better. The runner-up was Grails, followed by Rails. Tom Daily was somewhat biased towards Java EE (he doesn’t work for Sun for no reason), although his final recommendation was to use the tool that best fits the application. What I missed in this talk was some statements about maintainability. I would have liked to see how each of these environments coped with new requirements.

    Hard core stuff was up next with “Cranking up Java Application Performance with DTrace“. DTrace allows to run instrumented code with zero impact on performance. At run time you can activate/deactivate probes in a live system. Right now, DTrace is only available on Solaris 10, but it will be available on at least one other operating system later this year. The Java VM is also instrumented, which allows to use DTrace at run-time for Java applications as well (Java 5 and newer). For Java 7 it is even planned to allow for statically adding probes to the application code. DTrace can produce a vast amount of tracing data in almost no time but the DTrace language helps to filter and aggregate this data. DTrace solves the developer’s dilemma: adding tracing statements is necessary for systemic analysis but even when switched off it usually has some impact on performance.

    Java Champion Adam Bien gave a talk on “Java 6 Platform, Java DB, Swing, JNLP, Java Persistence API: The New Operating for Rich Internet Applications“. He covered a lot of ground in one hour and proved to be one of the überarchitects. Adam Bien strongly recommended to use business objects (i.e. real objects with state and behaviour) rather than SOA with dumb objects such as DTOs. The Java 6 platform and JPA make it even possible to run these business objects either on the server-side in an EJB container or on the client side outside of a container. However, I missed two topics. First, he talked a lot about the thin client challenge by which he did not mean real thin clients (i.e. presentation logic is on the server-side) but “thin clients” with just the presentation logic running on the client side. Some of these challenges do not come up with server-side presentation logic. Secondly, he should have at least mentioned approaches how to synchronize client-side database changes back to the server. Nevertheless, get hold of the slides and dive into this wealth of information.

    I closed JavaOne 2007 with Neil Gafter’s “Closures for the Java Programming Language“. Neil Gafter is a brilliant speaker: perfect pace, well pronounced, deeply reflected - it’s just a pleasure to listen to him. He started with a number of cases where anonymous classes are not sufficient and argued how closures would help. Some of the code examples reminded me of my code and how I had to work around the limitations of anonymous classes. I used to develop in Smalltalk for quite some time and blocks are as natural as recursion (quoting Neil Gafter). He also argued how the Java API could be improved with closures. However, I am still undecided whether the Java language should be extended with closures. What once was a fairly small and clean language is gradually turning into a dreadnought. Java should have offered closures from the very beginning; adding it as an afterthought might have too much negative impact.


    JavaOne 2007 – Day Three

    May 13th, 2007

    I don’t get much sleep during JavaOne. Days are long even if you don’t attend any late night BOFs and the jetlag gets me out of bed pretty early. On the third day I start get feeling the lack of sleep and I am not too unhappy that JavaOne lasts only four days rather than five as in previous years.

    My first session in the morning was “Java Persistence API: Portability Do’s and Don’ts”. I have been using Solarmetric Kodo (now with BEA) for some years and although I am not using the latest version I am still quite pleased with the functionality. The latest version of Kodo also supports JPA and therefore I was curious how JPA can be used with portability in mind. Mike Keith explained how the JPA specification was specifically designed such that vendors could add specific functionality without interfering with other vendors. A developer can refer to vendor specifics both at the property and query level and it’s quite easy to support more than one vendor. It reminded me a lot of JDO which has similar capabilities. The only thing that’s missing is a portable approach for pessimistic locking.

    Designing Scalable High Performance Rich Clients: From the Trenches” was up next. Rob Ratcliffe took part in the development of a complex Swing-based application which monitors and controls a potentially large number of mobile sensors. The talk was less than convincing, his demo nice in the beginning but way too long so I left early. If somebody tries to teach to me the advantages and disadvantages of a singleton I am definitely in the wrong session.

    I was looking forward to Ben Galbraith’s talk about “Debugging Swing Apps” and I wasn’t disappointed. Ben is a brilliant presenter, although he speaks incredibly fast which might be a challenge to some people in the audience. I admired the two sign language interpreters who somehow managed to keep up with his speed (they had to take turns every ten minutes). Ben explained how to use weak references for easy fixing of memory leaks and how AOP can help to identify code that leads to sluggish user interfaces. At the end he demonstrated a tool he wrote to experiment with Java 2D, e.g. trying out Java 2D calls interactively to gauge the impact of options on different platforms. To summarize, the talk was both filled with lots of useful information and entertaining. I was quite amused when Ben tried to dodge the Apple NDA while explaining some garbage collection features on Mac OS X.

    The title of “Spaghetti Is Not Tasty: Architecting Full-Scale Swing Apps” was promising but did not meet my expectations. Rather than focusing on design problems of large Swing applications he spent too much time on OSGI which can solve some problems but not all of it. The only thing I took from this talk is that for large applications it is recommended to use a message bus to distribute events, which was also mentioned by Rob Ratcliffe in his talk. Wiring listeners to too many consumers does not scale and is hardly maintainable,

    My last session was about “Garbage-Collection Friendly Programming“. Three garbage-collecting engineers from Sun laid out all the do’s and don’ts in Java to effectively deal with garbage collection:

    • Don’t use object pools. Java’s memory management is usually way better than Java developers can implement object pools.
    • Don’t use System.gc(): The garbage collector knows better when to run, you don’t have to tell it.
    • Resizing arrays frequently can put more pressure on the garbage collector
    • Finalize always takes two garbage collection cycles and is therefore quite inefficient. For Java 6 the garbage collection team even convinced the AWT-team to remove all finalize methods from the AWT (and therefore Swing) components. If you need something like finalize you can either use a finally clause or weak references.
    • Don’t use soft references, because it is expensive for the garbage collector to reclaim objects referenced softly. Only use soft references for quick and small caches. This contradicts what Ben Galbraith said in his session when he recommended soft references for any kind of cache.

    If you have a chance to grab the slides, just do it. They contain numerous hints how to write clean and efficient code with respect to memory management.

    The third day was kind of a mixed experience. I learned most in the sessions about Swing Debugging and Garbage Collection. With the other two Swing sessions the JavaOne program committee made some questionable decisions.


    JavaOne 2007 – Day Two

    May 13th, 2007

    My second day at JavaOne started off with Joe Winchester, one of the most entertaining speakers at this conference. I still remember last year’s session: first, I helped to prepare one of the demos and all sorts of technical issues came up during this but eventually we managed to get it running; secondly, it was standing room only and Joe drew many laughs with his presentation. This year’s presentation was about “User Interfaces: The Good, the Bad and the Ugly“. Basically, it was along the same line as last year’s presentation. Joe is brilliant in finding all sorts of user interface screw-ups. After the session he told me that he is not actively looking for this but just stumbles over them while browsing. He started his talk with some remarks on the paper-based view of the world. WYSIWYG still dominates the design of most user interfaces but also limits their design. Jeff Raskin, the creator of the Macintosh, hated this view. He compared it to a Boeing 747 with its wings ripped off and used as a bus. Joe then made fun of desperate attempts of developers to cover up their mistakes, like using animation to distract the user from a slow and unusable user interface. He also demonstrated some progress bar examples which just kidded the user (without the developer’s intention). The culmination of his talk were two videos about the user interface of a scale in the fruit/vegetable department of a supermarket. The first video showed Joe trying to weigh some bananas and the scale keeps telling him that it can’t do it because it is out of stock which slightly contradicted the fact that Joe put real bananas on the scale. In the second video Joe tried to weigh some tomatoes on the same scale and the scale asked him what kind of tomatoes he has got and for each variance showed him exactly the same picture. At the end Joe called out at the Web developers to get serious after having more than enough fun. What I missed in his talk were solutions to the problems he showed. Joe told me afterwards that he still had one third of the slides left at the end, so maybe he could have talked about these solutions. Overall, the session was well above average, but I think it was not as good as last year’s session. It also drew less attendees than last year which is true for all the sequels I have seen so far.

    The next session titled “Filthy Rich Clients: Talk Dirty to Me” was held by Chet Haase and Romain Guy. They claimed that this is a presentation based on a book based on a presentation. Hence, rather than wait for their book “Filthy Rich Clients” one could get a good overview of their ideas about pimping up a Swing GUI. I first expected something like “Extreme GUI Makeover” but soon realized that this was just the low-level version of this session. They talked about different approaches in achieving better GUI performance. The timing framework developed by Chet Haase was another topic. Most time was spent on how to achieve coolness, like blur, drop shadows, spring, morphing etc. I didn’t mind the low-levelness of this talk but it was kind of boring. Romain tried to make some jokes which did not catch on but maybe it was still too early in the morning for him or the audience or both.

    Extreme GUI Makeover 2007” was the second sequel of the well-known user interface presentation by Romain Guy and his colleagues. As with most movies after too many sequels this show is getting a bit long in the tooth. This time they chose to enhance a “real” business application, in this case a real estate application. After some minor improvements to the application’s appearance such as changing the look and feel, adding customized components and a nice splash screen they showed off some impressive changes to a table. Their cell renderer was quite complex and included pictures, several lines of text and spanning. The coolest feature was their sorting animation which visualized how rows changed their position when being sorted. They also created an out-of-the-frame non-rectangular and transparent window which tracked the current selection in the table like a kind of tooltip. Finally, Romain demonstrated how to convey exceptions to a user in a funny way (how about developers covering up their mistakes). He created an animation which ripped off the surface of the window and showed the ugly internals of the application which had gone wrong. To summarize, I think they should not try to create another sequel next year but come up with something completely different.

    This day’s sessions were informative and sometimes entertaining. However, I was missing last years’ excitement. Maybe cool Java desktop applications are becoming just normal which is a good sign.


    JavaOne 2007 – Day One

    May 10th, 2007

    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/.


    JavaOne Keynote

    May 10th, 2007

    JavaOne traditionally opens with a keynote hosted by John Gage. In contrast to previous years, John Gage just gave the introduction and pretty soon handed over to Rich Green, the head of Sun’s software division. For a JavaOne newbie the keynote might be quite impressive, but as a 10th year alumni I am used to all the marketing glitz and it’s easier to focus on the real content. In addition, I have seen so many announcements at JavaOne which turned out irrelevant. Therefore, the announcements have to be taken with a grain of salt.

    Nevertheless, the keynote gives you a feeling about the general direction Java is taking. From my point of view, there were two remarkable announcements:

    • Sun is really serious about opensourcing Java. It’s a daunting task, though. They are still not able to completely put the JDK into the open, but most of it can now be downloaded from http://openjdk.java.net/. What’s even more important is the fact that the TCK (technology compatibility kit) will be available as well. Open source implementations are now able to check compatibility without throwing up quite some money.
    • Java on the desktop is a big topic again. Sun finally realized that being just on the backend is not good enough. They want to get Java into the hands of end users and consumers. Therefore, they really focus on the desktop and on mobile devices. The most important issue here is to make Java easily available, i.e. easy download, install, and start-up. I will write more about this in an upcoming blog entry. To complement this, it should be easier for developers to create Rich Internet Applications. Today, you can achieve almost everything using Java and Swing, but it just takes too long. JavaFX will fill in the gaps. It allows for creating content and user interfaces descriptively. Whether Sun can compete against Adobe’s Flash and Microsoft’s Silverlight remains to be seen, though. Consistent with Sun’s history there aren’t any tools available yet. They are promised for later this year. Hey guys, tools are as important as the technology. That’s why Microsoft is so successful with Joe developer - they get the tools early on. Sun also salvaged the intellectual property of SavaJe, which was prominently announced at last year’s keynote, and will release it as JavaFX Mobile. They promise to make this freely available to mobile devices manufacturers which again spells good news for RIAs, since this makes Swing a reality on mobile devices.

    Surprisingly, Java EE did not get mentioned at all. I think there are two reasons for this. First of all, Java is well entrenched in the enterprise backend, it’s the desktop where Sun has to catch up. And secondly, Sun does not have to announce anything in this area, the next version of Java EE is still quite far away.

    Last year Sun promised to make this year’s conference carbon neutral. Apparently, they heavily underestimated the effort to measure the impact of JavaOne on carbon dioxide emission. Now they are asking the attendants to come up with ideas how to measure that. At least Sun is thinking about these issues and keeps trying. Being a Mac guy, it was good to see that the only demo machines at the keynote were two Apple laptops, apart from the handheld devices. A few years ago Apple had to try hard to get some attention at JavaOne. Nowadays, you see lots of MacBooks and even Sun cares more about this platform. On a last note, Jonathan Schwartz, the CEO of Sun, should come to the conclusion whether he is a developer or an executive. From the waist down his Jeans speak “I am a developer like you guys”, but his formal jacket has written executive all over it. Why did he leave out the tie? At least, Rich Green did some kind of Steve Jobs impersonation with a black short-sleeve T-shirt and Jeans (yes, I know the real Steve Jobs always wears a black turtleneck).