TechTalk#3: REST
-
Upload
da-14 -
Category
Engineering
-
view
126 -
download
1
description
Transcript of TechTalk#3: REST
RestFulAleksey Pakholkov
API1. SOAP
2. XML-RPC
3. REST
RestFul?
Не, не слышал...
Roy FieldingRoy Thomas Fielding (born 1965) is an
American computer scientist, one of the principal
authors of the HTTPspecification, an authority on
computer network architecture and co-founder of
the Apache HTTP Server project.
Why REST?● Scalability● Generality● Independence● Caching● Security● Stateless● Format(HTML, XML, JSON)
Richardson Maturity ModelLevel 0Level 1 - ResourcesLevel 2 - HTTP VerbsLevel 3 - Hypermedia Controls
Level 0 HTTP to tunnel RPC
Level 1: Resources
Level 2: HTTP verbs
Level 3: Hypermedia controls
HTTP Method● GET● POST● PUT● PATCH● DELETE● api/resource[/:id]
Hypertext Application Language{ "_links": { "self": { "href": "http://bc1.loc/api/v1/users/1/buildings/1/messages" } },
"_embedded": { "messages": [
{
"id": 128,
"subject": "Test Create 16-10",
"_embedded": {
"lastPost": {
"id": 51,
"body": "12312123",
...................
},
"_links": {
"self": {
"href": "http://bc1.loc/api/v1/users/1/messages/128/posts/51"
}
}
},
...........................
Example
….Cloud● AbstractRestfulController
● PhlyRestfully
● CustomRestfully
Problems● Authentication● ???
Questions