Tuesday, June 23, 2009

Grails: The other side of the coin

coin_2sides.jpgRecently I have become a big fan of Grails.

I think even if you are actually not using the bits of Grails, Grails can provide valuable insights and fresh perspectives in the turgid maze of Java EE development.

At the gr8conf it was stated, that Groovy and Grails are in the transition from the early adoption phase to mainstream technology.

Becoming a mainstream technology is a dangerous beast, which can brings dark secrets into the light.

Grails seems currently to be in a fight with this beast, as some critics has been voiced on the mailing lists. This is nicely summarized in the following post:
Are Bugs in Grails Hurting Adoption?

I think critics are essential for a product to become mature. It shows that there are actually people out there that care, and that the community is not just a bunch of zealots.
The crucial question is now how Grails will deal with the criticism.

Monday, June 22, 2009

Running Canoo WebTest 3.0 on OS X

I am running Mac OS X 10.5.7

I upgraded from Canoo WebTest 2.6 to 3.0.

2.6 was running ok, but 3.0 failed with the following exception:

BUILD FAILED /Applications/CanooWebTest_3_0/webtest.xml:234: The following error occurred while executing this line: /Users/jbandi/Documents/Testcode/bookstore/webtest/tests/allTests.xml:5: The following error occurred while executing this line: /Users/jbandi/Documents/Testcode/bookstore/webtest/tests/search.xml:9: java.lang.NoSuchMethodError: org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/String;Ljava/lang/Class;)I

After some time spent on Google, I found the following solution:

Copy the xalan-2.7.0.jar into /Library/Java/Extensions/


You can get this jar from the WebTest distribution or from here.

This worked for me, although it leaves a fishy smell... I don't like messing in the guts of the system ...

The reason is probably, that the new release of HtmlUnit now uses standard DOM tools for evaluating XPath. And the Java distribution of OS X does not ship with xalan. Or my classpath was somehow messed up ... If anybody knows the details, please enlighten me ...

Wednesday, June 17, 2009

IE vs. Firefox - Microsoft has to be desperate?

If this is not a joke, I don't know what is ...



Well, we all know how David versus Goliath ended ... though it is not bequeathed that Goliath went for a blow below the belt line ;-)

Tuesday, June 16, 2009

New Book by Adam Bien: Real World Java EE Patterns Rethinking Best Practices

Adam Bien has published his new book: Real World Java EE Patterns Rethinking Best Practices.

I am eager to get a copy of this book. Adam is a tireless advocate for pushing Java EE development further.

I hope this book is a big step in proving that Java EE development can be much easier and much more lightweight than we are experiencing it today in the trenches of enterprise IT.

Adams statement is: "Java EE 5 and 6 are a revolution and not just an evolution".
I think this insight has not yet found its way into the mindset of most Java EE architects. 250px-Neo.jpg Old-school heavyweight concepts from the ages of EJB2 still tantalize a lot of the Java enterprise projects.

To break free, radical steps are necessary. Best-practices have to be rethought, antiqued patterns have to be killed...

People are usually afraid of revolutions ... I hope Adam can be our saviour ;-)



BTW: If you are living in or near Switzerland, Adam will hold a workshop at the Workshoptage of ch/open. See you there!

Monday, June 15, 2009

Update for Software Testing Workshop

My semi-annual testing workshop at SWS is approaching. In the theoretical part I want to incorporate some insights I picked up recently:

From Aslak Hellesøys presentation "Executable User Stories with RSpec and BDD" (slides):

Where errors are introduced (according to CHAOS report):

Sample chart


This should put developer testing in the big picture of software development.
  • Developer testing is traditionally focussing on code, maybe also design.
  • Techniques like BDD, FIT and Acceptance Testing can also help to takle errors in the requirements.
  • Validation (in contrast to verification) can also help to uncover problems in design and requirements. Validation can be accomplished prior to the creation of the software artifacts.


  • From Jay Fields talk "Developer Testing: Welcome to the Beta Test":

    Most important characteristics of good unit tests:
  • Readable
  • Reliable
  • Performant

  • Reasons to write tests:
  • Design
  • Protect against regression
  • Achieve sign-off
  • Increase customer interaction
  • Document the system
  • Refactor confidently
  • Ensure the system works correctly

  • Unit testing suggestions:
  • Setup methods are evil
  • Test one thing at a time
  • Maintainability > DRY
  • Test names are comments
  • Zero or one mock per test
  • Expect literals
  • Create test data builders

  • Wednesday, June 10, 2009

    Join the Groovy & Grails User Group Switzerland

    If you are interested in Groovy and Grails and you are living in Switzerland, you should join the Groovy Grails User Group Switzerland on Xing.

    Thanks Silvio for appointing me co-moderator of this group. I hope I can help the group to grow.

    Tuesday, June 9, 2009

    My pitch for Grails in Action

    http://manning.com/gsmith/gsmith_cover150.jpg Today my copy of Grails in Action arrived.

    I did a review for this book, so Manning was so kind to send me a free copy.
    Unfortunately the publisher decided not to include the quote I provided, so I will print it here:

    This book should be a must read for every Java enterprise developer! Grails shows a pragmatic lightweight approach to the Java EE platform which is eye-opening and will change your perspective on Java enterprise projects.

    I really believe that learning Grails can provide an interesting new perspective on Java EE development.
    But I think there are two common misconceptions about Grails:

  • Grails is not about code generation. Even though grails provides possibilities for generating skeleton artifacts, thats just a minor convenience feature. You can use the power of Grails without even using the code-generators even once (As a proof you can watch Graeme Rochers webinar "Bulding Twitter in 40 minutes").
  • Grails is not reinventing the wheel. Grails builds on top of proven Java frameworks (Spring, Hibernate and SiteMesh being the most prominent ones, but many more integrations are available). Grails is an abstraction layer over those frameworks and aims to provide a seamless integration of those frameworks to form a homogenous web application stack. By default Grails imposes proven best practices for web development. All this is wrapped with the elegance of the Groovy language.
    But Grails is not a one-way street. It is always possible to fall back to plain Java and therefore leverage the rich ecosystem which exists on the Java platform. JMS, REST, Spring Security, JCaptcha, RSS, OpenId, LADAP, jQuery, Axis2, Compass ... you name it, Grails provides it ...

  • Related Posts Plugin for WordPress, Blogger...