A new Chapter

After seven years in the Czech Republic, we decided that it is time for a change and to move on. It was a great time during which I met a lot of fantastic people and experienced many wonderful and unforgettable moments. In the last month we moved to Freiburg, a beautiful city in the south-west of Germany.

Yesterday was the first day in my new job at Canoo. If you are interested in JavaFX, you have probably already heard about them. Canoo is a company that is focused on UI development with all kinds of technologies. They have been part of the JavaFX community from day one. And yes, by that I mean, Canoo is one of the few companies that has actually used JavaFX Script! :)

There are many reasons why I am looking forward to the new gig. It allows me to:

  • work with JavaFX again and “rejoin” the JavaFX community.
  • focus on all things UI: development, UX, design.
  • spend more time on blogging and speaking.
  • contribute to exciting Open Source initiatives, e.g. OpenDolphin, DataFX, the JavaFX ports etc.
  • and last but not least I will work with great people (e.g. Dierk König, Andres Almiray, Hendrik Ebbers, and others) to create beautiful and fun-to-use front ends.

Tutorial – JavaFX Library for Inverse Kinematics 2.0

This is the first tutorial explaining the basics of javafx-ik, a library for inverse kinematics with JavaFX. The sources of the library can be downloaded from GitHub.
Continue reading

JavaFX Library for Inverse Kinematics 2.0

Last week I had to stay sick at home for a couple of days. On the positive side, I finally found some time to look into my old library for inverse kinematics. I wrote it a couple of years ago for JavaFX 1.x. And I decided to port it to JavaFX 2. The initial version is ready for download.

Continue reading

JavaOne Material

At this year’s JavaOne, I did a session “JavaFX for Business Application Developers” and a BOF “Live-Coding BOF: Writing a Game with JavaFX”. This post provides the material.
Continue reading

Using the JavaFX AnimationTimer

In retrospect it was probably not a good idea to give the AnimationTimer its name, because it can be used for much more than just animation: measuring the fps-rate, collision detection, calculating the steps of a simulation, the main loop of a game etc. In fact, most of the time I saw AnimationTimer in action was not related to animation at all. Nevertheless there are cases when you want to consider using an AnimationTimer for your animation. This post will explain the class and show an example where AnimationTimer is used to calculate animations.

Screenshot of the AnimationTimer example used in this post
Continue reading

Example CSS Stylying in JavaFX

To learn how to use CSS with JavaFX, I wrote a small application and created two new looks with CSS – and I must say I am truly impressed by its capabilities. Look for yourself how much you can do with CSS only.
Continue reading

Creating a Sprite Animation with JavaFX

While most of my posts so far dealt with JavaFX properties and bindings, today I want to write about another part of the JavaFX runtime I also work on: the animation API. In this article I will explain how to write custom animations in JavaFX and use this approach to create a class for sprite animations. (This will also be a good practice for one of my sessions at the conference 33rd Degree. I plan to write a game in JavaFX in just one hour. That’s going to be fun!) :-)

 The Horse in Motion

The Horse in Motion

Continue reading

Creating read-only properties in JavaFX

The JavaFX runtime provides two possibilities to create read-only properties. You can either use a wrapper (e.g. ReadOnlyDoubleWrapper) or you can extend an abstract base class (e.g. ReadOnlyDoublePropertyBase). This article shows how these two approaches can be implemented.

Continue reading

Advantages of JavaFX builders

Very often one has to create a number of of similar objects. Using JavaFX builders for this task instead of constructors has several advantages as we will see in this article.

In short, builders…

  • are easier to read and understand
  • avoid some “copy & paste”-bugs
  • result in small, but simple code, if builders are reused

Continue reading

My personal JavaOne wrap-up

What a blast this year’s JavaOne was. From the three JavaOne conferences I have been to, for me personally this one was the most exciting one. It is one thing to sit in your office thinking that what you do might be real cool for developers. It is a completely different thing to actually get so much positive feedback.

I arrived on Saturday night, actually doing pretty good. I was able to sleep during the flight, which rarely happens. In the hotel I skyped with my boss and he asked me to pick up the tablets for the Tuesday keynote the next morning. Plans can change quickly: no sleeping in, no shopping presents for the kids… oh well, that is JavaOne.

On Sunday morning, I was able to sneak in the Java community leader brunch. I considered it a reward for getting up and taking care of the tablets. It was a very good meeting, where I met a lot of interesting people. I was even able to speak German with some of the attendees. It felt really weird to talk about JavaFX in my mother language, although I live in Prague for only four years now.

During the presentation a couple of the announcements for the next days were already presented, e.g. the JavaFX roadmap and the plan that we want to opensource JavaFX. The feedback was very positive and everybody agreed that overall Oracle is doing the right thing with JavaFX, only some details were seen differently.

The rest of the day I took off and finally did some shopping and met with colleagues who live in the area. In the evening, the traditional opening party of JavaOne took place in the Thirsty Bear (official title: Glassfish community party) which gave me more opportunities to practice my German. And I met a couple of people who left Oracle Czech a couple of month ago. It is funny, I travel across the globe and meet former colleagues from Prague.

Monday the first set of demos were presented. The waving and jumping Duke was already amazing, but when Jasper started to play Duke, I could not believe what I saw. Honestly, I did not know that this kind of stuff is already possible with JavaFX. After the session I spend some time reading tweets about JavaOne. Looks like I was not the only one, who was taken by surprise. The feedback was superb.

The rest of the day, I spend taking care of the tablets, charging them, making sure all of them have the latest version of Fossil Game installed and working on my sessions. In the evening we had the rehearsal for the keynote the next day. And there it happened. The game crashed on one of the devices. We have tested them thoroughly as you can imagine. I played the game up to level 10, it never crashed. Naturally we got “slightly” nervous. I took the devices back to the hotel and played Fossil Game again for more than half an hour – no crash.

Next morning was “our” keynote in which Nandini presented Fossil Game playing on Android, iPad, and a Windows tablet. Everything went well. What a relief! The ports are just prototypes and nobody in IT expects a prototype to be as stable as a released product, but still – you do not want your prototype to crash  during a keynote!

The rest of JavaOne was just amazing. Whenever I talked to people and the topic came to JavaFX, people were just thrilled. Even people who usually do only J2EE stuff told me, they want to try JavaFX. Everybody was really impressed. It seemed, especially the sneak preview of our vision, enabling developers to use JavaFX for all platforms, ignited people’s imagination.

The rest of Tuesday I spent at two fun events, the JavaFX community lunch and a party in the evening. That was fun! It looks like every JUG leader now wants to do something about JavaFX in his or her JUG. The time between the events was filled with practicing my two sessions.

Wednesday morning was my first session about JavaFX properties and bindings. Attendance was actually quite good considering that the session started at 8:30 AM. It was the only day without a keynote and I can imagine most people used it to sleep in at least once. (Guess I would have.) The session went quite well. There was just one question for clarification. Either the presentation was well understandable or too simple.

There was one particular interesting question at the end of the talk: is it possible to bind across threads. Say you read a property from one thread, but its dependencies are usually updated from another thread. The idea was, that lazy evaluation could maybe decouple the two threads and require less synchronization. Right now, this will most likely cause synchronization issues and you have to take care of that manually. I like this question so much, because it presents us a usage of the binding API, we have not thought of so far, and I hope to hear more of such examples. May it be serious use case to solve issues in real applications or just crazy ideas to push the limits of what you can do with bindings.

Early afternoon John and I did the second session about animation with JavaFX. I think it went quite well – no questions for clarification. But the questions demonstrated a clear need for a tool to design complex animation. The animation API in JavaFX is flexible enough to satisfy a professional animator like John, but I think it is still very hard to come up with the right parameters like timing or the interpolators. Especially if it is not your daily job to define animation, you need to figure them out by trial-and-error. This is pretty cumbersome if you have to do it in code, a visual tool would speed up this trial-and-error phase tremendously. Unfortunately I doubt I have the time to write such a tool by myself. Maybe an open source project to split the effort would work. Let’s see, if I can find other interested developers.

Wednesday evening I was just exhausted. Sleeping only four hours every night and all the stress and excitement of the last couple of days finally got me. I went to bed early and do not even know what else went on that night. Guess everybody went to the concert anyway.

On Thursday nothing spectacular happened – at least to me. In the evening I flew back home, tired, excited, and curious what the future of JavaFX will bring.