Roberto Medrano

When a programmer sets out to construct a business-oriented API, he or she has to strongly consider what data format best fits the company’s needs, as well as the intended end-users. Some formats are more user-friendly than others, which makes them suitable for a consumer (B2C) application.  For a limited B2B interaction, a Web-friendly JSON data transfer format may not be nearly as necessary as in the B2C case. It is instructive for a programmer to fully familiarize him or herself with the pertinent aspects of the available templates before outlining the intended API program.

  • SOAP: SOAP is an acronym for Simple Object Access Protocol. It’s an API format that employs extensible mark-up language (XML) and the familiar hypertext transfer protocol (HTTP) that headlines the address bar of Web-based browsers. The main utility of SOAP championed primarily in B2B interactions is the ability of the language to reach across applications on different servers – hence the HTTP and XML aspects – to enable function calls while a client is operating on material from one server. It provides a link that would otherwise be unavailable, unless the user quits the application, opens another one, copies the desired information, then reopens and pastes – a tedious and inefficient process in the time-constrained business world. SOAP uses the internet to connect them; and is regarded as the more traditional method for doing so, used by big business.

 

  • REST: The Representational State Transfer protocol is much easier to use for Web-based APIs.  It lacks much of the programming language complexity of SOAP. This lack of complexity does have the  drawback of not being suitable for the distributed computing that SOAP counts as its main strength, as well as security issues that have to be dealt with outside of the format, in a sense. None of these drawbacks have had much effect on its rising popularity among API programmers, because the ease of use outstrips them, and developer communities can not only provide abundant promotion for RESTful APIs; they can also supply HTTP-based security through a variety of channels. The ability to communicate across programs using hyperlinks and Web addresses helps REST link multiple interfaces; from the most popular ones like the Facebook API, to some medium-sized business’ application programming interface.  REST is made for the Web. In the age of social media, search marketing and mobile marketing, this gives it a distinct advantage over SOAP. The core of REST’s simplicity comes from the fact that a function call doesn’t need to send the data from the server. It just gives the location via http address in hyperlink format.

To recap, REST is very user-friendly and entirely capable of most of the things a Web-based interaction entails. SOAP tends to be a lot more capable (some would say unnecessarily so, given the B2C engine that currently drives the marketing sphere) but requires a greater level of tools and complexity too involved for the average consumer.

Ultimately, a survey of likely operating systems to be used by the eventual consumers of the API in question will aid the programmer in deciding what language he or she will use to facilitate inter-program communication. Whether the primary use of the API will be for the distributed systems that play a greater role in B2B communications, or for the mostly Web-based interaction experienced in B2C interactions, determines whether SOAP or REST will be the language of expression. After all, there’s a reason why apps from the Mac OSX iTunes don’t work with an Android-based OS, without an as-yet-to-be constructed emulator-equivalent.

Share Button

Add a comment