Groovy on Grails Timesheet Sample Application
In order to try out a complete Grails development/deployment process I’ve developed a simple Timesheet application.
UPDATE 19/05/2011: I’ve now shut down the cloud server running the timesheet application but if you particularly want to see it or want an in depth tutorial, leave a comment and if there’s enough demand I’ll oblige…
On a recent contract I often found myself doing some calculations mid-week in order to see how my week’s hours were shaping up and I noticed other people using home made Excel spreadsheets for this kind of thing too. A Timesheet planner seemed an ideal Grails sample application to test out my skills on from development right up to putting it live on a cloud server. It’s basic and doesn’t even have a concept a user login but it has the core feature of allowing you to enter your start/end times and lunch breaks and displays a running total for the week.
It’s not too hard to break the validation and I’m sure you can think of lots of obvious missing features but it gave me some practical experience in Groovy on Grails Programming using a MySQL database, setting up and securing a Centos server and deploying to Tomcat 7. I hope to be blogging more about Groovy and Grails in the future but for now, here are a few snippets to whet your appetite if you’ve not yet looked at it:
- Grails ~ Rails but in the Java Universe: having developed with Rails before and having a (mostly) Java background I was at home pretty quickly.
- Safe Navigation Operator: day?.lunch will only try to get the value for the day’s lunch field if it is not null. Convenient.
- dayName.capitalize() – “tuesday” becomes “Tuesday”
- It’s very easy to work on your model and Grails/hibernate will update your database schema as you go.
- No need for semi colons, return statements or exception handling (most of the time)!
- All this simplicity (compared to Java) but you can still make use of any Java API should you need to do so.

















I need the timesheet tutorials and want to see how it works, please!!
Thanks,
Hasan Mohiuddin,
0592914629
Hasan
25 Mar 12 at 4:44 pm
Hi Hasan – thanks for your interest. I think starting up the cloud server again probably won’t happen at this time due to cost. However probably more useful would be some code samples and perhaps putting the source in a public GitHub repository – that’s now on my todo list – will keep you posted!
Tim Corrigan
26 Mar 12 at 12:28 pm
Can you pls let me know the location and i am interested to see this application works.
Sree
30 Jun 12 at 10:25 pm
I am also very much interested!
Tom
13 Jul 12 at 8:01 am