• Home
  • About
  • Sample Apps
  • Videos
  • J1 Session Blog: Extreme GUI makeover: Hybrid Swing and JavaFX

    June 4th, 2009

    In the past years the Extreme GUI Makeover sessions proved extremely informative, entertaining and popular. Every year I was curious to see whether they were able to keep up to the level of the previous year or even top it. Last year the session showed first signs of wearing out. This year a completely new team (Amy Fowler, Jasper Potts etc) took over from Romain Guy and Chet Haase. With JavaFX being a big topic at this years JavaOne it was quite obvious to use this for the makeover.

    And they did a pretty good job by taking the Swing-based mail application of the 2006 session and employed JavaFX to pimp it up even more. It is obviously not too hard to integrate Swing components into a JavaFX user interface (the other way round is not really feasible). JavaFX is simply the stage and Swing components can be included as a node (after wrapping them into some kind of JavaFX component). However, hooking up the event handlers is fairly cumbersome and does not really scale for complex applications with lots of event handlers.

    One highlight of the session was the address book of the mail application. They used JavaFX and Java2D to give a 3D impression of turning the pages with the mouse. Visually stunning although the user interface is totally impractical for everyday usage.

    The culmination of the session was certainly their idea of junk mail removal. They were using an animation which launched a rocket and on impact the spam mail exploded and disappeared accordingly. Being both funny and pointless this also perfectly illustrated how easy it is to add animation to a Java application and how difficult it will be to enhance productivity of business applications by means of JavaFX.

    Interview with Canoo Fellow Dierk König

    June 4th, 2009

     

    Scott Davis interviewed Dierk König, Canoo Fellow and Grails/Groovy-Evangelist for Thirsty Head at blip.tv. In the interview, Dierk gives an inside-view about new Grails improvements, about his JavaOne talk, JavaFX and the impact of Canoo Webtest. Enjoy this interesting chat about “beauty and code”!

     

     


    J1 Session-Blog: Return of the Puzzlers (Schlock and Awe)

    June 3rd, 2009

     

    Dressed in boiler suites, Joshua Bloch (Google Inc.) and Neal Gafter (Microsoft) put on quite a show in which they present a series of traps to be avoided in the Java language…

     

    Joshua Bloch (Google Inc.) and Neal Gafter (Microsoft)

     

    •    First problem: What does Boolean (Strings) do? Answer: Depends on the value of a particular system property – which is obviously completely horrible.
    •    Second problem: Overriding addAll/add of a HashSet is dangerous. Something we should all know because (for example) addAll may be implemented in terms of add. Answer is to create a so-called forwarding set, in which the inhertance characteristics of the implementation are defined by us. A class whose self-use patterns are not explicitly defined and documented should not be inherited from. Google collections provides a suite of forwarding classes.
    •    Third problem: Unpredictable behaviour caused by invoking a public (overridable) method in a constructor. Apparently Brian Goetz has made this mistake.
    •    Fourth problem: Searching which depends on a comparator is broken. In the example the comparator is broken because autoboxed integers cannot be tested for equality with. In addition, Comparator must implement total ordering, which in this example is broken because of the auto-boxing.
    •    Fifth problem: Initialization error caused by invoking enum constructor when a static variable has not been initialized.
    •    Sixth problem: Memory leak caused by assigning a large number of values to non-static thread locals. Thread local contains a weak hashmap.  This is a complicated one to follow. One obvious moral: Don’t use non-static inner classes.
    •    Seventh problem: Problem caused when two versions of a class contain different constant definitions. Contants are inlined in Java. However, null is not considered a constant in this sense.

    Overall: As we’d expect, nasty little problems which are likely to occur at some point in the developer’s life. Bloch suggests using “FindBugs”, which will apparently detect all of the above problems.


    J1 Session-Blog: Ajax vs. JavaFX Technology

    June 3rd, 2009

    First note that the speakers Ben Galbraith and Don Almaer are co-founders of ajaxian.com, which is clearly an AJAX-shop. They claim that Web technologies and Java went stagnent in the UI space. Ajax and JavaFX have the characteristics of a renaissance. They structure the talk in the form of a “discussion” or a series of arguments, where one supposedly pits the advantages of said technology against the other.

     

    •    Argument #1: Java performs way faster than JavaScript; on the other hand JavaScript is getting faster all the time (V8 team at Google); plus apps like Google wave demonstrate that performance is good enough.
    •    Argument #2: Responsiveness improved by worker-threads in a Java GUI. Yet using “web workers” we can overcome the limitation of JavaScript to a single thread. Demo of Pictastic proves the point. Having said that, web workers are still 10 times slower than Java; plus the API is extremely limited. In “web worker”, worker threads don’t share state, which is way safer than the totally flexible Java approach.
    •    Argument #3: GC way more advanced in Java. On the other hand, incremental GC in Mozilla is improving all the time. A lousy fact of the JVN is having to determine how much memory the app requires (or how much is available) wherever the app is deployed.
    •    Argument #4: Graphical capabilities of Java surpass what web apps can do. But performance of Bubblemark benchmark app shows that Google chrome achieves 100 frames per second. By comparison JavaFX achieves 24 FPS. With vector graphics Chrome is back down to 30 FPS. What the speakers don’t consider is that JavaFX is a very new and to-date under-optimised technology.
    •    Argument #5: An Ajax 3D demo “metatunnel” is pretty impressive. Most browsers, apparently, are offering 3D extensions. It’s still at the experimental stage, however. JavaFX, on the other hand, has nothing to show in 3D.
    •    Argument #6: Java is weak on fonts. The speakers claim that can’t use native fonts in Java (is this true? I seem to remember supplying Java with some additional fonts some years back.) Control over fonts in the Ajax world is even more limited, however.
    •    Argument #7: JavaFX provides “amazing” video support. Counter argument: Flash plugin us ubiquitous and surpasses JavaFX in terms of maturity. Open Web Video offers sophisticated video functions.
    •    Argument #8: Binding in JavaFX is compact and elegant. Web toolkits are very clumsy by comparison. The speakers quickly mention Mixins, Animation and Effects. All of this is way easier in JavaFX…
    •    Argument #9: Legitimate critisisms are raised about JavaFX syntax. Speakers suggest that JavaScript is actually easier and closer to Java than JavaFX Script. And, of course, JavaFX totally lacks widgets like table/tree. Web toolkits even provide some very cool layout management and tools for constructing GUIs.
    •    Argument #10: Tooling superior in the Java world.
    •    Argument #11: Deployment. Web wins here, obviously, except for significant browser incompatibilities. Applets, Mac etc. are lousy too, however.

     

    Conclusion: A pretty damning result for JavaFX, which is for the most part justified (at least today.) What the speakers fail to do, however, is talk more fairly about the significant problems faced by AJAX developers on a daily basis.


    J1 Session-Blog: Bill Venners on Scala

    June 3rd, 2009

     

    I met Bill several years ago in Basel whilst he was touring Europe… and what a nice chap he was (and presumably still is!). The guy who painstakingly revealed the inner workings of the JVN to us in one of the first readable books on the subject is today presenting Scala…

           

     

     

     

     

    Title of Bill’s talk: The feel of Scala

    Bill lists a whole bunch of personal reasons for adopting Scala. After considering JRuby, Ruby, Groovy (amongst others) he chose Scala. He claims Scala gives advantages of bother static and dynamic typing.

    The Scala language (with which I have no real experience) looks like an interesting mix of scripting, functional, OO concepts. It certainly has IDE backing as BV shows Eclipse, NetBeans and Intellij.

    Bill is the principal developer of the Scala unit-testing framework. He cleverly uses the framework to demonstrate some of Scala’s language features. Finally, he plugs his book, which he co-authored with Scala’s originator Martin Odersky.

    In conclusion: Scala looks like it offers a lot of power along with concise syntax. It’s not possible to judge, of course, whether it is “superior” to Groovy. Like any tool, it will have situations for which it is more suited and some for which it is less so.


    J1 2009: Java FX 1.2, Java Store, Java Warehouse

    June 2nd, 2009

     

    Yesterday night’s so-called “Partner VIP event” gave us a preview as to what Sun will be emphasising at JavaOne this year. Receiving as much fanfare as ever before: JavaFX, version 1.2 of which is being officially released today (June 2nd) – for Desktop as well as for mobile. 

    Secondly, the Java Store and Java Warehouse story was briefly revealed, with more details expected at tomorrow’s opening Keynote. Sun is not proposing to host an app store itself, but to provide the infrastructure to whoever wants to. The Java Warehouse is supposed to act as a central repository for apps, which Java Store hosters can tap into, whilst retaining their own front-end and billing schemes. 

    Almost as noticeable as the above was the lack of any mentioning what-so-ever of technologies such as Android, Groovy/Grails. Is it forbidden for Sun employees present anything on these (for many) tactically highly important technologies?

    Finally, Canoo’s fame really does appear to be growing. Not only we we appear in the official presentations (see pic) but it’s really impressive how many folks are coming up to us and saying how they’ve heard about this Swiss company.

     

     


    J1 2009: Kicking off CommunityOne

    June 2nd, 2009

     

    David Douglas, Senior VIP Cloud Computing and Developer platforms, kicked off CommunityOne with healthy enthusiasm this morning. The central message is that communities are absolutely necessary for future development – and not just software but humanity as a whole. Very profound!

    Lew Tucker then joined Douglas on the stage to talk about Cloud Computing. Pay as you go is the idea… and presumably how Sun hopes to turn its financial fortunes around. He notes that cloud computing is more likely to succeed when budgets for proprietary data centres are being slashed.

     

          

     

    Douglas (left) and Tucker (right) then talked about Sun’s Open Cloud Platform. Early access for this platform is expected in Summer 09. The goal: Make it possible for any developer to have his or her own virtual data centre in the cloud. Data centre of course provides complete monitoring and control. Sun Cloud also provides load testing, as well a choice of app servers e.g. Tomcat, Glassfish. More info at www.sun.com/cloud and at the “cloud zone” at Java One.


    New ULC 08 Milestone and Screencast Tutorial

    May 2nd, 2008

    We’re preparing to travel to San Francisco to attend this year’s JavaOne.
    At our company booth (at number 429) we will be showing the brand new milestone 2 for the upcoming release of UltraLightClient.

    Download and try it out!

    Screencast tutorial: “Enterprise Web Applications in 5 Minutes”
    Daniel Grob and I recorded a screencast to show what’s new in the upcoming release:
    http://www.canoo.com/ulc/external/video.html

    The screencast highlights a number of features that Daniel presented and discussed in this blog.

    The video is a little over 7 mins but we believe you’ll be able to build a ULC app in 5 mins…
    :-)