Groovy/Grails as an application solution

I’ve been having some interesting conversations with a colleague concerning the Groovy/Grails stack as a solution for web-based applications. Although I’ve become a Groovy believer, it doesn’t necessarily mean I’ve embraced Grails as a strategy for rapid application development. I certainly understand the attraction, but using one doesn’t necessarily mean you have to use both.

A word about dynamic languages. I know the controversy surrounding this debate but while I have some reservations, I’ve never been categorically opposed to dynamic languages.  I’ve used ActionScript in the past, have fooled around with PHP, am cool with Javascript and like I said, I’ve become a Groovy convert.  I would advocate using it in any JVM-based app.

As far as Grails, there are many positives. In addition to being great for quick prototypes, it’s also great for situations where plug ins already afford a great degree of desired functionality, or super fast development in scenarios without a lot of disparity in functionality between different facets of the application.

The opinions I’ve formed recently are related to my own admittedly somewhat limited experience with the framework and the discussions I’ve had with people and presenters I met at the recent SpringOne 2GX conference. Since Grails is a convention heavy framework, components need to be built within a pre-defined pattern to get the full benefit.  It infers things about what you’re doing based on that.  Some of the behavior is a bit mysterious and is not clearly documented. If you find you need to get outside of the pattern you have to do the work you’d have to do with a configuration-based framework anyway.

The impressions and general feedback I’ve received on Grails seems to follow this general pattern.

  • It can scale with effort and some sacrifices in terms of clarity and organization.
  • It lacks a way to clearly create a separation of concerns (see above).
  • It is convention heavy which can make for a bit steeper learning curve than some alternatives.
  • It can ultimately become unmanageable over time no matter how careful you are.
  • To mitigate some of these created your business components using the Grails-plugin architecture to modularize the application. Kenneth Liu gave a great presentation on how to approach this at the conference.

Anyway, since the conventions established with Grails is not one that is based on a knowledge of any particular business domain, components can get glommed together in the Grails pattern without regard for reuse or organization.  Controllers in particular can quickly become monolithic.  The business domain tends to reflect the physical implementation of the database because of the nature of GORM.  It can certainly work no matter the scenario but there are tradeoffs and I think if things get to that point it’s certainly worth considering a more traditional configuration-based framework.  By the way, when I talk “scale” here I mean in terms of complexity rather than performance.

To be fair, some people have had pretty good success using Grails for simple or medium complexity applications. Still, if I were to start a complex green field app right now, I’d most likely want to use Spring 3.x with a heavy dose of Groovy for the business logic and use Roo to help with the quick start goodness that is a Grails strength.  You’d get the benefit of Groovy within the context of a highly configurable, well understood, and widely used application framework.

Unlock sequence for Coleman Horizon & Spectrum spas

We have an older Coleman Horizon 208 spa which we hadn’t used in a while and recently got back into working condition. After inadvertently locking the panel, I realized I had forgotten how to unlock the darn thing and searching on google showed that apparently other people have run into this too. Anyway, I thought I’d share the solution here just in case it might be useful for someone.

This works for both the panel lock and temperature lock features.

To unlock either, press the following 3 buttons in rapid sequence. Program, then Mode, then Set Down. The manual says you have 2 seconds but the timing actually appears to be quicker which is the issue I was having.

Looking silly for a good cause

I have a friend who recently decided to get a hair cut. This may not sound all that unusual, but in this case, it was the first venture under the stylist’s scissors in almost 3 years. Yet there was a very important reason he decided to do it. He decided to trade in his biker meets OpenGL developer style-sense after watching a television news report about the Locks of Love organization, which helps financially disadvantaged children who suffer from long-term medical hair loss. These children generally cannot wear artificial hair pieces due to the chemicals in the manufacturing process; it can create reactions for their sometimes compromised immune systems. The kids CAN wear natural hair pieces on the other hand, but the problem here is one of expense as natural wigs are very expensive.

Locks of Love takes donations of hair of sufficient length from people willing to donate, then works with manufacturers to create the natural hair pieces these kids need and provides them at little or no cost.

Recently, I decided to take the plunge and donate myself. The only problem is that, unlike my friend, my hair has (at least since my late high school days) never attained a length greater than about an inch. So starting last October, I abandoned my monthly trip to the barber and (as David Crosby once sang) “let my freak flag fly”. I expect to accumulate the requisite 16 inches or so over the course of the next two years.

In the meantime, in reply to the curious looks and comments that seem to be accumulating faster than the hair on top of my head, I’ve been jokingly replying “hey, I’m a software developer…I’m SUPPOSED to have a pony tail.”

They seem to understand.

Homeless pets

My wife and I are big advocates and supporters of animal shelters and pet rescues. Two we support in particular are located on the First Coast. One (which is organized and run by friends of ours, Janet Sydor and Gloria Conner of St. Augustine Florida) no longer has a dedicated web site but some information is available here.

We also support and volunteer for Pet Rescue North here in Jacksonville.

Both organizations are no kill shelters that are worthy of any support you can see fit to give them.