6
WHY RESTFUL DEVELOPMENT Representational State Transfer.

Why Restful

Embed Size (px)

Citation preview

WHY RESTFUL DEVELOPMENTRepresentational State Transfer.

Web services!

Web Services can convert your applications into Web-applications.1. SOAP(Simple Object Access Protocol) /

XML-RPC => communication2. REST => communication + standardisation

What is REST

1. Everything is a resource2. REST-style architectures conventionally consist of

clients and servers.3. Clients initiate requests to servers; servers process

requests and return appropriate responses. Requests and responses are built around the transfer of representations of resources.

4. A resource can be essentially any coherent and meaningful concept that may be addressed

Action URL HTTP Method

However, the HTTP protocol defines eight methods, GET, POST, PUT, DELETE, HEAD, TRACE, OPTIONS, and CONNECT. REST is concerned with the first four of these methods, GET, POST, PUT, and DELETE. These are the methods that a RESTful web application will use to manipulate resources.

● GET maps to show -> get /teams/:id● PUT maps to update -> put /teams/:id● DELETE maps to destroy -> delete /teams/:id● POST is a bit of an exception, since the resource is not

yet existent thus it maps to the base /teams

The 3 tiered REST architecture

Thanks Email: [email protected]