Drupal Statistics on Steroids

The statistics collected by Drupal‘s builtin statistics module is rather limited and there are no facilities to create nice graphs or in other ways manipulate the collected data. On the other hand there are a lot of great and free web tracker services out there which let you gather statistics on your visitors and then query that data in various ways. Today, I integrated one such service, StatCounter, with the Drupal based web site you are looking at right now. Continue reading

jMock-solid Testing

Some time ago I started using jMock to create mock objects in my unit tests at work. If you haven’t heard of mock objects before it’s really quite simple — mock objects are used during unit testing as stand-ins for those objects the class you’re testing interacts with. So when you unit test a class in your application’s service layer which depends on a DAO, instead of using the real DAO you would use at runtime you use a mock object which implements the DAO interface. To the class under test this mock object will look as if it was a real DAO implementation. Continue reading