codecentric

Again! – 10 Tips on Java Debugging with Eclipse

You probably know some post of this kind. “n things about debugging” is a popular topic. For a good reason! I guess that I spent about 1 hour per day debugging my applications. That’s quite a lot time. This makes it even more important to know all the handy features, that makes your life easier and helps you to safe some time. And it justifies another post on this topic!
 
(read more…)

Daniel Reuter

 

I love Spring – create your own RSS feed with java

This blog is about a small private project, the topic fits to the company blog. The key message of this blog: I love Spring.

And I love to read news in my Google Reader. I want to put as much informations into this channel. I like it, because it is asynchronous and I can pull informations, if I have some free time. Unfortunately not every information is provided via a RSS or Atom-Feed. So I was looking into a lot of converter-solutions which fits my needs. Some examples: FreeMyFeed, mmmmail.com or a solution for a twitter-to-rss-conversion. But nothing was really suitable. Then I thought: HEY, you are a programmer! Don’t think about it, do it!!

(read more…)

Daniel Reuter

 

Compiler aware internationalization (I18N) with Java ResourceBundle

Like in almost every project we had to implement a internationalization and localization mechanism. We started to use Java’s standard ResourceBundle-concept. But after some weeks we had property-files which didn’t really fit to the used localization-keys in our application. This is a common problem which is due to refactoring.

Inspired by the internationalization-feature in Google’s Web Toolkit we wanted to create a solution, which can be tracked by the compiler. GWT is using its own compiler to create the client-javascript. And there is a separate compilation for every Locale. So it is very easy for GWT to create javascript-code to get the localized messages. The used javascript-code is selected by GWT on the client side based on the user’s Locale. All you have to do is to implement the Messages-interface and use it in your application. The solution is very convenient. For example, you can use the java-reference-search in your IDE and the GWT-Compiler even fails, if you miss to declare a translation in your property-files for a method in the Messages-Interface.

Our Goal: Instead of

Messages.getString("example");

we want to use

Messages.get().example();

(read more…)

Daniel Reuter