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:
- RichUI
Simple to use with great gsp tag integration. Requires no knowledge of JavaScript. Great for novices and pros alike. - GrailsUI
Not as easy to use as the RichUI plugin, but well documented and provides some great components and good gsp tag integration. - 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. - 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?

What about ZK?