Imagine if every PhD dissertation resulted in something that changed the world asks SmartBear Software. The hugely developer-centric company is known for its products that work for code review, API and UI level testing… and also its application monitoring technologies. But a PhD dissertation to change the world?
That’s what happened when Roy Fielding presented his doctoral dissertation on the “representational state transfer” at University of California-Irvine in 2000 says the firm.
This dissertation laid the groundwork for the staggering growth of RESTful web services , which have reshaped how organisations deploy and utilise APIs. In fact, today 70% of public APIs depend on REST services.
What is REST?
REST (REpresentational State Transfer) is an architectural style and an approach to communications that is often used in the development of web services. The use of REST is often preferred over the more heavyweight SOAP (Simple Object Access Protocol) style because REST does not leverage as much bandwidth, which makes it a better fit for use over the Internet. The SOAP approach requires writing or using a provided server program (to serve data) and a client program (to request data).
You can read the original paper referred to at the top of this story here
Don’t say Internet…
… say distributed hypermedia system of data nodes interrelated via defined interaction constraints.
REST’s decoupled architecture and lighter weight communications constraints between producer and consumer make it a popular building style for cloud-based APIs.
In SmartBear’s latest media missives, the firm looks at the language, properties and requirements of a RESTful web service.
Deciding Between SOAP and REST
SmartBear advises that before anyone spends hours fretting over the choice between SOAP and REST, consider that some web services support one and some the other.
“Unless you plan to create your own web service, the decision of which protocol to use may already be made for you. Extremely few web services, such as Amazon, support both. The focus of your decision often centres on which web service best meets your needs, rather than which protocol to use,” says the firm.
The following tradeoff is presented by SmartBear:
SOAP vs REST
SOAP is definitely the heavyweight choice for web service access — it provides the following advantages when compared to REST:
- Language, platform and transport independent (REST requires use of HTTP)
- Works well in distributed enterprise environments (REST assumes direct point-to-point communication)
- Provides significant pre-build extensibility in the form of the WS* standards
- Built-in error handling
- Automation when used with certain language products
REST is easier to use for the most part and is more flexible. It has the following advantages when compared to SOAP:
- No expensive tools require to interact with the Web service
- Smaller learning curve
- Efficient (SOAP uses XML for all messages, REST can use smaller message formats)
- Fast (no extensive processing required)
- Closer to other web technologies in design philosophy