Welcome to dan-martin.net

This is the website of Dan Martin, a Leeds-based web application builder primarily focussed on PHP (Symfony2) and Javascript.

My latest posts:

11 Nov 2014 Logger Aware Services

Like any good developer, when building PHP applications I aim to minimise the amount of code residing in controllers by moving it into appropriate service classes with only the required dependencies injected in. Inside these services I very often find that I would like to log something. The most correct......

29 Apr 2014 Using a time service to aid testing

A problem which has cropped up numerous times in projects I've worked on is that of testing code which uses the current time, or some variant thereof, such as an audit logger for example. Consider the following code: class Logger { function log($message) { $logRecord = new LogRecord(); $logRecord->setTime(new \DateTime());......

22 Apr 2014 Pontoon with Mithril

Mithril is a new, lightweight and fast MVC framework for front-end javascript. It looks like it could be a good alternative to something like Angular and it certainly seems easier to work with. To try it out, I've been building a simple version of the card game "pontoon" and I've......

12 Apr 2014 Rebuilding the site

Having set up my website nearly four years ago and left it alone ever since, I decided it was probably time to do something about it. In place of the old static site I have a new one built with Jekyll and hosted with Github Pages. I'm aiming to update......