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.
In modern UI’s you can often find round avatar images like shown in this image:
Creating these special UI nodes with JavaFX isn’t that hard. The most important JavaFX features to create such a rounded image is clipping. By using clipping you can define the area in that a control can draw it’s content. A clip can be any shape and you only need to set the shape property of a JavaFX Node instance to define its clipping. You can find an additional clipping description here.
Let’s start creating the component. As a first step we will define a Circle shape as a clip and define it for an ImageView instance:
In addition a border should be added to the component. To do so we add one (or several) Circle shapes on top of the ImageView:
In the JavaFX code you can simply bind the bounds of the image to the bounds of the clip and the circle instances that are used as a border.
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:
Geb provides a very good way for end-to-end tests of browser applications.
One drawback while writing is that it might get rick to get the selectors for the UI elements right. Being able to debug, stop in the middle of a test and adjusting the selectors would come in very handy.
But, as things are not always as smooth as we want them to be, the error message you are confronted with when you just hit the „run debug“ button for the Geb Spec class you are woking on might look like:
Process finished with exit code 1
Class not found: "de.mynethome.GebSampleSpec“ Empty test suite.
This will happen especially when you’re working on a Java based project and have pulled in the dependencies on Groovy only for „test“ to be able to profit from the combined power of Spock/Geb. The reason for that error is, that your IDE did not pick up that compile time dependency and thus your groovy files have not been converted into byte code that can be run and debugged. (hint: this applies most likely only to maven based projects. From my experience, this error has not popped up with projects that use gradle as their build system)
Solution to this is simple: Tell your IDE to run the necessary steps to compile your test suite.
That is, for example in IntelliJ Idea, done by adding a „before launch“ task to the run configuration as schon in the picture
Happy debugging & testing!