• Home
  • Events
  • About
  • Lazybones Template for Dolphin Platform Jumpstart

    March 31st, 2016

    As Hendrik stated rightfully in his post about the Dolphin Platform Jumstart maven archetype, Starting with a new technology is often hard.

    To make getting started with the Dolphin Platform in combination with Gradle easier for a broader audience, Maxim and me created a lazybones template for the jump start project of the Dolphin Platform during the last Hackergarten in Basel.

    It is based on the maven archetype (and adopting the actual example project from there) but is completely build with gradle and provides some other improvements like an integrated build for the polymer client.

    You can find it’s source project at https://github.com/canoo/dolphin-platform-lazybones-templates

    To actually use the template you need to have lazybones installed. The easiest way to get it is via SDKMAN.

    So first, let’s install that:
    $ curl -s http://get.sdkman.io | bash
    (Windows users: look for the Powershell version)

    Then, we can use it to install gradle and lazybones:
    $ sdk install lazybones $ sdk install grade

    Next register the dolphin-platform-lazybones-templates repository with Lazybones‘ config file. Edit $USER_HOME/.lazybones/config.groovy

    bintrayRepositories = [ “canoo/dolphin-platform-lazybones-templates”, “pledbrook/lazybones-templates” ]

    If everything is fine, issuing the command
    $ lazybones list

    should list the Dolphin Platform template:
    Available templates in canoo/dolphin-platform-lazybones-templates dolphin-platform-spring-boot

    Now, we can use it to create a new Dolphin Platform project:
    $ lazybones create dolphin-platform-spring-boot MyProject

    The generated project contains a complete Gradle build, so you can use that to import it into your IDE that supports Gradle (like Eclipse or IntelliJ).

    To get an idea on how to proceed from here, have a look at the README of the generated project.

    If you have any questions about Dolphin Platform you can now use the “dolphin-platform” tag at stack overflow. If you are new to Dolphin Platform, find more about it on dolphin-platform.io

    Happy coding :)

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • email
    • Print
    • Twitter
    • LinkedIn
    • XING
    • Facebook
    • Google Bookmarks

    Canoo RIA Suite 2014 Update 3 available

    March 23rd, 2016

    Canoo RIASuite team is pleased to announce that Canoo RIA-Suite 2014 Update 3 (v 8.0.3) is now available for download from http://ulc.canoo.com/downloads/index.html.

    This is a minor release. It includes some bug fixes and feature requests.

    Please see the release notes http://ulc.canoo.com/external/releasenotes.html for more details.

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • email
    • Print
    • Twitter
    • LinkedIn
    • XING
    • Facebook
    • Google Bookmarks

    Dolphin Platform 0.8 has been released

    February 3rd, 2016

    Yesterday, we released version 0.8 of Dolphin Platform. The version contains several bugfixes and some new features.

    Validation

    The biggest new feature is the support of Java Bean Validation (JSR-303). For this feature we introduce a new module to Dolphin Platform that you can easily be added to your application dependencies:

    Once this is done you can use bean validation in the model layer. By doing so you can define your beans like this:

    As you can see the @NotNull annotation is added to the property in the bean class. By doing so you can simply validate instances of the bean by using a Validator.

    Currently not all validation annotations are supported but this is just an open todo. At the moment the following annotations are supported:

    • @AssertFalse
    • @AssertTrue
    • @DecimalMax
    • @DecimalMin
    • @NotNull
    • @Null

    For more information about the bean validation support in Dolphin Platform you should have a look at the readme.

    JavaFX bindings

    For version 0.8 we added a lot of functionality to the JavaFX binding layer. Based on this it’s now possible to simply bind a JavaFX list to an observable list of the Dolphin Platform model layer. Only one line if code is needed for this:

    Plus, we added support for converters. You can bind properties of lists of a different type to each other. This is interesting if you want to bind UI specific classes to the model layer. When using the JavaFX chart API the data model of the charts is defined by JavaFX specific classes. Since you don’t want to have this classes in the model layer that is shared between client and server you can simply define a converter and bind the model of a chart to your custom bean type. Using such a converter is as easy as a normal binding:

    Additional changes

    Next to this we added some minor features like new convenience methods in the ObservableList and fixed some bugs. A complete list of the changes can be found here.

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • email
    • Print
    • Twitter
    • LinkedIn
    • XING
    • Facebook
    • Google Bookmarks

    How to choose the right color

    February 1st, 2016

    When creating a new control or a complete application I often ask myself what colors I should use for visualization. When defining a control, the best solution is to provide properties for all colors so that a developer that uses the component can configure it to match the needed color scheme. But still when developing only a control you should provide a color scheme as a default configuration. In this case it’s important that the colors of the default configuration fit to each other. If you develop a complete application the selection of a specific color scheme is even more important. Sometimes you will get some defaults by your customer but in other projects it might be your part to define a nice selection of colors. If I need to do this I’m always happy about some help and inspiration. Today it’s quite easy to get this help for free since there are some good online resources that can be used to pick some colors or a complete scheme for your application or control. Today I want to introduce 2 of them.

    Material Design Color Palette

    For the Material Design style Google create a style guide with a lot of information how components, layouts, colors, and animation should look and behave. One part of this specification defines how colors should be used in the Material Design style and what colors should be used together. You can find the description here. In this documentation Google provides a color palette that should be used in Material Design. This color palette defines several basic colors ands adds several accents colors to each basic color. Here is an example:

    Material Colors

    If you now need to define a component or an application you can simply choose one of the base colors and create subparts or effects by using the accents colors. Lets say you create a special error button. As the base color of the button you choose the red color as it’s defined as a base color in the palette. But then you need several additional color definitions that define a pressed state of the button or a glow if the button is focused, for example. Here you can easily use the accents colors for red. If you are a JavaFX developer you can simply use a little tool by Gerrit Grundwald to pick the needed colors.

    Next to the color palette the Material design specification defines general light and dark theme. The colors that are shown here are quite helpful to create basic parts of a control or application like panes and menus. The following picture shows an example of the dark theme:

    Dark Theme

    Colors

    Another very helpful tool to create a complete color scheme is the Coolors web application. This application let you simple create new color schemes or choose an scheme that was created by the community.

    Coolors

    When creating your own scheme you start the generator that shows a random scheme with 5 colors. By pressing space a new scheme will be generated and appears on the screen.

    Coolor
    Whenever a scheme contains one or more colors that look good you can lock them. By doing so they won’t change anymore and with the next scheme generation only the colors that are not locked will change. Since all the colors in a scheme always fit to each other it’s quite easy to create a custom color scheme by using this tool.

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • email
    • Print
    • Twitter
    • LinkedIn
    • XING
    • Facebook
    • Google Bookmarks

    Running TestFX tests in headless mode

    January 31st, 2016

    For the past few months I’ve been working on a JavaFX based product that has lots of bells and whistles. Last week we succeeded in setting up functional tests using TestFX. While everything was working fine on a developer’s machine (see this for more information) we were experiencing trouble with our CI environment.

    At first we thought it was a faulty configuration related to xvfb on the server but as it turns out xvfb was working correctly. We even ssh’ed into the server, exported the DISPLAY to a different machine and saw the test run. Kind of. The following is the basic test code that was causing us trouble:

    Clicking on #optionsMenu (a button) should bring a popup menu; clicking on #preferencesActionTarget then selects an item from the popup menu. The button is placed at the top right corner of the window.

    When running the test on a local machine we can clearly see the robot clicking on all items we told it to, however the execution on the server always left the pointer at the center of the window. Aha! the problem was that the mouse pointer froze completely. The Robot was unable to move it to the right point on the screen and the click on the expected element.

    Searching for clues to fix this problem led us to this thread at the TestFX Google Group. The problem discussed there was of a different nature, nevertheless the thread contained a small nugget of information:

    The DragAndDropBug occurs when the GlassRobot is used without Monocle. Automatic mouse movement will freeze. — Benjamin

    So we had to enable Monocle on the server. As far as we can tell there’s only one release of Monocle available at JCenter/Maven Central: 1.8.0_20. This version worked well for us although we’re running JDK8u72. Please follow the instructions laid out here if you require another version; or point that repository to jitpack.io and let it serve the binaries for you.

    Assuming you’re building projects with Gradle (if not, what are you waiting for? Maven is so old school now) you only need to configure the following dependencies to have Monocle in your build

    The last bit found in this file allow us to enable/disable headless mode in our tests. In this way we can use the real Glass Robot when running locally or the Monocle Robot when running on CI. Headless mode is disabled by default; it can be enabled by invoking

    $ gradle -Pheadless=true test

    Of course, one could tweak the build file and have the value of the headless property be set according to the current environment, that is, if the build is being executed inside the CI server or not. Once we’re done with the setup the only thing left to do is update the tests so that the correct robot is used. You’ll typically use a static initializer block to perform this feat, such as

    And that’s it. There’s nothing much to it once you know what to tweak.

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • email
    • Print
    • Twitter
    • LinkedIn
    • XING
    • Facebook
    • Google Bookmarks

    css.php