Marrying systems the hard way

Occasionally you will feel pressed to connect your code to a closed system that offers no API for machine-to-machine interaction. Inevitably a plan will hatch, proposing to solve the problem with brute force: "We are going to poll the closed system every minute and screenscrape their HTML."

Doubts regarding the solution's fragility are swiftly dispelled: "The adapter code will be easy enough. We will simply patch our code whenever they update theirs. This should take us a few minutes per month tops!"

While going down that road might be worth the rewards, doing so requires substantial commitment on your part. The web is riddled with abandoned projects promising to bolt an API onto a closed system. For a while they delivered on their promise, but eventually the maintainer lost interest. And when that monthly patch didn't come, the adapter broke forever.

The next time you feel tempted to marry two systems the hard way, try asking your software vendor for a proper API. Using tools like HTTP, JSON or Atom, a simple API can often be hacked together in an afternoon. Your vendor might happily accomodate you in exchange for your continued business.

When we launched our job board for German web developers last year, several employment sites asked for a machine-readable interface to our data. Building the requested feeds would only take us a few minutes, so we agreed to do it. Today these sites are our number one source of traffic.

You can follow any response to this post through the Atom feed.


Sun, 06 Jun 2010 13:56:00 GMT

by henning