REST | SOAP |
Simple HTTP | next DCOM |
not transport neutral | transport neutral |
message based security | |
only CRUD operations | CRUD + more |
can scale | ? |
broader reach and interoperability | ? |
std format using GET,PUT,POST,DELETE | format is SOAP envelope,header,body |
no need for WSDL | |
data format can be JSON or XML | |
easy to version and evolve | ? |
bookmarking and caching can be done | cannot be done |
Cloud computing people are using REST | ? |
SOAP is typically used in enterprise scenarios as middleware and most of the operations are pretty much CRUD operations.
Why REST :
- if you only do HTTP
- if you don’t need WS* and web Security(SSL) is good enough
- Simpler than SOAP , uniform, comparable
Why SOAP :
- if you need message based security – banks
- your services are middle ware rather than public web services(web facing)
- your services are local to enterprise
My post here tells you what REST is, however that is the most common understanding of REST, the definition goes beyond it, ex.
- that resources be self-describing
- complete object should be provided to POST/PUT instead of key value pairs of updates
- collection of resources should be resource that represents a collection of other resources
World wide web is a RESTful system. Does your browser (the client) know whether it’s displaying a banking website or a casual game? Nope, it just utilizes standard media types (HTML, CSS, Javascript) to compose and represent the data. You don’t have to know the specific URL you’re looking for on a website so long as you know the “starting place” (usually the domain name) and can navigate there.
So REST is an ingenious and flexible way to allow for the consumption and traversal of network-available information. What it’s not, however, is a very good roadmap toward building APIs for web applications.
No comments:
Post a Comment