|Tech Jobs | Forum|
Meerkat: An Open Service APIby Rael Dornfest
Editor's note: Meerkat predated the popularity of syndication, feed services, and feed readers. Now that other groups are providing this service, we have removed Meerkat in favor of their better solutions. We maintain these articles for the sense of historical interest.
You want to know where the future is? No, not plastics. The future, my friends, is Web APIs.
I'm not talking here about Web applications (or "Weblications") themselves, but their public interfaces, those parts of themselves they choose to share.
An API (application program interface) is the public interface provided by an application for communication with external applications and programmers. This interface can be as simple as a set of supported parameters/arguments or as advanced as specific services (also known as methods or functions) that may be called remotely.
Let's bring this definition home a little -- those of you who get the drift can skip on down to Open Service. Think of yourself as an application -- some of you might find this harder than others :) Your inner workings are hidden from the outside world; everything that goes on in your brain is private, known only to you. You do, however, provide interfaces to the outside world: your five (or six) senses. So what, then, would be your API? Perhaps you're a short-order chef. The cafe's menu provides a list of the dishes you can prepare -- your available "functions" or "methods." This menu serves as your basic API. Diners (external applications, if you will) request that you run certain methods to produce their breakfast. In addition, they may request that you hold the cheese or scramble those eggs -- these parameters or arguments provide further detail to the methods called.
The APIs du jour are focused on the following three acronyms: XML, HTTP, and RPC. The exchanged data is marked up in XML ("eXtensible Markup Language"). The mechanism used to transfer this data over the Internet is HTTP ("HyperText Transfer Protocol") -- yes, the same protocol used to transfer Web documents from servers to your Web browser. RPCs ("Remote Procedure Calls") are full-blown methods or functions that may be remotely requested of an application.
XML-RPC is a class of RPC utilizing XML to communicate between servers and applications. A new XML-RPC protocol you might have heard mentioned quite a bit in the technology news recently is SOAP, a joint proposal by Developmentor, Microsoft, and Userland.
There's been considerable attention of late given to the wonders and power of Open Source. Not much is said, however, about the array of Open Services out there that are every bit as valuable as source code. Brian Behlendorf, President of the Apache Software Foundation and Founder and CTO of Collab.Net, a company that provides tools and services for Open Source development, writes: "I think it's fine to have a world where open and closed source software speak - by far the most important thing is that the protocols and APIs be stable and open and free from encumberance, that the software source code is open is secondary." (Editor's note: Collab.Net is affiliated with O'Reilly & Associates.) Open APIs are the lifeblood of the Web developer. Whether such interfaces are simply a side effect of the way in which the application is written or intentionally left open for public use, you'd be amazed at how they're used.
Open services are the building blocks behind home-brewed scripts, modules, and full-blown Weblications. Here are a few examples:
Fling open the gates!
"OK, I'm inspired! How do I open my Weblication up?" Glad you asked.
Don't be embarassed if your code's a little messy -- nobody's going to see it. If you think your application isn't of any particular use, think again! If you found it necessary to create it, chances are somebody else will find it invaluable. No API is too simple or too small; even a door slightly ajar is better than one triple-bolted with a "Beware of Pointy-Toothed Rabbit!" sign emblazoned across it.
Copyright © 2000-2006 OReilly Media, Inc. All Rights Reserved.
All trademarks and registered trademarks appearing on the O'Reilly Network are the property of their respective owners.
For problems or assistance with this site, email