Migrating an existing Java project for use with Hibernate is a difficult process. And yet I'm not sure if it is worth the work at all.

Some years ago I started a Java project with direct database access using JDBC and SQL. I designed my object model and a relational database schema. Both were optimized independenlty to work optimal in their environment. In order to connect the object world with the relational world, I wrote a clean storage layer, which was responsible for communicating with the database. This worked pretty good. But when Hibernate was becoming more and more popular, I started thinking about migrating to a Hibernate based object mapping.


Continue reading "Experience with a Hibernate migration project"

No Closures for Java 7

Friday, January 9. 2009

Just read the InfoQ news article about the updated Java 7 roadmap.

No closures for Java 7!

This was just due to the fact that the folks are not able to agree on a solution, while Closures are a very very old concept already used in Smalltalk (Blocks) and are an essential concept for modern dynamic languages like Groovy or Ruby.

To me this is prove that either the JSR process needs a major overhaul urgently to become more flexible or the end of Java is near.


Continue reading "No Closures for Java 7"

Service Menus for Subversion and Java Developers

Wednesday, September 17. 2008

I just have posted some service menus for KDE 4.

The service menus for subversion provide quick access to the most common tasks when using subversion. It is aimed to be a little bit like Tortoise SVN for that other "Operating System".

The next set of service menus is aimed for Java developers. Using these service menus you can run Ant and Maven builds, create JAR files from directories or run executable JAR files.

Continue reading "Service Menus for Subversion and Java Developers"

Programmers Usenet 2.0

Tuesday, September 16. 2008

Joel Spolsky and Jeff Atwood have released the first beta version of Stack Overflow. This site provides a great new way to ask programming questions and find or get answers. As Joel explains the current problem:
If you’re very lucky, on the fourth page of the search results, if you have the patience, you find a seven-page discussion with hundreds of replies, of which 25% are spam advertisements posted by bots trying to get googlejuice for timeshares in St. Maarten, yet some of the replies are actually useful, and someone whose name is “Anon Y. Moose” has posted a decent answer, grammatically incorrect though it may be, and which contains a devastating security bug, but this little gem is buried amongst a lot of dreck.
And Stack Overflow tries to solve this problem by leveraging web 2.0 technologies:
Some people propose answers. Others vote on those answers. If you see the right answer, vote it up. If an answer is obviously wrong (or inferior in some way), you vote it down. Very quickly, the best answers bubble to the top. The person who asked the question in the first place also has the ability to designate one answer as the “accepted” answer, but this isn’t required. The accepted answer floats above all the other answers.

Continue reading "Programmers Usenet 2.0"

John O'Hanley wrote a Java World article about Four harmful Java idioms, and how to fix them. In this article he discusses some standard Java idioms that should be changed.

I do not want to comment on the others but on his suggestion to add different prefixes to variables:

  • f for fields
  • a for arguments
  • no prefix for local variables

His example that should prove in his opinion that this is better readable is:

public boolean equals (Object aOther)
{
  if (! (aOther instanceof Range)) return false;
  Range other = (Range) aOther;
  return fStart.equals(other.fStart) && fEnd.equals(other.fEnd);
}

Well I couldn't disagree more with him:


Continue reading "Prefixes for local fields, arguments and fields"

« previous page   (Page 2 of 4, totaling 19 entries) » next page