Ever mindful of our clients' wishes, we've begun designing a REST interface. We've been trying to adopt the best practices of API providers out there, and we're planning to provide client libraries for the most popular languages as well.
This will take us a good few months, designing objects and operations, implementing the service, creating code samples, etc. At the end of this process, a PHP developer, for example, will be able to send a fax through the REST API by using this code:
<?php
require('Interfax.php');
$client = new InterfaxClient($username, $password, $faxnumber, $texttofax, $filetype);
$result = $client->SendFax;
echo $result;
?>
instead of this code: <?php
$client = new SoapClient("http://ws.interfax.net/dfs.asmx?wsdl");
$params->Username = $username;
$params->Password = $password;
$params->FaxNumber = $faxnumber;
$params->Data = $texttofax ;
$params->FileType = $filetype;
$result = $client->SendCharFax($params);
echo $result->SendCharFaxResult;
?>
which is, effectively, the same. The complexity of interfacing to the API is hidden in a custom library instead of a SOAP library. Which brings me to ask myself "what's the point"? Where does the advantage of having a REST interface come into play?