SOAP vs REST: A Case of Disruptive Innovation
With the growing adoption of smartphones, the last half of the decade has shown a tremendous increase in the popularity of mobile applications. It is estimated that in 2015, one billion smartphones will be sold and by 2017, $77 billion will be generated from 268 billion downloads. With these types of industry numbers, it becomes clear that mobile application development is not just another revenue generating stream, but a key factor in the success of the business.
What are SOAP and REST?
Thus from a developer’s point of view, it becomes imperative to have a clear understanding of the different approaches that can be adopted to develop a web service. There are two main approaches for mobile development ie. Simple Object Access Protocol (SOAP) and Representational State Transfer (REST). It’s a general tendency to think the two as mutually exclusive, but in fact, they are not since SOAP is a protocol and REST is an architectural style. SOAP works on a standard set of rules based on XML (eg. HTTP) and finds its use in financial, telecommunication and payment gateways services. REST doesn’t employ any additional messaging layer creating a stateless service. It is usually used in social media, web-chat and other mobile services.
Coupling between the client and server is the major distinguishing factor between the two; In SOAP the linkage between client and the server is very rigid and any change from either side deems the contract null, whereas in REST, the protocol is not violated by such changes.
Performance Based Differences
True security requires authorization and integrity over and above authentication and confidentiality. As SOAP is based on standardised Web service security and thus better secured compared to REST which works on HTTP. But REST developers need not get disheartened as generating unique token and validation on each request can be a customised way to enforce user-level authentication.
Server and Network Performance
SOAP-based applications have server side sessions and a stack of different handlers and parsers while REST bears minimal overhead on top of HTTP. It is critical in mobile based applications where the server is connected simultaneously to many devices and a lean mechanism is required. Thus in such cases REST becomes the obvious choice and if you encode your representations in JSON (Furthermore as opposed to XML) you will save many more bytes.
CPU and Battery life
Nowadays smartphones users are tech-savvy and avoid applications which drain their mobile battery. As it has a real business impact if the mobile user can’t complete their work because the device needs to be constantly recharged. JSON is also easier to parse than XML, using less memory and less CPU. The more demands you make of the CPU the quicker you consume battery power and the shorter time you have between recharges. Again REST scores over SOAP in battery life.
As mobile usage grows every day, we should think on the scalability of an application. REST’s property of statelessness simplifies component implementation, improves performance tuning, and increases the scalability of pure server components.
The above discussion suggests growing popularity of REST due to ease of application, efficient use of the server, CPU and battery life. But SOAP is still reliable in terms of security which makes it useful in designing enterprise web applications (B2B) and applications which require payment options such as banking transaction which require security encryption on the data layer. Maruti Techlabs have been using both the technologies effectively. We have used REST in Stripe, Facebook. LinkedIn and Twitter based APIs and SOAP in Salesforce, Sage, Financialforce and eBay based APIs.
Future outlook of Application Program Interface
Going back to the initial reference of ‘Disruptive Innovation’ where an innovation that helps create a new market and value network, and eventually disrupts an existing market and value network (over a few years or decades), displacing an earlier technology. So disruptive innovation allows a new, less skilled community to participate and do new kind of things. This description ideally matches with our topic where REST based applications are easier to make and gaining huge popularity. Much small business and mobile gaming apps can be made using REST by developers with low technical acumen, thus replacing SOAP as the favourable technique. The only thing which prevents SOAP from being outdated is rigid coupling and security it offers. Thus, SOAP vs REST is a case of ‘Disruptive Innovation’ rather than ‘Innovator’s Dilemma’. Both the web services have their own pros and cons, but it seems REST will quickly surpass its counterpart in the coming years.
As we continue to grow into a mobile-centric society, it’s not surprising that mobile apps are at the center of the technology shift. Developing a mobile application can go a long way towards driving your company into the hands of new customers and future business success. You need a good technology partner who understands your needs and gives you a robust mobile application considering all the above aspects. If you are looking for such a reliable partner, please get in touch with Maruti Techlabs.