12 January 2010

Advanced RIA architecture with GWT - Part I (first overview)

Rich Internet Applications (RIA) are not really a new thing, but currently there are just a couple of web pages out there, using a real RIA architecture. So it's new enough to write a series of articles about creating a good RIA architecture with the Google Web Toolkit. I'm sure some of the patterns and concepts are also portable to other frameworks.

16 November 2009

Grails GWT Google Group

There are lots of comments with questions below my Grails / GWT tutorial. Many people are also asking questions about GWT on the Grails mailing list. To move Grails / GWT related questions to single public place there's a Grails GWT Google Group now.
Come in and join, if you're interested in using GWT with Grails.

15 September 2009

Cool things with Grails URL mapping

In Grails you have a lot of nice features for doing web development. One of them is URL mapping with the link tag.
Grails default mapping is this:
"/$controller/$action?/$id?" {}
This will map the URL 'http:localhost:8080/myapp/book/show/1' to the action show in the BookController class. To create such links you can use the link tag like this:
<g:link controller="book" action="show" id="book.id">
  ${book.title}
</g:link>
Sure this is the standard way. But now lets change the URL mapping by replacing the default mapping:
"/$book/$id?"(controller: "book", action: "show")
This will tell Grails to map the URL 'http:localhost:8080/myapp/book/1' to the same show action as above, but what's happening with our link?
It's stil working! Grails knows, that URLs, which are pointing to BookControllers's show action have to be of the declared structure and thus, the link tag will create a URL like 'http:localhost:8080/myapp/book/1'.

Ok, let's go on. What else can we do with this?
By default the URL 'http:localhost:8080/myapp/book/list?year=2009' will point to the list action of BookController and the URL parameter year will be available with
params.year
in the action. To create this URL you can use the link tag again:
<g:link controller="book" action="list" params="[year: "2009"]">
  Books released in 2009
</g:link>
Now let's change our mapping again by adding:
"/$books/$year?"(controller: "book", action: "list")
Well, now the above link will create the URL 'http:localhost:8080/myapp/books/2009' and everything else will stil work as expected.

23 July 2009

The company zoo

Today it's raining and it was a natural choice for a little butterfly to come into my office and sit down on a dry paper. And now she's still sitting there and sitting and sitting ...


Ohh I forgot, her name is Mathilda.

20 June 2009

GWT best practices

A great talk from Google IO 2009 by Ray Ryan:




It comes with two great ideas, Dependency Injection for GWT and a pattern called MVP/EventBus.
Sounds pretty interesting.

Mercurial and moving of files.

A problem, when you're using Mercurial forversioning is, that Mercurial only knows about files and there paths. This results in two types of trouble.
First you cannot commit an empty directory. It will be just ignored. To solve his, create a hidden empty file (one with a dot at the beginning of the name like '.hidden') and commit it.
Second you cannot just rename, or move a file. Mercurial will think, that there is a new file and the old one isn't available anymore and that fact crashes your commit. To solve this, Mercurial provides the command 'mv' (like the UNIX command). Just type
hg mv path/to/my/SourceFile path/to/my/DestFile
into your Terminal and you're moving or renaming it. Mercurial will then understand, that both files are the same.

Git vs Mercurial and the fight of SCMs

In the past I was using Subversion as a SCM (Source Control Managment) and Google's project hosting is still using it, so Google Code was allways a good place for hosting some open source code.
But now the world has changed. I recognized the idea of distributed SCM (DSCM) first, when I heard about github.com and I gave it try. The big benefits are, that you can work offline and everyone has his own repository with full versioning and so on. The result for my own work is, that I do much more commits and of cause smaller ones. Just after doing a cupple of them, I push my changes to the server.

But What is the right system and right hoster?


This is a very interesting question and it forced me to test a little bit around. And I found a cupple of benefits on each system and each hoster. But in the end I decided to stay on Google Code and use Mercurial.
The reasons are pretty simple:
  • Mercurial isn't that different from Git as I expected.
  • Social comopents are not so interesting for a project hosting.
  • Google has a much better code and history browsing than github.
  • Extisting Subversion projects can be converted including history.
So my desicision was clear. I mooved the DuckWiki repo to Google Code, and will use Google Code and Mercurial in the future.

If you're thinking about Mercurial and Git, there is another point, you might be interested in, which I didn't care about so much:
While Git only works over SSH, Mercurial provides you the choice between SSH (makes maybe more sence in a Company's internal network) and HTTP (is much nicer, if you're repo should be open for annonymous users).

19 June 2009

GORM + JPA now available

I was waiting for this feature so long and now it's there:
GORM works with any JPA provider not just with Hibernate.

The first release of the plugin was just anounced by Graeme.

This is realy great news since the DuckWiki project can now make use of it. As a result, DuckWiki should work on each Java EE 5 app server without the need of having it's own (Hibernate) persistence layer.
As a key feature the awesome dynamic finder methods, provided by GORM, are also working, except on Google App Engine (look at this bug).

11 June 2009

Social coding and Twitter

A nice feature on github.com is, that you can add your Twitter credencials to a project and all commits to this projects will be twittered. That's a nice way to be notified on changes. The other part is, that comments on your commits get a new sence in being Twitter posts.
If you would like to be notified on DuckWiki just follow duckwiki.

10 June 2009

Problems with Safari 4, scrolling and the colors of the page

Just right after the keynode I installed Safari 4 on my Mac. I've allready tested the beta for a cupple of weeks and was surprised about the speed. But after the the installation of the final release I recognized, that the color was fading while scrolling. In the worst case I got a black/white page. This problem is posted in an Apple Support Discussion.
The solution provided in the discussion seams to work for me.
If you'll get this problem, open Disk-Utility app, select your HD and press Restoring Permissions. Wait some minutes, restart Safari and that's it.