The Pope Is Dead ::

Main Navigation

The pope is dead. Long live the pope! Just another blog about web development. If you’re interested in web stuff you may find this blog useful.

blog latest entries

DBDeploy - Get your database under control

Keeping track of your database schema is always problematic, recently I have started using DBDeploy to help track changes to our database under version control.

We use DBDeploy as part of our build process now and so far its working very well, still waiting for those anti-patterns to occur somewhere down the line though hehe but that life aye...

The basic principle of DBDeploy is that you first create a baseline, this forms the base from which all changes are built upon. Then we use delta files to sequentially apply changes, these changes are then logged in a special changelog table in the schema.

For what I was doing I already had a schema so I went about creating a set of sql scripts that would create the baseline for me, this was achieved by using mysqldump. If you read the mysqldump docs you should be able to get it to produce exactly what you want. For me I wanted it to create files that were not schema specific so I could import that baseline into any schema, e.g. mysql -umute -p dash_trunk < baseline.sql, this way I can have multiple versions of my db for my branches etc... I also added in all the default data that the system required, my users, acl permissions etc.

With that all done, I could then do.

  • Create a new schema in mysql
  • Import the baseline
  • Run build and have DBDeploy add any changes!

Magic a reliable way to setup my database, and good for testing too...

The Delta Files

Yeah they are a bit like X-Files but with less aliens... So a delta file contains changes/additions that you make to your schema, so they are simply just a bunch of sql statements. One important thing that I do is not to add deltas in branches, DBDeploy runs deltas in sequence 1,2,3... so if you merge a branch into the trunk say and there is 3.sql and 3.sql it will merge it and potentially cause you all sorts of mischief!

Test Data

Now once I had done all this I had a pretty empty application, so now I need test data! 24dash has a massive 50k articles and now I have none what todo??? Well I didn't really come up with a very easy solution, again mysqldump did a lot of the work for me and I got a cron going to export a load of stuff nightly for me. Which is fine until you are working on something that makes changes to the tables and you cant import it anymore! I am still working on a way to fix this for now we just have to think what we are doing before we need to import test data!

Conclusion

Personally I am really impressed with DBDeploy so far its working perfectly and I feel much happier knowing what my DB is doing, if you do use something like DBDeploy I would say you must use local build before commit and seriously consider using continuous integration! ( its all about developer communication )

Posted on 23/06/2008 at 04:37 PM

Clickheat - User experience testing

Recently we installed Clickheat on 24dash.com, mainly out of curiosity to start with but the results have been very interesting.

As a developer I always want to know how the user base interact with my applications, I spend a lot of time thinking about where menu’s should go and what language to use to help users progress quickly through the application functions. After all the user is key to any application!

In comes Clickheat. Clickheat creates a visual heat map of where users click on the screen and shows hot-spots of the most clicked areas, this is very useful for see if your interface is constructed correctly.

At the moment we are holding off changing anything on 24dash until we have a good few months of data, plus we just changed the main dashboard so changing things straight away would probably cause more problems than it fixes.

From looking at the current data we can see that people like to click on text and the titles ( ) seem to do very well. Also links with icons get more clicks, and there is a general trend for grouping of click in the top left of the screen ( Probably because english is read left to right ). Another interesting observation is that though there are less clicks below the fold of the page people do scroll down and do click on relevant data. A good example of this is the popular content block on the 24dash.com homepage which gets many clicks!

As a developer I have found this data very useful and would recommend installing it and giving it a go.

Clickheat Project Page

Posted on 20/06/2008 at 05:01 PM

W00t Mootools 1.2 released

Yay Mootools 1.2 has been released check it out:

http://blog.mootools.net/2008/6/12/mootools-1-2-it-s-official

Posted on 16/06/2008 at 07:25 PM

about me

I am a web developer/ project manager from Birmingham Uk, currently I am working for inflight productions as a technical project manager. Hopefully I will be posting here as regularly as possible on my experiences with various technologies that I am using and maybe the odd random thing..

the book