views:

142

answers:

3

Hi Folks,

I've just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites).

I'm thinking about the API for developers - at the moment you can send URLs with SOAP to the service, but I am not sure if this is a good solution. What is the best practice for such a service? REST? SOAP? Both?

+4  A: 

i'd limit myself to rest, because the whole "API" is just two calls (return the long url for short and vice versa).

stereofrog
A: 

In this situation I'd say REST all the way, SOAP is overkill for this and gets you nothing other than an increase in network load. The api is simple enough for a textual description to suffice although you might want to look at WADL

Bedwyr Humphreys
+1  A: 

Definitely REST - the overhead for SOAP is unnecessary unless you're building a particularly secure enterprise URL shortening service (which I think is probably an oxymoron). The bit.ly API is pretty good and worth checking out.

Ben Werdmuller