I worked about two hours extra yesterday on the project when I got home. The goal, as I said, was to draw the mock-ups for the two other ‘add’ screen, Player and Result. I did that, and actually implemented the Player mock up along with half of the Result mock up. It went quite fast as the foundation was done. I finished the ‘Add Result’ -view on Wednesday morning in the next three hours. That is probably the most complicated view my software will have. At this point I had all add views done and only need views to view data anymore. As I had no real persistence I decided to close the GUI project and start working on the domain project.
First look on db4o
db4o is a data storage framework that works in an object oriented way. The instruction text looked very promising. You don’t need any annotations or XML configurations and it will accept any object for persisting. Basically you just do this to store something:
ObjectContainer db = Db4oEmbedded.openFile("path/to/my/file/");
try{ db.store(myObject) }
finally { db.close(); }
That looks very easy. Almost too simple to be true. But it was that simple. I had persisted my first objects with only three lines of coding. I downloaded db4o (with maven), read up on how to use it and implemented the store and ‘list all’ functions for all my entities in three hours. Very nifty! The only downside with db4o I see right now is it’s licence, which is GPL, which means that I have to decide to either publish all my code as open source or find an alternative to db4o before I publish my project in any way (i.e. make it freely usable on the web, give it to friends for personal use etc.). Got to think about what to do.
I also worked along with the GUI project by making a page to view information about the players in the system. It’s basically just a table with all players in the system and when you choose one, you’ll see an info grid on that player. Now it still only shows the name of that player. I’ll make similar views on tracks and rounds tomorrow and a nifty home page showing info of the logged in user. Then there is just some polish and adding a graph or two left. Probably will make it in time. Maybe.
I’ve clocked somewhere around 28 hours on this project with an additional four of five hours on the course doing something else than the project (introduction and such). I’m starting to notice that the 11-12 hour days are starting to wear me out but my inspiration in this project, and the inspiration to succeed will still push me forward through the last day of coding.