views:

216

answers:

1

Hi,

I'm looking for a good solution for managing static data in a Grails app, i.e. data in infrequently changing tables such as a list of countries.

My requirements are:

  1. Should be easy to internationalize the data
  2. Should provide a means of loading the static data into the database (e.g. from an XML file) when running the unit/integration tests
  3. Should provide a means of synchronizing the static data with the database when starting the server
  4. Should provide a taglib for displaying the static data (e.g. list of countries)
  5. Should provide a view for manually viewing/changing the static data

The lookups and ref code plugins both attempt to solve this problem. Does anyone have experience using these plugins, or are there other options?

+2  A: 

I wrote about the lookups plugin in the May issue of GroovyMag. (http://groovymag.com) It will handle requirements 1, 4 and 5. I don't think there's anything out there that would do all 5, but the other requirements shouldn't be very difficult to implement. Perhaps you could get the source to one of these existing plugins and extend it. Sounds like a fun project.

Dave

Dave Klein
I'm a groovymag subscriber so I'll check out your article - thanks.Are you sure lookups doesn't also load the data into the DB? The docs give the impression that it does.
Don