27 May 2009, 2:05 p.m.

Architecture is a Poor Metaphor for Software Design

I've recently been thinking quite hard about software architecture. Not just about UML diagrams and classical design patterns and other technical gubbins, but more and more about what it really means to be "doing" software architecture, and moreover to be doing it well.

And it seems to me that architecture is actually a very poor metaphor for software design, so this is an attempt to get my thoughts in order on that front.

Posted by Simon Read more »
23 May 2009, 3:05 p.m.

Book Recommendation: 97 Things Every Software Architect Should Know

I'll interrupt this "slow blog month" with a quick book recommendation. I recently picked up a copy of "97 Things Every Software Architect Should Know", edited by Richard Monson-Hafael, and published by O'Reilly, and I think that you should too!

While the title suggests that the target audience might be limited to software architects, I really think that everyone involved with the software development process could benefit from reading the book - from the junior developer just getting started on his or her career, to the visionary technology executive at the top.

"97 Things..." is structured as a collection of ninety-seven pieces, none more than a couple of pages long, by about thirty or so different authors. It's not an especially technical book - there are no UML diagrams or code examples, say. It's more like the collected wisdom of a bunch of people who have been designing and building software for many, many years.

There are a couple of themes that emerge from the essays, both of which rang true with me.

Posted by Simon Read more »
27 Apr 2009, 4:09 p.m.

Some Highlights from TED

You need to know about TED, if you don't already. TED stands for "Technology, Entertainment and Design" and is essentially an annual conference renowned for the quality of its speakers and presentations.

You can't go to TED talks unless you're remarkably eminent - a former US president or Nobel Prizewinner, say - but it is to TED's eternal credit that you can watch hours and hours of video recordings of talks online, for free.

The subject matter is eclectic, to say the least, but the one thing that all the talks have in common is that they are utterly fascinating. It's kind of tricky to pick highlights, and far easier to just dive in and spend hours clicking around. But nevertheless, here are three talks from TED that particularly appealed to me.

Posted by Simon Read more »
23 Apr 2009, 12:13 a.m.

Command-Line Subversion Tutorial, Part 2: Importing, Branching and Merging

In Command-Line Subversion Tutorial, Part 1: The Basics, I covered many of the more common svn commands, and hopefully illustrated a typical SVN workflow.

This time around I'd like to tackle some of the commands involved in managing a project within a Subversion repository, specifically those that you'll need in order to import a project to a repository, and to branch and merge a project's codebase.

Posted by Simon Read more »
20 Apr 2009, 2:32 p.m.

A First Look at the New WURFL API for PHP

About a month ago, the New WURFL API for PHP was officially released. While the code had been available in one form or another for some time, the official release coincided nicely with the early stages of a new project at work, so it seemed like an appropriate time to have a look at the API and see if it was something we wanted to use.

By way of a refresher, WURFL is a "Device Description Repository" - a huge open-source XML-based database of information regarding mobile handsets and their capabilities. I've discussed WURFL in the past, for example here. Prior to this release, the only practical method of querying WURFL in real time from PHP was via a library named Tera-WURFL, which I blogged about here. In fact, both WURFL and Tera-WURFL were covered in an article I wrote for php|architect magazine last year.

We've generally been very happy with Tera-WURFL, but it's always worth considering one's options, so what follows is an overview of my experiences with, and first impressions of the New WURFL API.

Posted by Simon Read more »
10 Apr 2009, 8:38 p.m.

Unit Testing Code which Consumes SOAP Services

One of the trickiest aspects of unit testing or Test Driving an application's code is testing those parts of the system which depend on an external system, such as a database or a SOAP service.

In this post I'll outline an approach to testing a class which happens to communicate with a third-party SOAP service using PHP's built-in SoapClient class. Hopefully, the principles involved will be applicable to the more general case of testing code which relies on an external system.

Posted by Simon Read more »
23 Mar 2009, 11:15 p.m.

Further Adventures as a Student: MST121, MS221 and M255

Back in September of last year, I started studying part-time, for a BSc in Maths, with some computing thrown in. It's now six months since I made that first post, and this is a really, really busy phase of the degree course, so I thought it might be time for an update.

Posted by Simon Read more »
20 Mar 2009, 10:42 p.m.

Command-Line Subversion Tutorial, Part 1: The Basics

I'm constantly surprised by how many experienced developers are completely unfamiliar with using version control - such as Subversion or CVS - from the command line, instead preferring to rely on graphical clients such as TortoiseSVN.

Don't get me wrong - Tortoise has its uses - but I strongly recommend that any professional developer familiarise themselves with command-line version control. It's simpler, quicker and a thousand times more powerful.

In this post I'd like to help those developers out by covering the basics of command-line Subversion usage, via the svn command. I've optimistically named the post "Part 1" in the hope that I'll manage a follow-up post one day, covering more advanced issues such as merging and resolving conflicts. For now though, let's have a look at the basics.

Posted by Simon Read more »
9 Mar 2009, 4:59 p.m.

Adding a Doctype Declaration to a DOMDocument in PHP

I've recently been spending quite a lot of time with PHP's DOM extension, which is extremely useful for both generating and parsing XML.

In this particular case, I'm generating XML, and it's imperative that the XML markup which the code is generating should contain a Doctype declaration (DTD). It isn't hard to do that using DOM, but it did take a little bit of hunting around in the manual and online, so here's a quick overview of how to add a Doctype declaration to a DOMDocument.

Posted by Simon Read more »
1 Mar 2009, 5:44 p.m.

The Many Ways in Which the Yammer API Sucks

A lot of the guys out in our San José office have been using Yammer recently. For the uninitiated, Yammer is a lot like Twitter, but with access controls, making it more suitable for communication within a company.

Yammer exposes an API for developers to hook into, so I thought it would make for a fun Sunday afternoon project to see if I could put together an Opera Panel interface, which - if done right - might double as a mobile Web interface. Unfortunately the Yammer API is awful, so awful that it's basically futile to try to work with it. Here are some of the ways in which the Yammer API sucks.

Posted by Simon Read more »