What is REST Web Service?

📅 January 24, 2018
Phil Ly Phil Ly
Web Services REST API

Understanding REST Web Services

Web Services Overview

Ten or 15 years ago, when people talked about Web Services, you would immediately understand they were referring to SOAP. But these days, if someone says they have a Web Service interface, you need to follow up with the question: "What kind of Web Service – SOAP or REST?" In fact, REST is fast becoming the more visible application interface on the Internet. This blog provides a quick overview of what REST is, and how it compares to SOAP.

What Are Web Services?

Firstly, like SOAP, REST is a Web Service, which by definition provides an Application-to-Application interface. So functionally, REST is similar to SOAP in that it enables a Client application to invoke an operation/method in a Server application. Furthermore, REST uses HTTP and HTTPS as the communication protocol, just as SOAP does. Their differences lie in what is underneath the cover.

SOAP Web Services

SOAP Web Services Architecture

One of the key underpinning of SOAP Web Service is the usage of XML in its:

REST Web Services: A Different Approach

Proponents of REST view XML as the major reason to move away from SOAP Web Service because of its verbosity: XML encoded data could increase the size of the message enormously. So instead, REST Web Service embodies the following:

JSON and REST Architecture

REST embraces the adoption of utilizing URL and HTTP protocol methods (verbs) to convey methods/operations. So instead of using WSDL like in SOAP to convey exactly what the operation is, the standard HTTP verb is used "by convention" to convey what is needed.

Key Benefits of REST

The perceived benefits of this approach are:

These are especially important factors in "lightweight" clients like mobile applications. This can be demonstrated by a simple example below, comparing a REST request with a SOAP request.

REST vs SOAP Comparison

REST Principles: Uniform Interfaces

REST Uniform Interfaces

REST follows architectural principles that emphasize simplicity and standardization. The uniform interface constraint is fundamental to REST design, allowing different clients and servers to interact in a standardized manner without tight coupling.

Web Services Integration Needs

Why Web Services Matter

Both REST and SOAP address the fundamental need for applications to communicate with each other across different platforms and technologies. The choice between them depends on your specific requirements, the nature of your clients (mobile vs. desktop), and the complexity of your integration scenarios.

Looking Forward: Does this mean that REST is always better than SOAP? Is REST limited to only mobile applications or JSON data? What is the significance of using REST with NonStop applications? These are important questions that businesses need to answer based on their unique requirements and use cases.

Conclusion

REST has emerged as a dominant approach to building Web Services due to its simplicity, lightweight nature, and alignment with mobile and modern application development practices. By leveraging HTTP methods and JSON data encoding, REST provides a more accessible and efficient alternative to SOAP for many use cases. However, both approaches have their place in modern application architecture, and the choice depends on specific project requirements and constraints.

← Back to Blog

Feedback Please


Phil Ly

Phil Ly is the president and founder of TIC Software, a New York-based company specializing in software and services that integrate NonStop with the latest technologies, including Web Services, .NET and Java. Prior to founding TIC in 1983, Phil worked for Tandem Computer in technical support and software development.