Dónal
Dónal

Reputation: 187539

Grails: manage static data

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?

Upvotes: 2

Views: 661

Answers (1)

Dave Klein
Dave Klein

Reputation: 207

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

Upvotes: 2

Related Questions