Archive for May, 2009

First groovy experiences

May 19th, 2009 1 comment

Currently I’m staying at copenhagen at the GR8Conf (Grooy, Grails and Griffon confernence). In the talk of the day by Guillaume Laforge about DSLs he showed the following code:

class CurrencyAmount {
    Number amount
    String currency
    String toString() { "$amount $currency" }

Number.metaClass.getEuros {-> 
new CurrencyAmount(amount:delegate, currency:"EUR")}

//Output: 10 EUR

It is really interesting to see where in the java world the language evolvement happend. It’s a bit similiar (I’m careful here, because I do not know groovy very well) to the extension methods in .Net.

For me groovy and grails are very interesting technologies, so I will stay up to date.

Categories: Groovy Tags:

When to use stored procedures

May 13th, 2009 8 comments

Recently I discussed with a colleague when to use stored procedures. As exptected it was quite a religious conversation. A few days later I found the following screencast:
The Pros and Cons of Stored Procedures

Based on the discussion and the screencast I tried to summarize my Pros and Cons:


  • Layering
  • Low-level-Security
  • Protect queries from changing data-access technologies (jdbc, hibernate, toplink, dbcommands, linq to sql, entity framework, nhibernate, etc…)
  • Ivory-Tower-Feature: changing database during project does nearly never happen
  • Coarse-grained Interface approach
  • Performance
  • DBA could tune the queries in a procedure
  • From an integration view, logic could be reuse by several applications


  • If all logic is in the database, there is a danger that the communication is too chatty (to many calls to the database-server), what is too expensive from a performance perspective
  • Security-Chaos (Too much security-rules on different layers)
  • If you are using the database just as an dump datastore
  • Use the database for what it is strong in it (managing data, not logic)
  • Developer has to maintain the logic in two different languages (java or c# and t-sql)
  • Hard to test (slow, friction with current frameworks, anti-pattern for unit-tests (use of a slow infrastructure))
  • Danger of duplicity of logic (in c# and in t-sql)
  • Bad refactoring support
  • DBA could change the logic in a procedure
  • From an integration view, there could be side-effects, if a stored procedure is used by several applications and one application change the logic

And what is the conclusion? Surprise, surprise: It depends. You shouldn’t use stored procedures for anything and you shouldn’t categorically reject them.
I tend to use stored procedures for performance issues and try to avoid to use them to implement business logic.


My ASP.NET MVC presentation at work

May 12th, 2009 No comments

Yesterday I gave my ASP.NET MVC presentation at an internal techtalk event (which I organized). At this event two colleges presented also jQuery and PowerShell, which were very interesting presentations.
You could download my presentation (in german) with the sample application (the idea of a contactmanager is from the official mvc page).

Presentation: ASP.NET MVC presentation
Sample application: Contactmanager

Categories: .NET, New technology Tags:

Registered the domain

May 8th, 2009 1 comment

I read recently the article of martin fowler about alpha-geek again. Then I checked various links which contains the keyword alpha geek. I was surprised that the domain was free, so I couldn’t resist to register it for me.

Martin writes about alpha geeks: “Alpha geeks are typically experimenting with technology. In software development they are the people who first try new languages and frameworks. They are also inclined to build things to solve their problems if there isn’t a viable alternative out there. Although they can be wedded to a particular platform, most of them will use what makes them most effective, hopping between platforms.” I fully agree with this and I’m thinking that I’m fitting quite well in this description. Also because my blog is about different framworks, like Java or .Net.

Categories: Private Tags: