J2EE vs Grails stitch up or honest mistakes?

Posted by: on Jun 22, 2007 | 4 Comments

At JavaOne there was a session that is now online comparing Rails, Grails and J2EE. They say some good stuff about all three, but one can’t help but feel – unsurprisingly perhaps – that J2EE comes out smelling of roses rather unfairly.

I hope that the presenters, Damien Cooke and Tom Daly of Sun Microsystems, Inc. can get in touch with the Grails team to confirm how they ran these tests that supposedly show Grails using a huge amount of CPU compared to Rails and J2EE.

After all, we have run benchmarks that seem to be fair against Rails, and Grails throughput is much better in almost all cases. So at a basic level this cannot support the high Grails CPU usage vs Rails.

This makes me think they ran grails with "grails run-app" which runs grails in Jetty with loads of extra code to support dynamic reloading and compilation in development mode. If they did this, they should have executed "grails war" (which they know about, says it elsewhere) and run it in Tomcat/Glassfish to compare with J2EE.

There are so many typos in the document you can’t help but wonder about the quality of work involved. They call Groovy a "JavaScript" programming language. They show Grails with source code examples inline making things look complicated, and then show 4 simple bullet points for creating a CRUD J2EE application (in what universe is this?).

They say that one of the "problems" with Grails is that its made up of lots of other bits of tech – Hibernate, Spring, SiteMesh etc. Of course they would say this, but they are in denial that these are actually the best of breed APIs out there as opposed to the awful EJB, JSP, JSF gumph. They also say you have to configure all this stuff. Hmm, I think they haven’t tried convention over configuration at all.

Then there are things like "Not clear how to regenerate if you have made changes to the controller/views". There’s nothing to do! Reload!

Pah, oh well. Damien and Tom, if you want to get in touch and give us precise details of how you did your Grails testing we’d like to help check it was a fair comparison :)

4 Comments

  1. Andy Peters
    June 25, 2007

    Looks like Sun really knows how to represent their customers.

    A javascript language? What the heck does that even mean? Should I defend Javascript or Grails here? Arogant comments like that

    Why is Sun trying to make developers (their customers) leave their product?

    I wasn’t at JavaOne, but is embarrassing to be represented by people who have come out of 8 year long hibernation rock.

    Reply
  2. Pablo
    June 26, 2007

    Hi Marc,

    you are right on most points (typpos and Groovy inlined code), but I think I understand what they mean by “not clear how to regenerate…”

    They seem to be saying that when you change a view or controller yourself, and then you change the model and want to regenerate the controller and views to reflect it, it will overwrite the changes you had already made to them . I’ve been hit by that problem before, but in an earlier version of Grails, and haven’t retested it since… I don’t know what do you have to say about it…

    Best regards,
    Pablo.

    Reply
  3. Marc Palmer
    June 27, 2007

    Pablo – there is no problem if you use dynamic scaffolding, it will just do it for you. There is no need to generate scaffolding views unless you want to customize them. Then you’re on your own but its trivial to see from the GSP files how to add more fields etc.

    Reply
  4. Moe
    August 13, 2009

    Marc, is there any good counter comparison presentation or similar online? Writing a paper and I don’t really want to use this document, because of the clear issues you mention with it, other than that it’s also from 2007.

    - Moe

    Reply

Leave a Reply