Why?
I'm the only active developer, and I'm totally lame.
But What About My Current Grails App?
First of all, I will still monitor the Grails user mailing list for questions about GrailsUI and reply as I have time to help out.
Also, there may be some GrailsUI users out there thinking they made the wrong decision about which RIA plugin to install, but read below before you get upset with yourself (or me). The bottom line is this: If you are making a considerably complex RIA application using JavaScript, you will be better off hand-coding it with JavaScript than using a plugin as an RIA platform.
My Thoughts About GrailsUI
Initial roles of GrailsUI:
- Simple AJAX widget provider
- Platform for RIA frontend
GrailsUI does #1 pretty well, in that it abstracts the complexity of creating AJAX widgets away from the Grails developer. You don't have to write any JavaScript to get a basic widget working, but if necessary you can write some JavaScript to interact with the widget on the page, thus adding functionality.
Although it seems like GrailsUI does #2 well as well, this becomes largely unmaintainable as the codebase increases, and especially as the importance of performance increases.
It turns out that GrailsUI is a horrible thing to build an entire RIA codebase on. In fact, if the design goals of a RIA front-end are extensive, I believe the code should be written entirely by hand.
It is just like putting down the WYSIWYG editor and hand-coding your UI. GrailsUI might provide a great way to layout some basic AJAX stuff, but as soon as you get into any non-trivial JavaScript work, it breaks down in an unmaintainable heap.
I do not think the concept of an RIA platform plugin for Grails is a bad idea, however. I just think that I lacked the wisdom and foresight to create that platform with GrailsUI.
There are several maintainability issues within the JavaScript and markup that GrailsUI creates, namely:
- Global JavaScript variables. They are all over the place. I would not be surprised if a lot of the GrailsUI bugs are because of this.
- JavaScript liberally sprinkled throughout the markup, and generated in a very dynamic way. This really complicates things.
- Scripts all load at the top of the page.
- Core GrailsUI JS lib augments native JavaScript object (String)
- JSON responses are manually eval()'ed instead of going through a proper JSON parser
- There are 0 JavaScript tests, and minimal Groovy tests
It is entirely possible to address each of these issues in a rewrite of GrailsUI, and in fact I was planning on doing this with GrailsUI 2.0. But this is a major task.
All that being said, there are a lot of GrailsUI users, and many of them have thanked me for this plugin, saying it has made their lives easier. Like I said, I think a plugin like this has a place in the Grails ecosystem, but I think it's primary role should be that of a shortcut to AJAX widget goodness, no so much shortcut to an AJAX platform. It can also be useful as a stop-gap measure to get a UI in place before major front-end resources are brought in to cleanup and re-implement.
Thank you
Thanks to all of you who use GrailsUI, for making it one of the most popular Grails plugins. Especially thank all of you who submitted bugs and attached patches, and especially Daniel Honig, who was instrumental in getting the first version of GrailsUI off the ground.
Would You Like to Take the Torch?
Awesome. I've already established a group for it with a planning page for GrailsUI 2.0, and there are actually members. This message is getting posted there as well. What the GrailsUI project really needs is a leader with a good amount of JavaScript and Grails experience -- and the motivation and time to dedicate to an open source project.
In Summary
This is one of those "if I knew then what I know now" situations. When I started GrailsUI, I had very little experience with JavaScript, so I did a lot things wrong. Now that I know JavaScript really well, I cringe when I look over the GrailsUI codebase. I would love to take six months and completely re-write GrailsUI, and if anyone is willing to pay me to do so, I would be happy to. But now that I'm working at Yahoo!, my plate is full of JavaScript work already, and I am choosing to use my spare time for other endeavers.
If you would like to contribute, please contact me or join the dev group.
Also, here is the Grails user mailing list discussion on this topic.