O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Versions are evil
Leviticus 0xFEFF
Just after something about shellfish
http://api.equestria.magic/v1/
COOL URIS DON’T CHANGE
Uniform
Resource
Identifier
http://v1.api.equestria.magic/
URIS ARE OPAQUE
It’s dark in the smuog
http://not-so-
opengraph.api.equestria.magic/
> GET /rainbow-dash
> Host: api.equestria.magic
> Accept: application/vnd.equestria.ponies.v1+xml
< 200 OK
< Content-Type:...
“We encourage resource owners

to only use true content negotiation
(without redirects) when the

only difference between ...
A conversation I could have had
“User: I need the gravatar of /user/
rainbow-dash
- Me: it’s only in the v2 format
- User:...
WHY ARE WE THERE?
“In the world of Web services, there is a
strong argument that contracts should be
stored and transmitted in a machine-
re...
Frozen in time?
Evolution
BACKWARD COMPATIBILITY
“A product or technology is backward […]
compatible if it can work with input
generated by an older product”
The source of...
FORWARD COMPATIBILITY
“A forward compatible design can accept
data from a future version of itself and pick
out the "known" part of the data”
42...
XML Schemas
<xsd:any>
<xsd:anyAttribute>
JSON
“No one has been stupid enough yet to
create a JSON schema language”
Delusional person in the street
Ignore the unknown
• Degrading when possible
• Ignore what is not understood



.monkey-dash {

coolness: 100%;

}
Fallback rules
<input type=“monkey” />
DON’T VALIDATE SCHEMAS
REALLY, DON’T.
Style, or substance
<user>
<address>
Somewhere over the rainbow.
</address>
<monkey-business enabled=“true” />
</user>
Noi...
DATUMS DON’T KILL PEOPLE,
SCHEMAS KILL PEOPLE.
Those pesky schemas. Tsk tsk.
Versions are evil – how to do without in your API
Versions are evil – how to do without in your API
Versions are evil – how to do without in your API
Versions are evil – how to do without in your API
Próximos SlideShares
Carregando em…5
×

Versions are evil – how to do without in your API

2.564 visualizações

Publicada em

People change. And when you don't recognize them anymore, sometimes you'd be right in thinking they're just not the same person. APIs are the same, adding a version is the hard drug of web APIs, the first hit is free but you're going to pay later! We'll explore in practice what is wrong with versioning, and how we can manage change in our APIs over time without the need for them.

Publicada em: Internet
  • Break up or make up? The The one thing you can say that will pull him back every time. Read more now. ☺☺☺ https://dwz1.cc/LOSfnztD
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • Seja a primeira pessoa a gostar disto

Versions are evil – how to do without in your API

  1. 1. Versions are evil Leviticus 0xFEFF Just after something about shellfish
  2. 2. http://api.equestria.magic/v1/
  3. 3. COOL URIS DON’T CHANGE
  4. 4. Uniform Resource Identifier
  5. 5. http://v1.api.equestria.magic/
  6. 6. URIS ARE OPAQUE It’s dark in the smuog
  7. 7. http://not-so- opengraph.api.equestria.magic/
  8. 8. > GET /rainbow-dash > Host: api.equestria.magic > Accept: application/vnd.equestria.ponies.v1+xml < 200 OK < Content-Type: application/vnd.equestria.ponies.v1+xml < ..
  9. 9. “We encourage resource owners
 to only use true content negotiation (without redirects) when the
 only difference between formats is mechanical in nature.” Roy Fielding
  10. 10. A conversation I could have had “User: I need the gravatar of /user/ rainbow-dash - Me: it’s only in the v2 format - User: But there’s no @accept on <img>! - Me: No kidding.”
  11. 11. WHY ARE WE THERE?
  12. 12. “In the world of Web services, there is a strong argument that contracts should be stored and transmitted in a machine- readable format.” A guy called Don
  13. 13. Frozen in time?
  14. 14. Evolution
  15. 15. BACKWARD COMPATIBILITY
  16. 16. “A product or technology is backward […] compatible if it can work with input generated by an older product” The source of all truths Wikipedia
  17. 17. FORWARD COMPATIBILITY
  18. 18. “A forward compatible design can accept data from a future version of itself and pick out the "known" part of the data” 42 Wikipedia
  19. 19. XML Schemas <xsd:any> <xsd:anyAttribute>
  20. 20. JSON “No one has been stupid enough yet to create a JSON schema language” Delusional person in the street
  21. 21. Ignore the unknown • Degrading when possible • Ignore what is not understood
 
 .monkey-dash {
 coolness: 100%;
 }
  22. 22. Fallback rules <input type=“monkey” />
  23. 23. DON’T VALIDATE SCHEMAS
  24. 24. REALLY, DON’T.
  25. 25. Style, or substance <user> <address> Somewhere over the rainbow. </address> <monkey-business enabled=“true” /> </user> Noise Datum
  26. 26. DATUMS DON’T KILL PEOPLE, SCHEMAS KILL PEOPLE. Those pesky schemas. Tsk tsk.

×