Author: Holger Staudacher

Working towards clean code is a priority for me when I develop software. For some time I've been using Google Guava for nearly all my projects. The reason is simple. Guava provides great facilities to beautify my code. Today I want to show you how I use Preconditions to avoid unnecessary if/throw statements and Optionals to improve my code semantics. [ Need expert advice for your...

Read More

For the last few years I´ve programmed mostly in Java. And, in this world it´s common to have a Continuous Integration (CI) server for building your product nightly or more often. When we started developing RAP mobile with its large amount of Objective-C code within an Xcode project, we didn´t have a CI server for the iOS client. But this has changed recently. We now...

Read More

Whenever we talk about server-side apps and RAP mobile, one topic always comes up: how to access native functionality like Geolocation or the Camera. With this post I want to show you how we access this functionality on the server-side. At writing, we've implemented Geolocation Support, and more additions are planned for the near future. I have to point out one thing first.  When you take...

Read More

In my last post I gave you an overview of server-side apps and how they relate to Tabris (previously RAP Mobile). In this post I want to dive into some technical details. I'll assume that you are a Java programmer and that you are familiar with servlets and tomcat. Not necessary but really helpful is some knowledge of OSGi. So, let's get started. To create Tabris Applications...

Read More

JUnit and Eclipse are a great combination, but one thing that I missed every time I worked with JUnit4 was the code templates. Currently, Eclipse ships with pre-defined templates for JUnit3 but not for JUnit4. So, I wrote three basic JUnit4 templates that can be imported from the "Templates" Preference Page. Take a look at the screenshot below to see how to get there. The...

Read More

In a recent blog post Peter Kriens commented that the OSGi service model is as important as object-orientation. I feel the same - I don't want to write software without this concept anymore. But for me, the service model only makes sense when it's used together with the modularity OSGi provides. I think the modularisation layer is the greatest advantage of the OSGi platform and...

Read More

Editor's note: The Restfuse project is no longer maintained and has been archived. However, you can still access the sources on GitHub. As you might know from previous posts, most of my work time has something to do with the development of REST based systems. The systems we develop are mostly written in Java. To ensure that a system works, we have a step in our...

Read More

With this effective Mockito Post I want to share a really simple pattern with you. We call this pattern "check answers" and we use it whenever we work with Mockito Answers. The code resulting from creating Mockito Answers generally looks ugly. But, as good programmers we care about test quality, right? :) Let's see how we can make better looking answers using the "check answer" pattern....

Read More

Editor's note: This project is no longer maintained and has been archived. However, you can still access the sources on GitHub. For several projects at EclipseSource we are creating REST APIs. I'm involved in most of them and there is one thing that bothers me with every project. That is, testing. I mean, of course we are writing our unit tests first and we mock our...

Read More