5. Compartir datos mediante APIs
Usuarios quieren acceder a su información
desde varios servicios y aplicaciones
Desarrolladores quieren hacer aplicaciones
fáciles que consuman toda esa info
Los proveedores de servicios quieren y
tienen que mantener la información segura
7. Delegar la autorización
Flexible y extensible
Abierto, basado en la
comunidad
El usuario controla los
permisos de acceso
8. ¿Cómo accederan los clientes?
Definir
¿Qué es lo que será manipulado? (Noun)
¿Qué operación se realizará? (Verbo)
9. Resource GET PUT POST DELETE
Collection URI
http://example.com/resou
rces/
List the URIs and
perhaps other details of
the collection's members.
Replace the entire
collection with another
collection.
Create a new entry in the
collection. The new
entry's URL is assigned
automatically and is
usually returned by the
operation.
Delete the entire
collection.
Element URI
http://example.com/resou
rces/142
Retrieve a
representation of the
addressed member of
the collection, expressed
in an appropriate Internet
media type.
Update the addressed
member of the collection,
or if it doesn't exist,
create it.
Treat the addressed
member as a collection
in its own right and
create a new entry in it.
Delete the addressed
member of the collection.
RESTful Web Service HTTP methods
10. GET , HEAD
Seguro
PUT, DELETE
Idempotente
POST
No es seguro
No idempotente
11. ¿Qué envías y recibes de los clientes?
¿Cuál es la vista de tus datos/recursos?
¿Qué recibe el cliente cuando haces GET?
¿Qué envía el cliente cuando hace POST/PUT?
14. ¿Cómo le dices al cliente que la petición es
exitosa?
¿Cómo manejas errores «naturales»?
Autenticación fallida
Parámetros faltantes
Recursos no disponibles
Allows for reliable client requests over an unreliable network
Recovering from timeouts based on the HTTP method
Clients can safely prefetch data
Google web accelerator
Leverage the fact that HTTP clients/ libraries inherently understand how to use your
resource
Not a new concept
Important when you are not in control of the client
Heterogeneous systems
Eg: Browser
Provide UI specific handling – Trying to re-POST
not caching POST
not making POSTS borkmark-able
Understands the semantics of POST
Eg. pythons HTTPlib2
Comes with built in private caching features – like a browser