01 November 2008

Groovy for Java Testing

One thing I like so much on YouTube is the mass of cool videos of talks, provided there. So have a look to this cool video:



It gives a little introduction to Groovy, it's integration to Java and it's awesome usabillity as a language for testing your Java code.
The speaker is Andres Almiray and you'll find his own blog here:
Andres Almiray's Weblog

16 July 2008

Lotus Notes 8.0.1 on Ubuntu Hardy Heron and the Mozilla problem

I use Lotus Notes 8.0.1 on my workstation, but on Hardy Heron I got a stupid problem with the Firefox 3.
I know, that Ubuntu currently isn't supported to run Lotus Notes on, but as my favorite OS, I tried to do it.
A nice introduction can be found here:
http://www.linuxart.de/index.php/archives/4

But there is still one problem: The Mozilla problem!
If you try to open a HTML email or open anything else, which uses the embedded SWT browser, you'll get the message: MOZILLA_FIVE_HOME is set set to /usr/lib/xulrunner-addons, which isn't a Firefox directory. The correct directory would be /usr/lib/xulrunner.
To fix this, I put a shell script into /etc/X11/Xsession.d/:


sudo touch /etc/X11/Xsession.d/200-mozilla-five

sudo gedit /etc/X11/Xsession.d/200-mozilla-five

Put the following code into your script:

#!/bin/bash

export MOZILLA_FIVE_HOME=/usr/lib/xulrunner

After restarting the X-server, Notes 8.0.1 will show you embedded HTML as expected.

13 July 2008

Google Toolbar on Ubuntu Hardy Heron

I love the Google Toolbar, because it allows me to use Google's bookmark service embedded to my browser. So I can use the toolbar on a Mac, Windows or Linux machine and have my bookmarks everywhere I am.
But with the cool new version 3 of my favorite browser Firefox the toolbar stopped working. Firefox crashed after installing (and disabling compatibility test in Firefox ;-)).
Now a new version is available and the Toolbar is back to my Firefox :-)
But on Ubuntu there is still a problem with the bookmarks. To fix it, just type the following into your terminal:

sudo apt-get install libxul-dev libstdc++5 gcc-4.2 libstdc++6

Than reinstall the toolbar, if you allready tried without success. Now your bookmarks should work even on Ubuntu :-)

02 July 2008

Spring MVC Error Handling

A typical problem in applications is to handle errors. In a Spring MVC based web app it is very easy, to create good error handling. A nice introduction can be found here:
http://developingdeveloper.wordpress.com/2008/02/20/handling-exceptions-in-spring-mvc-part-1/

Thanks
Josh

12 June 2008

Things the world need

I've just seen a nice new offer from Apple.
A realy cool feature to make your iPhone 3G complete.

Just check it out:
http://gizmodo.com/5015395/apple-introduces-iphone-3g-videoconferencing-kit-zomg

Being back in training

I didn't like sport so much, till I tried running some years ago. Now I've mapped my route:



Größere Kartenansicht

The cool thing is, Google Maps shows you how long the route is. In this case it is about 10.43 miles or 16.78 km.
That's a little bit more than I expected.

05 June 2008

Grails/GWT Tutorial I - The first steps.

After someone was asking for a basic tutorial and samle application for using the Grails GWT plugin on the Grails mailing list, I've just written one.
You can read it under http://code.google.com/p/derjanandhisblog/wiki/GWTGrailsTutorial.
It should show you, how to create a domain model, a service for RPC calls and a very basic GWT client, which calls data from the Grails app and displays it.

Hopefully I'll find enough time to extend the tutorial and the application in the next weeks, to make it real book store ;-)

22 May 2008

Grails is only Java EE with Spring

Grails is defintivly a cool framework for developing nice Java EE web apps. you can do a lot of tasks with just one step and the rest ist automatically done by Grails.
But using your existing Java code in a Grails application is no problem. Grails is based on Spring and Groovy and thus there are some easy ways to embbed Java code to your app.
  1. You can create a normal Grails controller or service and import your Java classes the normal way. This works pretty easy, if you're developing your app mainly with Groovy.
  2. If your app is allready based on Spring and thus provides allready Spring services, you can embbed'em directly and reference them in your Grails controller or services.
The second way can easyly be done, using some XML for configuration, but there is also the Groovy way to do, by using Grails' Spring Bean Builder.
To use it, you can put some Groovy code to the PROJECT_HOME/grails-app/conf/spring/resources.groovy file.
The following code shows you an example resources.groovy file:
import com.duckmaps.server.imagerendering.services.ImageServiceImpl

beans = {

imageService(ImageServiceImpl) {bean ->
bean.scope = "session"
}

}
Here you're seeing, that a bean with name imageService and the class ImageServiceImpl is defined. By setting the property scope to session, Spring instantiates this class for each session. It is important to put the import statement to the top. If you forget it, your code won't work.
Referencing this bean is the same as XML declared beans. Just put a
def imageService
to your controller and Grails will inject it like a normal Grails controller.

Notes Conversation View

One of the many innovations, brought to me by Gmail, is the conversation view, what means, that mails with the same subject will be shown as a conversation and thus you will get all your mails for a conversation just by scrolling your window down.
With Lotus Notes 8 IBM brought this idea into Notes. It requires at least a Lotus Domino 8 Server and an update of your mail database to the Notes 8 template. Than you can activate it by selecting conversation from the show menu at the top right corner of your mail view.
After opening a mail, you can select conversation from the display menu on top of your mail. This brings a list of all mails, which belong to the same conversation, to the top of your mail and you can open them by double clicking it. This is not as comfortable and cool like in Gmail, but you'll get a quick way to open other mails from the conversation.
But one thing I don't understand is this conversation list. It has a fixed size. If you've got just one mail in your conversation, you'll have a big free area on top of your screen. That's not very efficient.
On my MacBook with this small wide screen it takes a lot space, like you can see:

19 May 2008

Firebug and Firefox 3 Beta 5

After installing Firefox 3 beta 5 I had a lot of trouble with the Google Toolbar. After disabling the check for Extensions, Firefox didn't start anymore.
Now I fixed the problem by removing Google Toolbar, but an Add-on I really need is Firebug. For web development, there is no better tool for debugging your page.
Unfortunately the current version of Firebug doesn't support Firefox 3. But instead of the Google Toolbar it works after disabling compatibility check.
Or better it works pretty fine on my Mac and on a Windows XP machine, but it fails on my Ubuntu Hardy Heron machine, where Firefox 3 is the default browser.


Firebug on Firefox 3 RC1 (Mac OS X)


But thanks to Ubuntu team there is a great solution. You can install Firebug as a package from the Ubuntu repositories. This version of Firebug works great in Firefox 3 beta 5 in Ubuntu.