Friday, December 7, 2012

JavaFX: Designing for Multiple Screen Resolutions

Throughout the last couple of years we have seen significant improvements in screen resolutions. On cell phones, on tablets, on laptops – everywhere. Gone are the days when resolutions like super VGA (800 × 600), or later full HD (1920 × 1200) would be the de facto standard for years in a row. Now, the only thing we know is that the next device coming out will have an even more impressive screen resolution.
Obviously, not knowing which screen resolution to design for, presents a challenge to JavaFX application designers. The solution is to design your application in a resolution independent manner, and this article shows you how.

Monday, November 26, 2012

JavaFX: Leveraging Multi-core Performance

Like many other user interface frameworks, JavaFX is single-threaded; but since most modern computers have multi-core CPUs, many JavaFX applications can benefit from introducing multiple threads – as long as it is done correctly, in a manner compatible with JavaFX. This article shows you how.

Thursday, November 22, 2012

Coding Patterns: Promote The Normal Flow

Working as a Java consultant, I have often been involved in discussions on coding style; and quite often, developers disagree on how to order the code blocks of if-else statements. The issue arises from the fact, that in a regular if-else statement with two code blocks A and B like this one
if(condition) {
    … A …
}
else {
    … B …
}
the two blocks of code, A and B, can easily be reversed by negating the condition like this
if(!condition) { // notice the '!'
    … B …
}
else {
    … A …
}
So, which is preferable? if-A-else-B or if-B-else-A? The answer I hear the most is: "Well... that just depends on the if condition." Unfortunately, that is not the correct answer – Far from it.

Sunday, November 4, 2012

JavaFX and the Missing Interfaces

During the development of my company's JavaFX based application framework, I have often been challenged by the extensive use of superclasses rather than interfaces in JavaFX. Here are my thoughts on what could be done to improve JavaFX in this regard.