Wednesday 31 December 2008

Comp 0.1

I've finally got enough of the comp project completed to make a dodgy initial release. I feel I've made enormous progress over the holiday period and the following functionality is in place:
  • users can add an entry to a competition
  • admin can create a competition
  • admin can generate random winners
  • winners are generated for each prize that the competition has
There are still many things to do but this version contains all the basic functions. So far the learning experience has been huge. I've read heaps of articles and a couple of grails books but it wasn't until I actually applied the knowledge that I really started to learn.

In addition to grails/groovy, the other big win for me out of the project so far has been Git. I can't speak highly enough of it and the cool way branches can be created for very little storage cost. I have been creating new branches willy nilly to experiment with different strategies. If things don't work out, I have been able to easily revert to any other version. The low cost comes because Git creates a hash of each file and then references those hashes instead of duplicating files in each new branch. Brilliant really!

Also in other news, I've just been using a plain old text editor (well the quite awesome Textmate) instead of Netbeans so far. Don't get me wrong I like Netbeans but Grails is so simple that I don't really need the Netbeans power at this stage. There is only a beta git plug in for Netbeans too, so in reality even if using Netbeans I would still have been 'gitting' from the command line.

Have a happy and safe New Year everyone, more dev news next year.

Monday 22 December 2008

Competition Progress

After the always pleasing initial progress you make with a Grails project, I thought I'd try branching and setting up my tests. This process was simple using Git however I seem to have made a few mistakes and resorted to my old habits of deleting everything and starting again. This is a n00b's action for sure. After going over old ground I realised that I hadn't needed to start again from scratch. 
Git to the rescue... and now I'm back with my previously half completed project. I think now I will be more judicious with branching and less inclined for scorched earth. 

As far as the project itself, the domain classes have been created and I basically have a site that will let you create a competition, create an entry, generate a winner. My next step is to CRUD prizes. More to follow... we'll after Christmas anyway... Merry Christmas (especially to you Pablo my only confirmed reader)

Saturday 13 December 2008

Git

I have been tinkering with a grails app for fun and was just going to run it on my local box. I decided to show it to a mate and had to cart it into work for a show and tell. It was suggested that I upload the code to GitHub, an online code repo. At first I thought this would be yet another time consuming exercise but it was really simple. To get going all I had to do was create an account, download git (there is an easy OS X installer) and that was pretty much it.
I didn't bother reading the full instructions but it was all really intuitive. Safe to say its all now online and very happy. If you got collaborative code check out GitHub, its awesome. Also if you want a quick and dirty (that's figurative) screencast check Jeff Brown's also excellent screencast.

Finally if you want to have a play on my grails app, feel free to check it out.

Btw the grails app is a competition registration app. Basically its to allow people to sign up to an online competition to win stuff. There's no other activity except registering to win. It has been a good exercise and I was inspired to develop this after listening to those crazy dudes at Grails Podcast who are running this type of competition. I choose to develop in Grails over Java as I want to push my development in that area. (I considered Django but I really like the cross compatibility between Grails and Java [no flame wars I know Groovy is Java]. Besides it would seem wrong to develop a Python web app for the Grails Podcast!).
The app is open source so can be played with by anyone and I welcome any thoughts.