Wednesday 29 April 2009

Quick Project

During conversation at work today we joked about the need for web app to track lunchtime squash results. I've decided to give this a go (using Google App Engine). I spent 5 minutes thinking about the relationships required and the basic app was created in less time than it takes to start a portal server.

So far I've created 2 domain classes (Player and Game). Basically we want to record the date a game was played, who won and who lost. This was pretty much done with just scaffolding. Ideally we'd like to keep a ladder perhaps sorted by winning percentage. With only 10 minutes of work the basics are there. I'll need to manipulate the views so that dates are more concise and links are by name rather than id. Also I'll need to create a couple of more views (such as the ladder) and a validator to ensure that the winner can't also be the loser!

Not sure how well Google App Engine copes with Grails yet but I believe there are a couple of tutorials out there. This is a pretty simple app so not anticipating any big issues. I'll post progress...

Monday 27 April 2009

The next big thing...

Ok so I'm still working on the grails comp but I've begun to get excited about the next project.. a football tipping site. I know there are heaps of them around the web all ready but I want to make my own with the features that my friends and family want. I think it will be an excellent learning vehicle. And that brings me to my dilemma... what do I use to build it?

Grails is very exciting and produces results fast but I'm a java developer by day and really could use the extra experience developing with Spring and Hibernate. I feel like I'm missing out because at work we use Java 1.4 and therefore I haven't used annotations, enums or any of the new post 1.4 goodness. This might be a good opportunity.

On the other hand, should I give Ruby a go? I've messed with Python before and enjoyed it but haven't touched Django or TurboGears. Dynamic or static language? Which offers the best learning experience? My goal here is to learn and develop my overall programming skills. I have no time limit although before next footy season starts would be good (March 2010).
Do I continue with Grails to cement what I've learned all ready? What would you do? Continue with Grails, go back to Java or try something new? I'm interested in any and all opinions.

Tuesday 21 April 2009

On to CSS

After going all "scorched earth" on the grails comp and basically beginning again from scratch, I've managed to get through the many to many problem. The solution turned out to be much simpler than I'd anticipated (at least with Grails 1.1 anyway). I became confused after reading posts and sites some of which were pre grails 1.1. Anyway a sneak peak at the upcoming Grails in Action (can't wait for the full version!) and all is now good.

With a far degree of smugness I've decided to look at the CSS for the public facing pages. I'll admit to not having any design flair at all so its quite challenging. I've been using Adobe's Kuler to try and get an agreeable colour scheme and initial results are promising. Kuler allows you to upload an image and it picks out complimentary colours from that image. If you're design challenged its really useful.

Wednesday 8 April 2009

Grails Unit and Integration Tests

I was unexpectedly free today and decided to add some tests to the competition project. Initially I thought some nice simple domain class tests would be good. After whipping some up, I ran grails test-app and produced my test report.
However it seems that integration tests take precedence over unit tests as I get clear results even though my unit tests fail:

This would seem to be pretty poor form. I would have hoped to see failures for all tests unit and integration. If anyone has struck this problem before let me know...

Update:After reading the doc's at grails.org I've found that running the tests using grails test-app -unit solves my problem.

Wednesday 1 April 2009

Griffon

I know I haven't posted for a while but I have been plugging away at the Comp code. Mistakes have been made and new solutions uncovered. Its a great learning experience but time is always limited. I have guests about to stay soon so tonight I didn't want to get too involved in something that I can't play with again for a few days. So...

I found that MEAP has published (for free) the first chapter of a new book "Griffon in Action". Belonging to the same family as "Groovy in Action" and "Grails in Action" I'm thinking its also going to be of a high standard. The sample chapter unfortunately only goes into why use Griffon rather than the fulfilling 'dive in' approach of "Grails in Action". I understand the second chapter does this but sadly that's not a free one.

The big upside is the subject. Griffon is yet another framework but is for desktops apps instead of web apps. Totally awesome concept and something that has interested me since Uni. I've played with a few desktop applications before and honestly in Java it seems to be such a chore. Griffon cuts down on the code needed and brings convention to the party. It (Griffon) is still in its infancy (only version 0.1) but usable. Its certainly on the list of things to have a crack at...