10
Why use REST for webservices? Presentation by Alex Pérez Barón REST vs SOAP

Rest vs Soap

Embed Size (px)

DESCRIPTION

Why use REST for webservices?

Citation preview

Page 1: Rest vs Soap

Why use REST for webservices?

Presentation by Alex Pérez Barón

RESTvs

SOAP

Page 2: Rest vs Soap

IndexIntroduction Main characteristicsBandwidth UsageCachingSimplicitySecurityQuestions?

Page 3: Rest vs Soap

IntroductionRepresentational state transfer (REST) is

a style of software architecture for distributed hypermedia systems such as the World Wide Web.

Key goals of REST include: Scalability of component interactions Generality of interfaces Independent deployment of components Intermediary components to reduce latency, enforce

security and encapsulate legacy systems

Page 4: Rest vs Soap

Main characteristics

Standards-based (runs on top of HTTP)REST is platformand language independentREST has Human Readable Results REST permits many different data formats

where as SOAP only permits XML.For example JSON usually is a better fit for

data and parses much faster.

Page 5: Rest vs Soap

Bandwidth Usage

REST is lighter than SOAP. SOAP requires an XML wrapper around every request and response.

In REST Not a lot of extra xml markup is needed.

SOAP response could require more than 10 times as many bytes as would the same response in REST.

If you save bandwidth, you save response time and money!

Page 6: Rest vs Soap

CachingThe information can be cached because REST is

totally stateless.Since HTTP based REST can be cached by

intermediate proxy servers very easily because request uses GET.

Page 7: Rest vs Soap

SecurityCan easily be used in the presence of

firewalls because is totally based in HTTP for this reason a sysadmin can regulate the input/output of the service with simple and very effective rules.

Page 8: Rest vs Soap

SimplicityREST is based upon the Resource Oriented

Architecture. REST services do not require you to design your own service contracts, because you can rely on HTTP verbs to describe intent (Create/Read/Update/Delete) . This radically simplifies your service’s design this

REST services provide access to resources via a Uniform Resource Indicator (URI) no other things are required.

This simplicity makes you save development timeIf you save time, you save money!If launch your product early, you will gate strategic advantage for

your product!

Page 9: Rest vs Soap

Simplicity

Typical implementation

Page 10: Rest vs Soap

QUESTIONS?