- Some new Swing APIs from Java 7
- Use of JLayer in place of JxLayer
- Integration of JavaFX WebView in the new package ULC FxBrowser
- Improvements to EasyDeployment to enable multiple ULC apps in a single web application
- Installer-free installation process – simply unzip and install license
- Many bug fixes and improvements
We are happy to announce a significant milestone for the OpenDolphin project: the 0.8 release.
With 1.0 coming closer, we have focused on harmonizing the API and supporting production systems in terms of scalability, performance, resource consumption and monitoring capabilities.
The original plan was to care about the production support after the 1.0 release but since OpenDolphin is already used in mission critical and reasonably large production systems, we had to adapt. This led to a deferral of the 0.8 release date but with the benefit of having a production-ready system much earlier.
Between the various improvements are:
- new internal asynchronous event handling based on kanbanflow that has proven to scale very nicely with the number of available processing units. OpenDolphin is ready for the multi-core era.
- client-side presentation models are an option for cases where you need the full versatility of presentation models for the view without the controller knowing anything about it. This enhances performance since no updates are ever sent to the server and it dramatically reduces memory footprint on the server.
- command batching collects client-side commands in packets before sending them to the server. This is a tremendous time saver when there are very many commands to be sent. It goes without saying that all OpenDolphin characteristics like asynchronous sending and strict command sequence remain untouched.
- compressing codecs can be used when there is a lot of data to be sent in either direction. We just zip it up.
- adaptive logging allows to set log levels at runtime (!) on a granularity of your choice to look into pretty much every detail of OpenDolphin.
- session affinity checks protect your application against server misbehavior with respect to breaches of session affinity (as experienced with market-leading products).
In the project infrastructure we have seen advances such as
- 100% test coverage, i.e. statement coverage without any exclusions as visible from the continuous integration builds.
- revamped website, which we hope you’ll like.
- more demos particularly around synchronizing many clients and a large set of data points but also for point-of-sale systems and typical business applications.
- improvements to the jump-start project and the project generator for quickly getting into OpenDolphin.
The ecosystem around OpenDolphin is growing and has come up with great new approaches like
- OpenDolphin on the Raspberry Pi to show the small resource requirements and
- dolphin.js as a prototype for OpenDolphin on the web, on mobile devices, and in live-update multi-channel applications.
- and many projects, events, and blog posts
I’d like to say a big thank you to all involved parties, particularly our early-adopting users for their great feedback.
I’m also happy to point out the contributions of our new committers Andreas, Detlef, Christoph, and Sven.
In order to use the latest release, just update your dependencies from 0.7 to 0.8.
We plan to release version 1.0 this summer with additional convenience features and a more extensive user guide.
S for Sierra: this little letter turns one “Java Champion” into (at least) two “Java Champions”. Now we can officially append the pluralizing ‘s’, since two of the roughly 140 Java Champions worldwide belong to Canoo. Gerrit Grunwald received the coveted award last week in the course of the Java Champions Project, sponsored by Oracle. Andres Almiray had already been nominated and selected by the committee in 2010. As leader of JUG Münster, international speaker and software engineer with many years’ Java experience, Gerrit Grunwald actively passes his expertise on to developers and members of the community. In doing so, he not only follows the guiding principles of his Java Champion fellows but also underscores Canoo’s philosophy. “Hearty congratulations” from us!
In July the Java Forum Stuttgart took place for the 16th occasion. And while Dierk König and Gerrit Grunwald filled the congress centre’s lecture rooms with their talks “OpenDolphin – Java Desktop UIs for Enterprise Applications” and “JavaFX on Raspberry Pi and BeagleBoard xM“, the Canoo exhibition stand provided the meeting point for the Java Community. Here visitors were able to find out even more about the open source project Dolphin and exchange ideas with our experts about the use of JavaFX on embedded hardware. For those of you unable to attend the congress, you can view the Open Dolphin presentation slides and the JavaFX presentation slides. A great performance which we could only have topped with a homemade Raspberry Pie!
Today I would like to show you how a pure Swing based application can benefit from using Open Dolphin even if you are not planning to migrate it to JavaFX.
Although open-dolphin comes with many JavaFX examples it is not bound to JavaFX at all. In fact it does not require any specific UI toolkit.
You can get the source code for this example ready to build from github:
- git clone https://github.com/svene/opendolphin_swing_example.git
- ./gradlew build (or ‘gradlew.bat build’ if you are on Windows)
- ./gradlew :combined:run
The included example consists of just four simple widgets: a text field, a label and two buttons.
I did not spend any effort in making it visually attractive since I want you to concentrate on the open-dolphin aspects.
This is how the GUI looks like:
and here is a video demonstrating it’s behavior:
The following picture depicts how the individual widgets of the GUI are connected to the single presentation model:
Whenever a button is pressed a new value for the color is set on the presentation model (PM for short). And whenever the PM’s value changes both the label and the textfield are updated accordingly. In addition whenever the value in the textfield is changed by the user the value will be written back into the PM which in turn will update the label and so on.
In other words: each widget only talks (is bound) to the PM and not to other widgets. This also means they are only depending on the PM but not on other widgets. You can find more information about the PM concept on open-dolphin.org.
Some things worth to mention about the code:
When we invoke
as decribed earlier the application starts up with ApplicationInMemoryStarter. If you have a look into it you find that it uses SwingUiThreadHandler so that Dolphin can make use of Swing’s thread handling using:
The GUI (see ApplicationFrame) makes use of my preferred layoutcontainer: MigLayout.
Widgets are bound using Open Dolphin’s Binder class. The label for example is bound to the PM with a convenient DSL as follows:
which means: whenever the color of pm1 changes update the label’s text accordingly. The textfield is bound in the same way. Since text fields in Swing are a little uncooperative in regards to binding I used Jean-Marc Astesana’s CoolJTextField (see http://stackoverflow.com/questions/3953208/value-change-listener-to-jtextfield for the details).
This blog post gave you a starting point on how to apply the presentation model concept with Open Dolphin to a Swing application. But we only scratched the surface. If you would like to learn more about these intersting topics visit the Open Dolphin website or get in contact with Canoo.
Sven Ehrke (@syendar)