• Home
  • About
  • Sample Apps
  • Our “RIA Design Patterns” Talk at JAX 07

    April 30th, 2007

    JAX 2007 was my first Java conference ever. The event was a great delight:

    • It was incredibly well organized with tons of interesting news and insights regarding Java & companions.
    • You could see and get in touch with most famous people from the Java and OO community (including Erich Gamma) …
    • Being (or becoming a speaker) is a great plus: I enjoyed the fun of giving a talk and discussing with other developers.

    My colleague Bruno Schäffer and I presented our latest insights on design challenges when building RIA applications end to end. We believe that building a RIA applications imposes new problems on developers when compared to traditional Web apps.

    E.g. to deal with the complexity of your GUI code, you should best apply the presentation model pattern. If you do that for all GUI elements you end up with a separate software layer shielding your business layer from the actual code that uses a GUI API (such as Swing). Another thing to think of is the number and the granularity of services that you need. For a RIA app, you typically need a larger number of rather specialized services than for a traditional Web application. E.g. think of a “search-as-you-type” feature: To realize it, you need a service returning the first n DB entries matching your current input text. So RIA is not only about the front end - it may well require a (re)design of deeper system layers including the database.

    Please find the set of slides of our talk in the PDF file here:
    RIA Design Patterns Talk at JAX 07
    Or view it online at SlideShare:


    Getting Rich with Groovy

    April 30th, 2007

    World leading software companies are betting on the combination of Rich Internet Applications (RIA) for enhanced user interface capabilities and new dynamic languages that keep their products flexible and adaptable.

    Navis LLC delivers mission-critical supply chain execution solutions ranging from marine terminal control software to in-yard management. Navis has based its new SPARCS N4 product line on Canoo’s UltraLightClient (ULC), a 100% pure Java solution for Rich Internet Applications. With this pure Java technology in place, Navis can leverage the power of the Java platform while using Groovy, the new dynamic language for Java, where additional flexibility is needed.

    When creating multi-client container terminal software you not only have to care for rock-solid solutions in Java but you better also prepare for the numerous requirements that differ from client to client. One solution would be to maintain slightly different versions of your product for each client but this quickly leads to a maintenance nightmare. Instead, you include scripting capabilities into your product such that the client himself or the technical on-site consultant can apply the required adaption. Since any adaption has to express logic like special routing rules for containers, a simple configuration file is not enough. You need a smart configuration, which is a typical usage pattern for Groovy.

    Groovy makes an ideal companion to all Java-based RIA solutions as it integrates seamlessly with Java while providing higher flexibility and expressiveness where needed.

    Take for example the Grails project, which uses Groovy to achieve a developer experience comparable to the Ruby on Rails approach but runs as a 100% standard Java Enterprise application building on Spring, Hibernate, SiteMesh, and Quartz. Grails developers use Groovy code to include AJAX frameworks like Prototype or Dojo for user interface enrichment.

    Not only is that Groovy code concise and expressive, it also hides the implementation details of the AJAX framework in use. Even if you change the AJAX framework in the middle of your project, your Groovy application code stays the same!

    RIA and Groovy are both likely to be found in technology-leading, demanding, agile contexts where highest requirements for user interaction design have to be met. Where developers have to respond quickly to early user feedback the need elaborate means to enhance not only information presentation but also workflow and data selection. While the RIA technology helps with presentation enhancement, Groovy can keep workflows, business rules, and domain models easy to modify on the fly. This is where Groovy shines with supporting domain specific languages (DSLs), libraries like GroovyRules (JSR-94 compliant rule engine), and integration via reloadable Spring beans.

    The RIA and Groovy couple is already there and humming. However, much more is to be expected for the future. Pure Java RIA solutions like Canoo’s UltraLightClient make perfect candidates for even closer integration. First prototypes show very promising results when integrating ULC in Grails or using Groovy’s builder support to specify ULC interfaces.

    Combining RIA with Groovy makes perfect sense and the ULC and Groovy pair is the one-two punch for web development.

    keep groovin’
    Dierk König


    Review of JAX 07

    April 27th, 2007

    We’re back from JAX 07. I’d like to share some excerpts of Dierk Koenig’s report, who received the JAX Innovation Award on behalf of the Groovy team, with you. Here’s what he had to say:

    JAX has grown again and with 1′900 attendees it is certainly one of the biggest Java events in the German-speaking region. The general organization is above average with some room for improvement when it comes to accommodation and lodging. Attendees are very interested, knowledgeable, and open for discussion. The session topics are a bit high-level rather than down to the technical details. Talks like “Mixing Ajax, Swing, and Flash” by Sibylle Peter and Matthias Huber were a refreshing exception.

    I arrived Monday afternoon and after a joint effort to prepare the Canoo booth and checking in at the hotel, the speaker & VIP reception was held at the Kurhaus in Wiesbaden, right below the Casino. This was an interesting mixture of overdressed Casino guests and casual programming geeks in the lobby!

    I learned that Tammo Freese and Johannes Link used Groovy in the testing workshop that day. Both suggested to run a joint full-day Groovy workshop at the W-JAX this year.

    I also talked to Emmanuel Bernard (RedHat) who currently works on Groovy support for Seam that he is going to release soon.

    On Tuesday, Daniel Pfeifer and Bruno Schaeffer delivered their talk on RIA Patterns and Sibylle and Matthias talked on mixing Ajax, Swing, & Flash. Both talks were very well received. Well done, everybody!

    At the evening ballroom session, I hosted the Groovy/Grails table with too many beers and more loud talking than was good for my voice. On Wednesday morning, I noticed that Gina was already sold out at the Addison-Wesley booth after only one day of expo. :-)

    I started with my general Groovy talk in a room with about 120 seats when it became so overcrowded that the session was moved over to the big plenum stage. It must have been 250 people or so. A fun experience. Later I connected with Sven Haiges and we recorded another three editions of the Groovy tutorial series for his podcast. My voice almost broke while recording.

    Before the evening keynote, the JAX innovation award ceremony took place where I had the honor to receive the first prize on behalf of the Groovy team. Note that this prize not only awards EUR 10′000 to the winner but also strives to select the most innovative, creative, and influential European project or product of the last year.

    In the late evening BoF sessions, Daniel joined Sven and Peter Rossbach to discuss the state of AJAX, while I was concerned with the future of programming languages. I was very surprised to see about 100 attendees at that BoF when the warm evening was actually calling for a beer garden.

    Thursday started with checking out from the hotel and a much too short breakfast. I headed for the WebTest talk with Marc Guillemot. We held it in the 300 seats room, which was pretty much filled. It was much fun talking about our day-to-day occupation. The audience was very responsive and had good questions in the Q&A part and personal ones after the talk.

    I attended the Grails talk by Sven Haiges, which was great as always. As the first session of the afternoon, I talked about “Usage Patterns for Scripting Languages on the JVM” in the 200 seats room, which was stuffed to capacity. It was fun recognizing the faces that seem to show up in all of my talks. I also managed to add a couple of cross-references to ULC. Lots of people approached me after the presentation. Sebastian Meyen invited my to the JAX-TV where we ran a 20-minute interview on various topics around Groovy. Of course, I wore my Canoo polo shirt.

    We’re back on the road next Saturday to go to San Francisco. Come and see us at JavaOne from May 8 to May 11. We’re at booth #715.


    Mixing Ajax Swing and Flash - Slides and Demos available

    April 25th, 2007

    Here the demo applications we mentioned during our talk at JAX07. Currently it only only works on Windows and needs at least Java 5:

    The slides (in German):

    The source code will follow soon.


    JAX 07 talk on Mixing RIA Technologies

    April 18th, 2007

    While developing rich internet applications most people restrict themselves to one technology based on their needs or skills. But what if your Swing application would need a bit of Flash (e.g. for video streaming) but you don’t want to develop your whole app in Flex? For whatever reasons. I.e. what you really want is a best-of-breed solution.

    In Mixing Ajax, Swing and Flash, Matthias Huber and I will talk about combining RIA technologies on the client side. We will show, that with some reasonable effort it is possible to use more than one technology. Using demo applications and example code, we focus on the technical aspect of integration. We hope that this presentation will give you an insight on the the various possibilities. And whether the gains on the user interface are worth the effort of using multiple technologies.

    After the talk we will publish some demo applications on this blog (in case you missed the talk).


    Building a Regular Website with the Google Web Toolkit - Part II

    April 18th, 2007

    Introduction

    About a month ago I wrote about my experience when building a simple but configurable web site with help of the Google Web Toolkit (see Part I). I mentioned the hurdles that I encountered but also some motivating aspects when working with GWT.

    An issue I haven’t reported on yet was my attempt to internationalize my GWT application. You might be surprised why this is even worth mentioning, since GWT includes I18N support. Well, let’s say it includes some I18N support - but it was not what I needed.

    Giving GWT’s I18N a Try

    The GWT developer guide explains the various I18N options of GWT (see GWT I18N) but all of them have one thing in common: The locale cannot be changed dynamically at runtime after a GWT application has been started. However, it is a common use case that you want to change an application’s locale at that point of time.

    Providing Truly Dynamic I18N

    Truly dynamic I18N means that use change the locale in the GUI at runtime. E.g., if the user changes a combo box entry, then all GUI labels magically obtain the newly localized values. To see what I mean, you may want to check out the result of my attempts.

    The way to solve this was to write my own (but simple) resource bundle API, which is similar
    to the one provided by the Java class java.util.ResourceBundle. Unfortunately, this requires quite some code including:

    • a properties file reader,
    • a locale class,
    • a resource bundle loader.

    The Resource Bundle Loader

    As it turned out, implementing the resource bundle loader was far from trivial. One of the resource bundle loader’s tasks is to load and cache a properties file from the server on the basis of a given locale. You can access a bundle entry with a key string in order to obtain the best possible localized result value. The means that the loader might have to access a chain of properties files according the chain of locales (from the most specific current locale to the default locale).

    To implement the loading of properties files with GWT, one must use the class HTTPRequest, which offers an asynchronous request API for loading files from the server. Unfortunately, coordinating the chained download of properties files such as described above is rather difficult to implement with an asynchronous API. (See my last blog about infectious asynchronous APIs.)

    Summary

    In the following I would like to give brief summary of my experiences with GWT:

    Upsides:

    • I liked the general concept behind GWT and I think it is the (or “a”) way to go for proper software engineering in the AJAX space.
    • Getting in touch and getting familiar with GWT was easy enough and was great fun.
    • The compiler and the debugger seemed stable, work well and the compiler generates efficient code.

    Downsides:

    • The widget library is far from complete and not engineered for extensions and reuse.
    • The asynchronous GWT APIs are often inconvenient - Google should ofter synchronous variants wherever possible.
    • Google’s I18N solution does not offer true dynamic locale changes. This is a serious drawback for many rich client applications.

    JAX 07 talk on Java RIA patterns

    April 17th, 2007

    Daniel Pfeifer and Bruno Schäffer will be presenting a talk on Java RIA patterns at the upcoming JAX in Wiesbaden/Germany.

    I talked to Daniel and he said that one of the main aspects that they will talk about is the impact of rich user interaction features on the structure of a related information system. Surprisingly, rich user interaction features have a strong impact on the service layer of an information system. For example, dynamic input validation typically requires a service that compares potentially incomplete input data against existing data in a persistent storage.

    The presenters believe that the so-called presentation model pattern is a crucial element to tackle the complexity of a rich internet application with potentially hundreds of interdependent views and screens. In this context Daniel will introduce a comprehensive approach on applying presentation models in order to improve development efficiency and system testability.

    To complete the picture, Bruno will discuss alternatives for a resulting system architecture including the decision on how and where to make a client-server-split in a related system. In addition, Bruno will uncover many challenges and solutions when linking presentation model code and GUI code with business service layers, such as semantic and syntactic validation, business object handling and cross-layer data caching.

    Mark this date in your calendar:

    • JAX 07 session on “Java RIA patterns“, Tuesday 24th April 2007 at 11:45, Room 6a.

    The talk will be held in German.


    Better term than “Rich Internet Application”?

    April 12th, 2007

    In my daily read, I noticed that Ryan Stewart is discussing naming alternatives in his post “Is Rich Internet Application a bad term?”

    In my humble opinion, I believe the current expression “Rich Internet Applications” has helped to clarify what the current web interface technologies are all about. At Canoo, we’re using the term generically to describe web applications that offer a richer, responsive user interface. Typical RIA technologies are AJAX, Adobe Flex, or Canoo’s Java library, UltraLightClient.

    Before the terms AJAX and RIA emerged, it was always difficult to find a common understanding, and we tried out various different expressions. One of them even made it to the title page of the German developer magazine, JavaMagazin:

    Rich Thin Clients

    Other Canoo News:
    The JGoodies Animation Extension and ULC Subset Chooser have been migrated to UltraLightClient 6.1. See the News section of the UltraLightClient Code Community.

    JAX 07

    Canoo is presenting two RIA talks at JAX 07 in Wiesbaden/Germany:


    RIA for Swiss Media Research

    April 3rd, 2007

    We’ve added a case study describing a Rich Internet Application that Canoo developed for a Swiss media research organization. The online tool is used by media planners to calculate the performance of billboard advertising campaigns for a defined target group in a specific geographic region, and compare quotes for billboard advertising campaigns.

    It offers a rich, responsive interface for expert users with diagrams, maps, and sortable tables, as well as easy access from any platform via the Web.

    Screenshot of SPR+ web application

    This media planning tool is entirely web-based and does not require a client-side install of the (huge) billboard performance database or the sophisticated statistical algorithms used for the tool’s performance calculations. The rather frequent updates to the billboard database are easily accommodated on the server side, without clients having to visit an update site.

    The tool was implemented using Canoo’s Java RIA library, UltraLightClient.