Friday, January 9, 2009

Grails comes through

Update, moved to Just Thinking: Code

I am responsible for tracking the members of my local SCA group that fight (see here and here for explanations).  The previous marshal (the person responsible) had tracked the information in a Excel spreadsheet.  That's not a bad way of doing it, but come one, I'm a Java programmer.  Tracking information in a spreadsheet just isn't my way of doing things.

I had moved all the information into a MySql database.  I had been using Groovy scripts to generate the reports I needed to turn in quarterly.  The scripts would generate an html page with the report, and then I would use Mac OS X's ability to create PDF's to create something I could email in.

Recently I used Grails to create a quick front-end for editing the information.  Took all of an afternoon because I didn't like the generated pages.  (I could have had an entire CRUD application in minutes if I did like the generated pages).  I had modified the Groovy scripts to run under Grails to give me my report.  This basically involved creating a gsp page instead of a html builder.

Then I found the Jasper Plugin.  That was not completely clean to setup and the concepts of designing the pages gave me enough headaches, I almost gave up.  But I persisted and now have the ability to create the reports I need directly in PDF and Excel (and other formats if I need), although I'm still trying to create an Excel report that spans only one page, but have the PDF span multiple pages.

It only took me a few man-hours to create the whole thing.  If the objective was to allow others to use the app, I would need a few more man-hours to clean it up, but it would fine for me as is.  I will have to ask the next marshal if he wants to use this before I spend any time cleaning it up.

Once Griffon includes GORM, I intend on porting the entire application from Grails to Griffon, because I think this would be a better standalone application than a webapp.  I would like to get it to run on a USB drive, using hsqldb as the database instead of MySQL.  Then the entire application and database can be passed to the next marshal as a self-contained USB drive.

Wednesday, January 7, 2009

Updating FreeBSD to 7.1

This last weekend I updated my home server to FreeBSD 7.1.  Over the last year I've used freebsd-update to update it to BETA1, RC1, and RC2.  Going from BETA1 to anything else was kind of a pain because freebsd-update looks online for files from the current system during the upgrade, and they pulled the BETA files offline when they put out the RC files.  So I had to use a command to convince freebsd-update that I was using a different version to get it to run.

The last update from RC2 to RELEASE was a breeze.  Basically 3 commands and a reboot before the last command.  Kudos to the developer of freebsd-update.  I've liked FreeBSD for some time, and this just makes it that much better.

Some background on my environment.  I use FreeBSD as a headless server on an old Dell machine (almost 10 years old and it's still running with only a hard drive change during that time).  I use OpenSolaris on a Gateway laptop and have a old iMac for the family computer.

I wanted OpenSolaris on my development machine (the laptop) because I do a lot of Java programming at home and hoped that would be a good environment for that.  For Java development it has been fantastic.  For an operating system for this laptop, not so much.  I can't use the wireless network, audio is kinda flaky, and the machine overheats a lot (I think that is more the laptop's issue, not OpenSolaris', but OpenSolaris never throttles the processor, so I have to have a fan on it the whole time, a big house fan).  However, after using VirtualBox, zfs, and the Java environment on OpenSolaris, I like it for a development machine.

One issue I find somewhat funny is I cannot get the latest version of Gnucash to run on OpenSolaris, so I run Gnucash on the FreeBSD box and export the display to the laptop.  Works well, but it is a little slow (remember the 'BSD box is almost 10 years old).  A side benefit of this setup is I can run it from the iMac as well.