OT: Best public interface?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

How would you expose a php based application for general consumption? I
say "OT" because this applies to any back-end, not just php.

So far I have used XML-RPC to present an api that allows data to be
passed back & forth to my application, but it's clunky. I'm thinking of
moving to JSON, so that calls to my app can be embedded into JS.

Any thoughts?

Re: OT: Best public interface?

On Sat, 02 Jan 2010 12:54:37 +0000, Hugh Oxford wrote:

Quoted text here. Click to load it

I'd say it depends on your app's target market.  I know you said "general
consumption", but most apps have a target audience of some sort.  At the
very least you're producing some sort of data that's likely to be more
useful to one type of app than another, so I'd go with whatever fits that

As an example: an API that does some sort of Twitter-related magic is
likely to be useful to the AJAXy/Web 2.0 crowd, and thus JSON would
certainly be a justifiable choice.  An API that handles credit card
processing or financial transactions might be more frequently used by
software written in a language with stronger XML support (such as Java),
thus you might want to go with that.

Personally I like JSON for its simplicity, XML for its flexibility, and
plain old text for its universal "support".  There are scenarios for
which all three make sense, but which one makes sense for your app
depends on the app in question more than anything else.

Just my 0.02 USD.

Robert Tomsick
robert -at- tomsick.net
Free (text) USENET access: http://www.eternal-september.org /

Site Timeline