• Home
  • About
  • Maintenance Release Canoo RIA Suite ULC Update 1

    October 1st, 2010

    We are pleased to announce that the maintenance release
    Canoo RIA Suite ULC Update 1 is now available for download !

    This is a maintenance release for the Canoo RIA Suite.
    Besides many bug fixes and improvements it includes

    – Builtin animations for ULCLabel, ULCScrollPane,
    ULCSplitPane and ULCInternalFrame
    – Radial Gradient Paints

    Please see the release notes for the complete list of
    implemented feature requests and fixed problem reports.

    And don’t miss the demos.

    Please note: the ULC Core license key and any ULC Package license key
    are valid for all releases labeled Canoo RIA Suite ULC. If you already have
    any Canoo RIA Suite license key, no new license key is required.


    Java Without the Boilerplate – Project Lombok

    July 26th, 2010

    Project Lombok is a very cool little Java library that aims (and succeeds) in removing boilerplate, meaningless, and uninteresting code from your Java objects. The basic idea is to replace things like getters and setters with simple annotations, and then let the Java compiler generate the necessary bytecode in the .class file so that tools such as Eclipse and the Java compiler have no idea what anything unusual happened. Lombok hooks into the compiler to make sure this happens correctly.

    First we’ll cover some Lombok basics and then show how it can be used with the Canoo RIA Suite (ULC) project and and view generators. This includes details on how to mix Lombok annotated objects with JPA annotations, which you might want to glance at before leaving!

    Update: You do not need ULC to work with Lombok. The two are separate projects.

    Lombok in Action
    So let’s see Lombok in action. Consider this Java class that includes a Lombok annotation:

    
    import lombok.Data;
    
    public @Data class Contact {
        private String name;
        private String email;
        private String primaryPhone;
    }
    

    OK, so there is an @Data annotation in there. So what? Well, to javac and tools (like Eclipse) this class has getters and setters for all three fields, an equals and hashcode implementation, and a toString method. Eclipse tools still give you autocomplete the Navigator shows the correct methods. Not only did you not have to write (or generate) the code yourself, but you don’t have to see that code when coming back in maintenance mode. The interesting bits of your class are no longer buried in the noise. Consider what this looks like without lombok:
    
    public @Data class Contact {
        private String name;
        private String email;
        private String primaryPhone;
    
        public String getName() {
            return name;
        }
       
        void setName(String name) {
          this.name = name;
        }
        
        public String getEmail() {
            return email;
        }
       
        void setEmail(String email) {
          this.email = email;
        }
    
        public String getPrimaryPhone() {
            return primaryPhone;
        }
       
        void setPrimaryPhone(String primaryPhone) {
          this.primaryPhone = primaryPhone;
        }
    
        @Override public String toString() {
            return "Contact(" + name + ", " 
                    + email + ", " 
                    + primaryPhone + ")";
        }
         
        @Override public boolean equals(Object o) {
            if (o == this) return true;
            if (o == null) return false;
            if (o.getClass() != this.getClass()) return false;
            Contact other = (Contact) o;
            if (name == null 
                    ? other.name != null 
                    : !name.equals(other.name)) return false;
            if (email == null 
                    ? other.email != null 
                    : !email.equals(other.email)) return false;
            if (primaryPhone == null 
                    ? other.primaryPhone != null 
                    : !primaryPhone.equals(other.primaryPhone)) return false;
            return true;
        }
         
        @Override public int hashCode() {
            final int PRIME = 31;
            int result = 1;
            result = (result*PRIME) + (name == null 
                    ? 0 
                    : name.hashCode());
            result = (result*PRIME) + (email == null 
                    ? 0 
                    : email.hashCode());
            result = (result*PRIME) + (primaryPhone == null 
                    ? 0 
                    : primaryPhone.hashCode());
            return result;
        }
    

    That’s a lot of code for something so simple. It doesn’t even fit in my browser margins without funky line breaks! Sure, IDEs can generate it for you. But what if something interesting is buried in the equals() method? Or perhaps a setter has a side-effect? You can’t easily see this with the reams of boilerplate typical of Java. With lombok, only the essentials are displayed, so the unique parts of the object will stand out to the future reader. And yes, even using @Data you are free to provide your own implementations for any of these methods.

    Richard Gabriel made this observation when comparing old programs (like MacPaint) to “modern” programs writen in langauges like Java:

    I’m always delighted by the light touch and stillness of early programming languages. Not much text; a lot gets done. Old programs read like quite conversations between a well-spoken research worker and a well-studied mechanical colleague, not as a debate with a compiler. Who’d have guessed sophistication brought such noise.

    Now, with Lombok, sophistication is finally taking the noise away, rather than adding to it.

    Just a couple important details before moving on to a Lombok example that uses Canoo’s RIA Suite

  • Lombok is compile time only. It does not need to be deployed with your app
  • Lombok works with javac and Eclipse. IntelliJ IDEA will not ‘see’ the added methods
  • lombok.jar contains an installer that configures your eclipse.ini file correctly. Be sure to run “java -jar lombok.jar” after you download it (especially for those on 64 bit Linux like me)
  • Lombok with Canoo RIA Suite
    The point of this was to make sure I could use Lombok on my next RIA Suite(aka ULC) project. It’s looks like I can, and you can too. To prove it, let’s generate a RIA Suite project, add a domain class using Lombok, generate the views, and run the application.

    Prerequisites

  • Install Eclipse for Java EE Developers. Make sure that you have for Java EE developers.
  • Install Canoo RIA Suite. Get your download and evaluation key from our customer portal.
  • Install Lombok. Download it and run “java -jar lombok.jar”.
  • Steps
    Here are the steps we’ll perform to get this thing working:

  • Generate a Project using ULC’s Project Generator in Eclipse
  • Add the lombok Jar to your project
  • Create a domain object called Contact and annotate it with @Data
  • Generate the views using ULC’s generate-beans-view in Eclipse
  • Run the app and behold a default, thin client, CRUD application
  • Generate the Project
    The ULC Application Development Guide contains a 10 page getting started tutorial that walks you through the process from starting at zero and going to a deployed RIA Suite application. Really, it is quite simple. You just need to add the Project Generator as an external tool in Eclipse. Although it is a bunch of screenshots, this is a common task for Eclipse users and little can go wrong.

    In Eclipse, click Run -> External Tools > Open External Tools Dialog… and point a new external tool to your “/addon/generators/build-setup.xml” from the RIA Suite install. Your window should look like this:

    0ToolConfiguration

    Now you’ll have the menu entry for Run -> External Tools -> ULC Project Generator, which you should click now. You’ll be prompted for a project name and whatnot, and a sample Contacts application will look like this:

    1GenerateProject

    The script runs and you now have a project on disk that can be run. Just click to File -> Import to import it, navigating to where it is on disk. Your import screen should look like this:

    2ImportProoject

    If it all goes well your project should be open and your Project Explorer should look like this:

    3ProjectView

    Add the Lombok Jar
    We need to add the lombok.jar to the Contacts project, add it to the build classpath, and click Refresh to make sure Eclipse is aware that something changed.

    Copy the lombok.jar to ./Contacts/lib/development directory in your project. Then edit the project properties (right click the Contacts project and select Properties), select the Java Build Path entry, and add lombok.jar as a Jar. Should look like this:

    4AddLibrary

    Create Domain Object
    Let’s add a domain object with JPA persistence to our project. A Contacts application must show a Contact, right? This looks about right:

    package org.sample.contacts.domain;
    
    import javax.persistence.*;
    import lombok.*;
    
    @Entity
    public @Data class Contact {
        
        @Id
        @GeneratedValue(strategy = GenerationType.SEQUENCE)
        @Getter(AccessLevel.NONE)
        @Setter(AccessLevel.NONE)
        private Long id;
        private String name;
        private String email;
        private String primaryPhone;
    }
    

    Let me explain a few details… The class is marked @Entity so that JPA persistence works. The class will map to a Contact table in the database. The class is marked @Data so that lombok will weave in getters, setters, toString, equals, and hashcode methods. The @Id annotation on the “id” field marks that field as the primary key to JPA, and the @GeneratedValue means the field auto increments. I use the GenerationType.SEQUENCE strategy because I plan on deploying to Google App Engine, otherwise this parameter here is unneeded. Lastly, getters and setters are supressed on the id field by adding @Getter(AccessLevel.NONE) and @Setter(AccessLevel.NONE). If you don’t do this then the view-layer automation of Ria Suite is going to, by default, provide you with edit fields for the id, which you should not do.

    Generate the View Layer
    To generate the view layer, click Run -> External Tools -> “Contacts generate-beans-view”. This tool was installed for you by the Project Generator. Running it generates a simple Create-Read-Update-Delete (CRUD) interface with a table, buttons, and entry editor. You’ll see a couple new classes and property files in your application after you run the tool.

    Run application
    Last thing to do is run the app. Click Run -> Run History -> Contacts (again installed by the project generator), sit back, and behold an application.

    5DeployedApp

    That’s it!

    Next step is to deploy to Google App Engine using that Contacts-copy-to-GoogleApp tool that the generator installed, but that is a blog post (and task) for another day.

    Enjoy!


    Java Business RIA redefined!

    May 2nd, 2010

    The future belongs to Rich Internet Applications (RIA) – they are increasingly replacing the classical desktop application. And it is no wonder, as this latest generation of web applications offers a totally new kind of interactivity. Furthermore, RIAs spare your budget thanks to their operating system independence and the fact that they can be used without installation. According to the market research organization Forrester Research, RIA technology will be deployed in around 60% of all software development projects in the coming years.

    RIAbox_middle

    The disadvantage of most of today’s RIA frameworks is that they were developed for the optimization of web sites. They rapidly reach their limits, therefore, with complex business applications. Canoo Engineering’s Canoo RIA Suite with its modular design provides a remedy. It’s heart is ULC (UltraLightClient), a proven and stable component for the development of RIAs – optimized for the performance requirements of business applications. Thanks to the 100% java-based homogeneous programming model, ULC reduces the complexity of RIA projects to a minimum. RIAs developed with ULC score highly due to their low development and maintenance costs, and are more than a match for classical desktop applications in user-friendliness, functionality, attractiveness, robustness and performance.

    Since March 31, 2010, ULC Core is available as a Beta Release. The Canoo Ria Suite will be released officially just before Pentecost 2010. The advantages at a Glance:

    • Up to 50% reductions in development costs
    • Puts business functionality on to the web without quality losses
    • Lower operational costs thanks to server side maintenance and standardized technology
    • Maximum security thanks to standard conformity
    • Straightforward and rapid development due to uniform Java basis
    • Robust and scalable architecture
    • No longer time-consuming client-side deployment
    • Enables highly interactive and user friendly interfaces
    • No browser adaptation required
    • Optimal user productivity due to rapid response times
    • Lower project risk thanks to well engineered, tried and tested technology
    • Impressive prototypes in minimal time

    “We switched to ULC in the middle of a large software project, as we were not able to implement all the requirements with the technology we were using at the time. ULC then enabled us to at least double our productivity, in turn allowing the project to be completed on time.”

    Greg Hutchinson, Principal Developer of a large Canadian financial institution


    Canoo RIA Suite Beta

    April 1st, 2010

    Canoo Engineering is proud to present the next generation of UltraLightClient! Download the Beta here!

    The RIA-Framework (Rich Internet Application) has been completely overhauled and enhanced with a series of innovative and useful functions. These will enable more efficient and convenient deployment in future, as well as adding some attractive features to the design of the user interface.

    UltraLightClient will bear the name ULC Core from now on, and forms the basis of the new Canoo RIA Suite, which will officially be released at the beginning of May. The suite is designed in a modular fashion, allowing you to compose functionality according to your own needs. And you only pay for those modules which you actually require.

    .

    RIA suite

    The Highlights

    • The new Chart Functionality enables you to present even complex facts and figures clearly and simply.
    • Using the integrated Animations Framework you can develop dynamic and attractive content in future.
    • Further sophisticated graphic features allow even more attractive designs: transparency, rounded angles etc.
    • Easy integration to Google App Engine.

    THE NEW MODULES AT A GLANCE

    ULC Table Plus: this package enables you to implement even the most complex tabular requirements in a rapid and straightforward manner.

    ULC Web Integration: simply integrate any browsers such as Safari, Firefox or Internet Explorer into your application developed under ULC. Web services and plug-ins like Google Maps or Flash Player can thus be launched directly in the application.

    ULC Office Integration: this ULC Core module supports the future import and export of Excel and Word files out-of-the-box. The contents can then be stored as PDF files and later printed.

    ULC Enterprise Portal Integration: using this optional extra, existing portlet applications can be easily and efficiently augmented with ULC applications.

    ULC Visual Editor: with the optimized visual editor you can generate your ULC applications by drag & drop even more easily and, as usual, without any manual programming effort whatsoever.

    ULC Load: put your ULC applications though extensive load and performance tests using ULC Load. Thus you can be confident that your applications can bear up to the most rigorous demands in an operational environment.

    Download the Beta here!


    When is it worth deploying RIA technology?

    January 21st, 2010

    Excerpt of  ”Rich Internet Applications for Business”, an article by Hans Dirk Walter, CEO Canoo Engineering AG (in print).

    Even if RIA technology continues to expand steadily in the future and the number of purely HTML based applications does decline, it is nonetheless not recommended to resort to an RIA framework or library for technology’s sake alone when developing online applications. Instead, the decision depends on the user interface requirements.


    Figure 1 provides a schematic illustration of various categories of application depending on usage, and shows the dependency of these applications with regard to interactivity requirements and interface richness (UI functionality, drag & drop, graphics).

    Figure 1 provides a schematic illustration of various categories of application depending on usage, and shows the dependency of these applications with regard to interactivity requirements and interface richness (UI functionality, drag & drop, graphics).

    .

    Typical web applications such as online shopping or rail timetables, that are only occasionally visited by their customers, need to be self explanatory and easy to operate. Speed and sophisticated interaction are of secondary importance in these cases. This type of application is best implemented using form based “wizards”. The functionality offered by HTML is generally more than sufficient in such cases. This does not apply, however, to productive systems, whose users often spend several hours per day with the application. The interface need not necessarily be self explanatory, while training is normally worthwhile. These kinds of application should be developed using RIA technology. The final types of program identified are games, which place the most demanding requirements of all in terms of interactivity (extremely speedy program reaction times in response to rapid successive inputs), as well as sophistication (3D animations, film sequences, etc.) Such application have so far scarcely been realised in satisfactory quality as RIAs.