Monday, July 19, 2010

Comparing Grails and Tapestry

Hi,
   Was going through some details of Tapestry to findout whats good/bad in it. Currently I am working with Grails based application for almost 1.5 Yrs. But believe me I would try to be very unbiased during this comparision.

Note: All the comments are my based on my personal likes and dislikes, so please excuse if you think otherway round ;). Your comments are welcome if you want to correct me or share your own experiences.

  Basically Tapestry and Grails both are  frameworks which gives you Convention Over Configuration platform where you can focus on your problem domain rather then settingup the environements for developement like Spring & Spring MVC configuration, Hibernate configuation etc.
  But  following are reasons why I still prefer Grails over Tapestry:

1. Tapestry is focused on UI development with Model based architecture in mind. Even though it says minimum configuration and more over convention, but didn't like the way we hare binding UI with backend as shown at http://joshuajava.wordpress.com/2008/09/11/a-glimpse-of-wicket-14-and-tapestry-5/ when we compare it with GRAILS. I feel GRAILS is much more mature in many ways.
   a.  We will still have to manage all the Hibernate Mappings (annotations) by hand. Though we do it in GRAILS in GORM way, but somehow GORM ways makes it look much readable and maintainable.

2. Like Grails there is TRAILS as well. But dont see TRAILS group really active as there is hardly in Traction there. ex. look at the JIRA summary page: http://jira.codehaus.org/browse/TRAILS#selectedTab=com.atlassian.jira.plugin.system.project%3Asummary-panel

    Trails: http://today.java.net/pub/a/today/2005/06/23/trails.html

3. Code in Tapestry still looks much more Verbose than in Grails. I mean we have to write relatively bigger code than in Grails.

4. I feels there are just ample of Grails plugin there are reusable components compared to whats are available for Tapestry based apps.

5. Environment based application behavior support in Grails is just too good to have it. Grails support to create custom environment as well that too without doing complex coding.

6. Its just too easy to write JSP taglib and template based apps which also changes relatively frequently in Grails and it can be use very extensively when you are developing a site which needs pages which gets data from multiple places and you dont want to hardwire your controller with all data.

     So basically I am not saying Tapestry is Bad. Its is good when someone is working on old frameworks like Struts/Spring only. But as a developer I would say, one someone starts working on Grails, would not prefer writing code in Tapestry atleast. Grails just so addictive ;) by its design and flexiblility :p

Some links for Tapestry:
http://tapestryjava.blogspot.com/
http://skillsmatter.com/podcast/java-jee/tapestry-5-java-power-scripting-ease
http://howardlewisship.com/screencasts/tap5-classreload-oct2006/tap5-classreload-oct2006.html
http://howardlewisship.com/screencasts/actionlink-oct2006/actionlink-oct2006.html
http://blog.taragana.com/index.php/archive/move-over-rails-we-have-grails-trails-and-now-sails/
http://moatazanany.wordpress.com/2008/09/13/boost-your-productivity-using-apache-tapestry/

Grails:
http://stateyourbizness.blogspot.com/2008/09/pessimistic-locking-with-grails.html

Grails Intro by Scott Davis:
http://www.youtube.com/watch?v=RqHwwAWXcbE
http://www.youtube.com/watch?v=gkaaOXGomzg

http://www.viddler.com/explore/oredev/videos/29/
http://naleid.com/blog/2009/10/01/batch-import-performance-with-grails-and-mysql/
http://sacharya.com/transactions-in-grails/

No comments: