This blog has been archived. Our writing has moved to makandra cards.
The blog of , a Ruby on Rails development team

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.

Growing Rails Applications in Practice
Check out our e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Recent posts

Our address:
makandra GmbH
Werner-von-Siemens-Str. 6
86159 Augsburg
Germany
Contact us:
+49 821 58866 180
info@makandra.de
Commercial register court:
Augsburg Municipal Court
Register number:
HRB 24202
Sales tax identification number:
DE243555898
Chief executive officers:
Henning Koch
Thomas Eisenbarth