Which Grails Rich Client Plugin is the Best?

There is a plethora of rich client plugins available for Grails (25 and counting).  Many developers and designers often find themselves overwhelmed by the sheer number of choices available to them.  So which one is the best?

First, let me state that this article is focused only on available AJAX solutions which may be used to enhance a traditional website.  I am not taking into consideration more heavy weight and all encompassing solutions like Flex, Silverlight, GWT or JavaFX.  This article is also targeted at developers new to Grails that prefer to avoid delving to deeply into JavaScript intricacies.

Prototype/Scriptaculous

By default, Grails ships with the Prototype and Scriptaculous libraries.  Technically they're not plugins (cut me some slack), but when used together, they are fully capable of providing users with a satisfying rich client experience.  Prototype is a popular JavaScript framework and Scriptaculous is a visual effects library built on top of it.  Both Prototype and Scriptaculous surged in popularity with their inclusion in the Ruby on Rails framework.

Pros
  • Included by default in Grails
  • Popular framework with documented API and help available online
  • Prototype's core functionality is moderately easy to use.  Please note, Scriptaculous has a much shorter learning curve than Prototype.
  • Good community support.  Many third party components are freely available.
Cons
  • Documentation is lacking in detail and, other than the API, can be hard to find
  • No longer the "leader".  Often playing catchup to other frameworks.
  • Learning curve is steeper than other frameworks

Prototype is a very solid JavaScript framework and Scriptaculous provides some nice effects.  When developing "AJAX-ified" plugins for Grails, you'll most certainly want to use Prototype so as not to impose additional dependencies upon developers.

The first thing you'll notice, however, when visiting the Prototype project website, is that it's difficult to find addons (plugins) or components written on top of Prototype.  There is no central repository provided and few useful links made available.  If you want to find additional Prototype components, Google is your best option.  To me, this lack of an "all encompassing Prototype portal" is the most frustrating part of the Prototype experience.  I spent most of my time searching for solutions rather than implementing them.  Prototype has great functionality, and it is very popular, but for anything beyond the standard fair, you're better off looking elsewhere.

GrailsUI

The GrailsUI Plugin is built upon the YUI (Yahoo! UI) JavaScript library and the Bubbling YUI library extension.  First released in October of 2008, the GrailsUI Plugin benefits from the support of SpringSource developers and the completeness of the YUI library.  It boasts gsp tags for ten of YUI's most popular components.  The YUI library itself was started in 2005 by Thomas Sha and has grown steadily in popularity since its release.

Pros
  • Integrated gsp tag support for ten YUI components
  • Extensive documentation on both the GrailsUI Plugin wiki page as well as the YUI home page
  • SpringSource developer involvement
Cons
  • Not all available YUI components have equivalent gsp tag implementations
  • Of those YUI components with gsp tags, not all features are supported(i.e. data table inline cell editing)
  • Limited third party YUI components available

GrailsUI is a great entry in the Rich Client plugin arena.  It has a lot of things going for it including internal developer support from SpringSource, the quality of the YUI library, and gsp integration.  The YUI library provides many standard components and, if you search hard enough, you will find some nice third party components which you may like to use in one of your projects.

RichUI

First released in January 2008 by Andreas Schmitt, the RichUI Plugin provides access to 21 AJAX components via gsp tags.  Some of the components are built upon Yahoo! YUI while others leverage functionality provided by Prototype.  The nice thing about the this plugin is that you need not worry at all about the underlying JavaScript.  Whether the component you wish to use is built upon YUI or Prototype, it doesn't really matter.

Pros
  • Provides implementation of 21 rich client components
  • Extensive gsp tag integration
  • Good documentation
Cons
  • Inclusion of multiple, underlying JavaScript frameworks may lead to conflicts with other plugins

RichUI is a comprehensive, easy to use plugin.  It was the first rich client plugin I used with Grails, and it allowed me to get an autocomplete text box up and running within minutes.  If the components you need for your website are supplied by the RichUI plugin, by all means, install it and use it.  If you notice JavaScript conflicts or a desired piece of functionality is not available, look elsewhere.

jQuery

jQuery is a lightweight JavaScript framework first released in January 2006 by John Resig.  The jQuery plugin RC1 was first released in October of 2008.  It's now on it's third iteration, supports the latest jQuery library (v1.3.2 as of this writing), and integrates with Grails' AJAX tags (i.e. remoteLink, remoteFunction, etc.).

Pros
  • Extensive documentation with examples
  • Large community
  • Large library of components, the largest of any existing JavaScript framework
  • Comprehensive project website providing access to hundreds of components (jQuery calls the plugins)
  • Straight forward, easy to use syntax
Cons
  • No gsp tag integration beyond the Grails defaults
  • Requires cursory knowledge of jQuery API, syntax, and JavaScript to use effectively

It's important to note that the jQuery plugin provides no gsp tag integration other than for the AJAX tags included within the Grails' framework.  Effective use of this plugin requires some knowledge of the jQuery syntax and a basic knowledge of JavaScript.  The big payoff with jQuery is  the sheer number of high quality plugins available for use with the framework.  A little work learning the framework upfront will provide a big payoff.  Quite simply, I feel it is the bling in Web 2.0.

Conclusion

So, which rich client plugin is the best?  Which one should you use for your project?  Believe it or not, I'm not going to cop out and give an "it depends on your needs" kind of answer.  I'm going to pick one.  In fact, I pick... drum roll please... the RichUI Plugin!  Here's how I rank them, in the order you should try them:

  1. RichUI
    Simple to use with great gsp tag integration.  Requires no knowledge of JavaScript.  Great for novices and pros alike.
  2. GrailsUI
    Not as easy to use as the RichUI plugin, but well documented and provides some great components and good gsp tag integration.
  3. jQuery
    This is the plugin to use if you're comfortable with JavaScript and want to learn jQuery.  It's uses are unlimited and I highly recommend it for those developers not intimidated by JavaScript.
  4. Prototype/Scriptaculous
    Use this if you are unwilling or unable to include alternative JavaScript frameworks in your project.  It's not as easy to use as jQuery, but it has a large community and documentation is available.

What's your favorite rich client plugin?

Comments:

What about ZK?

by Ray on March 19, 2009 at 11:55 AM CDT
Thank you very much for this evaluation. As a beginner I strongly need such piece of informations. I was just searching for Pros and Cons of the various rich client plugins... I wonder what you think about the ZK-Plugin? Thanks, Ray

Mr

by Leonid on March 20, 2009 at 4:19 AM CDT
Thanks! Very helpful article.

Great Article

by John Adelus on April 13, 2009 at 9:50 PM CDT
Great summary. Very useful. Thanks!

one of the best

by Wanderson Santos on April 29, 2009 at 2:56 PM CDT
one of the best articles about Grails and AJAX. thanks!

Cheers

by Sean Tindale on May 28, 2009 at 11:43 PM CDT
Thanks alot, I think you just saved me a couple of days work!

what about Dojo?

by Juan Verel on July 24, 2009 at 4:52 AM CDT
What about Dojo? It seems powerfull and a I've read about its integration with Grails in the Graeme Rocher's book. Don't you think it deserves a chance to comment its pros and cons?

Dojo

by Dean Del Ponte on July 24, 2009 at 4:29 PM CDT
I didn't mention Dojo in the post because I have no personal experience with it. Learning it is definitely on my 'to do' list.

Dojo Forms

by Marcel Overdijk on August 13, 2009 at 1:41 PM CDT
Check out my blog post about using Dojo for rich forms: http://marceloverdijk.blogspot.com/2009/08/grails-w-dojo-enabled-forms.html

great post

by Hitesh Bagchi on October 28, 2009 at 11:30 PM CDT
Thanks for the great post. Very helpful

comparison of Grails UI and Rich UI

by Joshua Davis on November 9, 2009 at 8:45 AM CST
I have been using GrailsUI for a while with some great success. I have noticed some information about the Rich UI plugin, is available, but the documentation available for Yahoo UI is much more. My question is, if I have already invested time and energy to build on top of Grails UI does it make sense to start with Rich UI?

Awesome!

by Reiner Saddey on June 20, 2010 at 9:14 AM CDT
Hi Dean, thanks you for this in-depth and splendid side-by-side comparison revealing key facts at a glance. And yes, although I'm a strong jQuery fan, I'll recommend RichUI to my colleagues to wet their feet. I'd wish there were more posts like yours, that does not advertise a one-size-fits-all verdict, but gives the reader a chance to get smarter. Regards, Reiner
Subject*
Name*
Comment*