Saturday, June 16, 2012

Teaching myself Groovy and Grails

I've just finished up my first web introduction to Groovy and Grails. It's a very interesting development platform, and one that holds a lot of promise for future portal and web-app development at my day-job.

One of the variants I have seen is, what is the most efficient method to provide database connectivity between a Groovy/Grails app and a database server?

I've seen two examples:
1. Using a data model to define the database, and use the data model to pull data into your app as needed. I imagine this is the most-often used method(?)
2. Using a hard-coded db query in the control file to manually set exactly what data is being pulled for a single-task-centric application. For example, an app that is meant to only display a single piece of information about a user, like "Balance Due", "Meals left on your Board Plan", "Final grades from last semester".

I need to do some more investigation myself into the "best practice" method of implementing database queries, but I am open to hear any comments on benefit/costs of using either strategies above in Groovy/Grails.

No comments:

Post a Comment