Friday, April 11, 2008

It's not agile, but it did help

I was asked to build 'a quick page of links to articles' and suspected that what I was being asked for wasn't really what was required. The Agile folk at the last GeekUp meeting convinced me that their iterative way of doing things was worth considering so I decided to give a slightly different approach a try.

The end product was surprisingly different to what was first requested. It also worked far better than we had hoped it might.

The original request was centred around the interface and went something along the lines of "I want a page that links to these articles, the section headings need to go here and here and remember to put a logo here," accompanied by the traditional scribbling on the back of a fax.

I grabbed a skeletal php/Smarty system and started considering the unspecified back end. The choice seemed to be between a static system (a pile of HTML files) and a dynamic system (one big Smarty template containing all the articles with a php script to switch on the appropriate bit).

The articles were all tiny, just a couple of paragraphs, and not numerous (about a dozen or so to begin with), so a database looked unhelpful. It seems sensible to store HTML in HTML files. I built one big Smarty template containing all the articles and went back to the customer.

At this point we have a system which completely fulfils their requirements. In the process of testing it they learnt something about what they needed rather than wanted, and realised that someone was going to have to maintain this thing - and that was going to be them. Their focus moved immediately from the end user interface to the maintenance back end.

Our solution stored each article in it's own file. Conventionally, we started each file with a H2 tag containing the article title which was parsed to use as link text when dynamically creating the index page.

- separated content from presentation
- separated presentation from processing
- zero training for maintainers
- zero training for users
- the development cycle happened rapidly (<20 hours to delivery)
- we solved problems that we didn't even know we had

A nice mod would be giving the maintainer something like the TinyMCE HTML editor to use to edit the articles and a little control panel to add and delete them.

No comments: