The Kaptain on … stuff

07 Mar, 2009

Playing with the new Grails :)

Posted by: TheKaptain In: Development

The Groovy and Grails scene has been busy lately, with new versions of both dropping within the last few weeks.  Seems like the perfect time to get familiar with both, so I’ve started building a new Grails application.

I play cards with a bunch of friends fairly regularly and it would be nice to track the wins/losses online where everyone can watch and comment (smack talk welcomed).  We generally play a variation of canasta with 4 to 6 players.
There’s a fairly simple scoring system involved so all we really need to track is a Player and a Position for each game. Slightly complicating the domain is that, depending on the number of players, games are either played with a partner or solo.

Goals and Means

  • secure access: using the Stark security plugin
  • taggability: easy tagging of Games using the Taggable plugin
  • searchability: full text searching courtesy of  compass, lucene and the Searchable plugin
  • richUI: incorporating GUI widgets with GrailsUI – to make everything pretty don’t you know.
  • mobile compatability: after all, what use is there in owning an iPhone if you don’t program apps you can use it with? For this the iUI plugin to provide parallel access to views from a mobile phone
  • dynamic application settings: using the Settings plugin to enable dynamic configuration of system properties in an unobtrusive fashion
  • test data availability: using the Fixtures plugin to keep cruft out of Bootstrap.groovy and to support easy testing

So far…

Installing the latest Grails, creating a new project using IntelliJ and installing the plugins I wanted took all of about 15 minutes! Having configured similar features in regular Java apps many times, I look back and wish I was using Grails at the time.  The ease of installation and configuration is really pretty astounding. The ability to make a domain class lucene searchable is a one liner. Similary, making things taggable is just implementing an interface. Sigh… if only everything was that easy.

Next steps

  • domain model for Game and related entities
  • prettify the views
Reblog this post [with Zemanta]

No Responses to "Playing with the new Grails :)"

Comment Form