• Home
  • Events
  • About
  • 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.


    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.

    Dolphin Platform and Polymer

    December 15th, 2015

    Starting with version 0.7 the Dolphin Platform JavaScript and Polymer API has been released. Now you can easily create desktop, mobile and web clients for your application by using the same controller and presentation model. You only need to change the thin view layer. The Dolphin Platform repository at GitHub already contains a small client server application with a JavaFX based client and a Polymer client. In addition the example contains a Spring Boot tutorial and a KumuluzEE server. By doing so you can select the environment that fits perfectly to your needs. You can find there project here. A short description about the Polymer client API can be found here.

    Dolphin Platform Jumpstart

    December 1st, 2015

    Starting with a new technology is often hard. Even if the technology is documented and follows the pattern and structures that you already know from other APIs or frameworks the initial start is always a problem. To simplify this start when working with the Dolphin Platform, we created a first Maven archetype that creates a simple client server application.

    This application is an ideal starting point to play with the Dolphin Platform framework, learn the APIs or directly start your own application based on Dolphin Platform.

    The Maven multi module project that is created by using this first archetype contains a Spring Boot based server and a JavaFX client. With this archetype you can create your own project directly in an IDE like IntelliJ or by using the shell. If you want to use the shell you need maven on your system. IDEs like IntelliJ contain a bundled Maven instance and you don’t need to install anything on your system (without the IDE).

    The following video shows how you can create your first Dolphin Platform application in 1 minute by using IntelliJ:

    We will post about other IDE and the commandline usage later.

    If you have any questions about Dolphin Platform you can now use the “dolphin-platform” tag at stackoverflow. If you are new to Dolphin Platform you can find general information and tutorials on the Dolphin Platform website.

    Dolphin Platform in 15 minutes @ Nighthacking

    November 11th, 2015

    Michael Heinrichs and Hendrik Ebbers were interviewed at Devoxx about the Dolphin Platform. In this interview they explain the benefits of the framework and show some code:

    Dolphin Platform Web Frontends with Polymer

    October 22nd, 2015

    For the Dolphin Platform release we plan to offer several demos and tutorials as a starting point. Currently, we are working on a simple chat app that contains a JavaFX and a web frontend. The web frontend is done by using Google Polymer and web components. In this blog post, we will give a preview on how to create web applications with the Dolphin Platform by using Polymer.

    All the main concepts are already described in the post about JavaFX clients. In this post, we will show you that you can reuse all the concepts for a web application.

    The following picture shows how the final application will look like:

    To create a client that can communicate with the Dolphin Platform server a client context is needed. In an web application this can simply be done by defining a global JavaScript value:

    As we use web components when creating an application by using Polymer all view elements of our application are defined as components. In the chat example one chat view is defined as a Polymer based web component. For such a component the minimum code looks like this:

    Once this is done you can simply use the component in your web application as a custom tag:

    To create a web component that acts as a Dolphin Platform you only need to add one more line of code:

    Polymer supports extending custom element prototypes with shared code modules called behaviors. The Dolphin Platform client API provides such a base behavior and therefore you can connect a web component with a Dolphin Platform controller by only adding one line of code. The ThreadViewController is the server side controller for this view. The code of this Java class looks like this:

    We don’t want to discuss the Dolphin Platform controller API here and therefore all the methods of the controller are empty at the moment. It’s important to know that the controller instance and the view share one model that is defined by the ChatThreadBean class:

    As you can see in the code the model contains a chat id, the typed text and a list of all chat messages that should be shown in the chat thread. Let’s have a look how we can use this model on the client.

    By adding the Polymer behavior the Dolphin Platform model will automatically be injected in the component context. It is stored in the JavaScript model value. This means that the following JavaScript call will show a dialog that contains the current typed text:

    In addition Polymer defines a binding API this is automatically used by the model. Thanks to this you can simply bind your model or parts of your model to HTML attributes in the web component template by using the mustache syntax. here you see how the typed text is bound to the input field in the chat view:

    Easy, isn’t it?

    Thanks to the modularity of web components you can even go deeper and use your model in sub components. In the chat example each message in the chat is defined by a web component. To do so we created the custom component chat-message that defines how one chat message should be visualized. Now we can define the complete chat by only 3 lines of HTML code:

    The dom-repeat elect is a special Polymer elect that add it’s content for each item in a given list. As we said earlier all the chat messages in our model are defined as a list. This list can easily be accessed by calling model.messages.

    If you already read the post about JavaFX clients you might notice all the parallels. By using the Dolphin Platform API it’s really easy to create interactive and modern clients for several platforms without loosing the control of the UI.