SlideShare ist ein Scribd-Unternehmen logo
1 von 34
How (not) to write an API

                              Jakub Nešetřil



Wednesday, September 26, 12
apiary.io

Wednesday, September 26, 12
API?




                                                                                  apiary.io
                                source: http://www.flickr.com/photos/21496790@N06/5065834411
Wednesday, September 26, 12
API?




                                                                                   apiary.io
                                     source: http://www.flickr.com/photos/daddo83/3406962115/
Wednesday, September 26, 12
API?




                                                                                       apiary.io
                                     source: http://www.flickr.com/photos/ecstaticist/3570660643/
Wednesday, September 26, 12
RPC




                                                                                  apiary.io
                                source: http://www.flickr.com/photos/jasleen_kaur/5075553223
Wednesday, September 26, 12
<?xml version="1.0"?>
  <methodCall>
    <methodName>examples.getUser</methodName>
    <params>
      <param>
          <value><i4>102</i4></value>
      </param>
    </params>
  </methodCall>



  <?xml version="1.0"?>
  <methodResponse>
    <params>
      <param>
          <value><string>John Doe</string></value>
      </param>
    </params>
  </methodResponse>

                                                     apiary.io

Wednesday, September 26, 12
SOAP




                                                                                   apiary.io
                                 source: http://www.flickr.com/photos/jasleen_kaur/5075553223
Wednesday, September 26, 12
POST /InStock HTTP/1.1
  Host: www.example.org
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: 299
  SOAPAction: "http://www.w3.org/2003/05/soap-envelope"

  <?xml version="1.0"?>
  <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    </soap:Header>
    <soap:Body>
      <m:GetUser xmlns:m="http://www.example.org/user">
        <m:Name>John Doe</m:Name>
      </m:GetUser>
    </soap:Body>
  </soap:Envelope>




                                                                 apiary.io

Wednesday, September 26, 12
REST




                                                                                   apiary.io
                                     source: http://www.flickr.com/photos/tambako/6992962266/
Wednesday, September 26, 12
GET /users/?name=John%20Doe HTTP/1.1
  Content-Type: application/json; charset=utf-8




  200 OK

  [{
       name: {
         first: "John",
         last: "Doe"
       }
  }]




                                                  apiary.io

Wednesday, September 26, 12
POPULAR




                                                                                     apiary.io
                                   source: http://www.flickr.com/photos/keithallison/6327068376
Wednesday, September 26, 12
NO PROTOCOL




                                                                                       apiary.io
                                    source: http://www.flickr.com/photos/24298372@N04/3370859327/
Wednesday, September 26, 12
ORTHODOX BELIEVERS




                                                                                  apiary.io
                               source: http://www.flickr.com/photos/45818813@N05/4785640636/
Wednesday, September 26, 12
PURITY WARS




                                                                                       apiary.io
                                    source: http://www.flickr.com/photos/davidkingham/3661515844/
Wednesday, September 26, 12
HOW TO WRITE AN API?




                                                                                 apiary.io
                               source: http://www.flickr.com/photos/21496790@N06/5065834411
Wednesday, September 26, 12
EVERY API IS DIFFERENT



                                                                                 apiary.io
                               source: http://www.flickr.com/photos/marinacast/2255974192/
Wednesday, September 26, 12
Latency?




                                         apiary.io

Wednesday, September 26, 12
Mobile?


                              Latency?




                                            apiary.io

Wednesday, September 26, 12
s?       Mobile?
                         ox ie
                       Pr

                                    Latency?




                                                  apiary.io

Wednesday, September 26, 12
s?       Mobile?
                         ox ie
                       Pr                    Caching
                                                    ?
                                    Latency?




                                                        apiary.io

Wednesday, September 26, 12
s?       Mobile?
                         ox ie
                       Pr                    Caching
                                                    ?
                                    Latency?

                                           Interactive?

                                                          apiary.io

Wednesday, September 26, 12
s?       Mobile?
                         ox ie
                       Pr                    Caching
                                                    ?
                                    Latency?

                                           Interactive?
                   Data size?

                                                          apiary.io

Wednesday, September 26, 12
apiary.io
                              source: http://www.flickr.com/photos/freeflyer09/7460144118
Wednesday, September 26, 12
EXPERIMENT




                                                                                   apiary.io
                                     source: http://www.flickr.com/photos/samipii/7590121284/
Wednesday, September 26, 12
apiary.io
                              source: http://www.flickr.com/photos/samipii/7590121284/
Wednesday, September 26, 12
RESULTS




                                                                                    apiary.io
                                  source: http://www.flickr.com/photos/eisenbahner/3697448759/
Wednesday, September 26, 12
Mock > Use > Implement




                                                       apiary.io

Wednesday, September 26, 12
Mock > Use > Implement




                                                       apiary.io

Wednesday, September 26, 12
apiary.io

Wednesday, September 26, 12
Mock > Use > Implement




                                                       apiary.io

Wednesday, September 26, 12
Documentation
      Automated Testing


                              Mock > Use > Implement




                                                       apiary.io

Wednesday, September 26, 12
source: http://www.flickr.com/photos/lorenia/3464878271/
Wednesday, September 26, 12
Q&A
                              E-MAIL   jakub@apiary.io   TWITTER   @apiaryio




Wednesday, September 26, 12

Weitere ähnliche Inhalte

Mehr von WebExpo

Ameya Kanitkar: Using Hadoop and HBase to Personalize Web, Mobile and Email E...
Ameya Kanitkar: Using Hadoop and HBase to Personalize Web, Mobile and Email E...Ameya Kanitkar: Using Hadoop and HBase to Personalize Web, Mobile and Email E...
Ameya Kanitkar: Using Hadoop and HBase to Personalize Web, Mobile and Email E...WebExpo
 
Marli Mesibov - What's in a Story?
Marli Mesibov - What's in a Story?Marli Mesibov - What's in a Story?
Marli Mesibov - What's in a Story?WebExpo
 
Tomáš Procházka: Moje zápisky z designu
Tomáš Procházka: Moje zápisky z designuTomáš Procházka: Moje zápisky z designu
Tomáš Procházka: Moje zápisky z designuWebExpo
 
Jiří Knesl: Souboj frameworků
Jiří Knesl: Souboj frameworkůJiří Knesl: Souboj frameworků
Jiří Knesl: Souboj frameworkůWebExpo
 
Richard Fridrich: Buď punkový konzument!
Richard Fridrich: Buď punkový konzument!Richard Fridrich: Buď punkový konzument!
Richard Fridrich: Buď punkový konzument!WebExpo
 
Michal Blažej: Zbavte sa account managementu
Michal Blažej: Zbavte sa account managementuMichal Blažej: Zbavte sa account managementu
Michal Blažej: Zbavte sa account managementuWebExpo
 
Denisa Lorencová: UX Designer - Anděl s ďáblem v těle
Denisa Lorencová: UX Designer - Anděl s ďáblem v těleDenisa Lorencová: UX Designer - Anděl s ďáblem v těle
Denisa Lorencová: UX Designer - Anděl s ďáblem v těleWebExpo
 
Petr Ludwig: Jak bojovat s prokrastinací?
Petr Ludwig: Jak bojovat s prokrastinací?Petr Ludwig: Jak bojovat s prokrastinací?
Petr Ludwig: Jak bojovat s prokrastinací?WebExpo
 
Jan Vlček: Gamifikace 101
Jan Vlček: Gamifikace 101Jan Vlček: Gamifikace 101
Jan Vlček: Gamifikace 101WebExpo
 
Luke Wroblewski: Mobile First
Luke Wroblewski: Mobile FirstLuke Wroblewski: Mobile First
Luke Wroblewski: Mobile FirstWebExpo
 
Adam Hrubý: Evoluce designéra
Adam Hrubý: Evoluce designéraAdam Hrubý: Evoluce designéra
Adam Hrubý: Evoluce designéraWebExpo
 
Jan Sotorník: Grafika e-shopu jako sexy a chytrá prodavačka
Jan Sotorník: Grafika e-shopu jako sexy a chytrá prodavačkaJan Sotorník: Grafika e-shopu jako sexy a chytrá prodavačka
Jan Sotorník: Grafika e-shopu jako sexy a chytrá prodavačkaWebExpo
 
Jana Štěpánová: Neziskovky Goes Web
Jana Štěpánová: Neziskovky Goes WebJana Štěpánová: Neziskovky Goes Web
Jana Štěpánová: Neziskovky Goes WebWebExpo
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: ServersidenessWebExpo
 
Richard Fridrich: 5 x *, * a */5
Richard Fridrich: 5 x *, * a */5Richard Fridrich: 5 x *, * a */5
Richard Fridrich: 5 x *, * a */5WebExpo
 
Jiří Močička: Design as Storytelling
Jiří Močička: Design as StorytellingJiří Močička: Design as Storytelling
Jiří Močička: Design as StorytellingWebExpo
 
David Hussman - Products and People over Process and Dogma
David Hussman - Products and People over Process and DogmaDavid Hussman - Products and People over Process and Dogma
David Hussman - Products and People over Process and DogmaWebExpo
 
Petr Dvořák: Mobilní webové služby pohledem iPhone developera
Petr Dvořák: Mobilní webové služby pohledem iPhone developeraPetr Dvořák: Mobilní webové služby pohledem iPhone developera
Petr Dvořák: Mobilní webové služby pohledem iPhone developeraWebExpo
 
Martin Hujer: PHP ve Windows Azure cloudu
Martin Hujer: PHP ve Windows Azure clouduMartin Hujer: PHP ve Windows Azure cloudu
Martin Hujer: PHP ve Windows Azure clouduWebExpo
 
Lukáš Zaplatílek: Kašlete na uživatele
Lukáš Zaplatílek: Kašlete na uživateleLukáš Zaplatílek: Kašlete na uživatele
Lukáš Zaplatílek: Kašlete na uživateleWebExpo
 

Mehr von WebExpo (20)

Ameya Kanitkar: Using Hadoop and HBase to Personalize Web, Mobile and Email E...
Ameya Kanitkar: Using Hadoop and HBase to Personalize Web, Mobile and Email E...Ameya Kanitkar: Using Hadoop and HBase to Personalize Web, Mobile and Email E...
Ameya Kanitkar: Using Hadoop and HBase to Personalize Web, Mobile and Email E...
 
Marli Mesibov - What's in a Story?
Marli Mesibov - What's in a Story?Marli Mesibov - What's in a Story?
Marli Mesibov - What's in a Story?
 
Tomáš Procházka: Moje zápisky z designu
Tomáš Procházka: Moje zápisky z designuTomáš Procházka: Moje zápisky z designu
Tomáš Procházka: Moje zápisky z designu
 
Jiří Knesl: Souboj frameworků
Jiří Knesl: Souboj frameworkůJiří Knesl: Souboj frameworků
Jiří Knesl: Souboj frameworků
 
Richard Fridrich: Buď punkový konzument!
Richard Fridrich: Buď punkový konzument!Richard Fridrich: Buď punkový konzument!
Richard Fridrich: Buď punkový konzument!
 
Michal Blažej: Zbavte sa account managementu
Michal Blažej: Zbavte sa account managementuMichal Blažej: Zbavte sa account managementu
Michal Blažej: Zbavte sa account managementu
 
Denisa Lorencová: UX Designer - Anděl s ďáblem v těle
Denisa Lorencová: UX Designer - Anděl s ďáblem v těleDenisa Lorencová: UX Designer - Anděl s ďáblem v těle
Denisa Lorencová: UX Designer - Anděl s ďáblem v těle
 
Petr Ludwig: Jak bojovat s prokrastinací?
Petr Ludwig: Jak bojovat s prokrastinací?Petr Ludwig: Jak bojovat s prokrastinací?
Petr Ludwig: Jak bojovat s prokrastinací?
 
Jan Vlček: Gamifikace 101
Jan Vlček: Gamifikace 101Jan Vlček: Gamifikace 101
Jan Vlček: Gamifikace 101
 
Luke Wroblewski: Mobile First
Luke Wroblewski: Mobile FirstLuke Wroblewski: Mobile First
Luke Wroblewski: Mobile First
 
Adam Hrubý: Evoluce designéra
Adam Hrubý: Evoluce designéraAdam Hrubý: Evoluce designéra
Adam Hrubý: Evoluce designéra
 
Jan Sotorník: Grafika e-shopu jako sexy a chytrá prodavačka
Jan Sotorník: Grafika e-shopu jako sexy a chytrá prodavačkaJan Sotorník: Grafika e-shopu jako sexy a chytrá prodavačka
Jan Sotorník: Grafika e-shopu jako sexy a chytrá prodavačka
 
Jana Štěpánová: Neziskovky Goes Web
Jana Štěpánová: Neziskovky Goes WebJana Štěpánová: Neziskovky Goes Web
Jana Štěpánová: Neziskovky Goes Web
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: Serversideness
 
Richard Fridrich: 5 x *, * a */5
Richard Fridrich: 5 x *, * a */5Richard Fridrich: 5 x *, * a */5
Richard Fridrich: 5 x *, * a */5
 
Jiří Močička: Design as Storytelling
Jiří Močička: Design as StorytellingJiří Močička: Design as Storytelling
Jiří Močička: Design as Storytelling
 
David Hussman - Products and People over Process and Dogma
David Hussman - Products and People over Process and DogmaDavid Hussman - Products and People over Process and Dogma
David Hussman - Products and People over Process and Dogma
 
Petr Dvořák: Mobilní webové služby pohledem iPhone developera
Petr Dvořák: Mobilní webové služby pohledem iPhone developeraPetr Dvořák: Mobilní webové služby pohledem iPhone developera
Petr Dvořák: Mobilní webové služby pohledem iPhone developera
 
Martin Hujer: PHP ve Windows Azure cloudu
Martin Hujer: PHP ve Windows Azure clouduMartin Hujer: PHP ve Windows Azure cloudu
Martin Hujer: PHP ve Windows Azure cloudu
 
Lukáš Zaplatílek: Kašlete na uživatele
Lukáš Zaplatílek: Kašlete na uživateleLukáš Zaplatílek: Kašlete na uživatele
Lukáš Zaplatílek: Kašlete na uživatele
 

Kürzlich hochgeladen

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Jakub Nešetřil: Jak (ne)dělat API

  • 1. How (not) to write an API Jakub Nešetřil Wednesday, September 26, 12
  • 3. API? apiary.io source: http://www.flickr.com/photos/21496790@N06/5065834411 Wednesday, September 26, 12
  • 4. API? apiary.io source: http://www.flickr.com/photos/daddo83/3406962115/ Wednesday, September 26, 12
  • 5. API? apiary.io source: http://www.flickr.com/photos/ecstaticist/3570660643/ Wednesday, September 26, 12
  • 6. RPC apiary.io source: http://www.flickr.com/photos/jasleen_kaur/5075553223 Wednesday, September 26, 12
  • 7. <?xml version="1.0"?> <methodCall> <methodName>examples.getUser</methodName> <params> <param> <value><i4>102</i4></value> </param> </params> </methodCall> <?xml version="1.0"?> <methodResponse> <params> <param> <value><string>John Doe</string></value> </param> </params> </methodResponse> apiary.io Wednesday, September 26, 12
  • 8. SOAP apiary.io source: http://www.flickr.com/photos/jasleen_kaur/5075553223 Wednesday, September 26, 12
  • 9. POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: 299 SOAPAction: "http://www.w3.org/2003/05/soap-envelope" <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> </soap:Header> <soap:Body> <m:GetUser xmlns:m="http://www.example.org/user"> <m:Name>John Doe</m:Name> </m:GetUser> </soap:Body> </soap:Envelope> apiary.io Wednesday, September 26, 12
  • 10. REST apiary.io source: http://www.flickr.com/photos/tambako/6992962266/ Wednesday, September 26, 12
  • 11. GET /users/?name=John%20Doe HTTP/1.1 Content-Type: application/json; charset=utf-8 200 OK [{ name: { first: "John", last: "Doe" } }] apiary.io Wednesday, September 26, 12
  • 12. POPULAR apiary.io source: http://www.flickr.com/photos/keithallison/6327068376 Wednesday, September 26, 12
  • 13. NO PROTOCOL apiary.io source: http://www.flickr.com/photos/24298372@N04/3370859327/ Wednesday, September 26, 12
  • 14. ORTHODOX BELIEVERS apiary.io source: http://www.flickr.com/photos/45818813@N05/4785640636/ Wednesday, September 26, 12
  • 15. PURITY WARS apiary.io source: http://www.flickr.com/photos/davidkingham/3661515844/ Wednesday, September 26, 12
  • 16. HOW TO WRITE AN API? apiary.io source: http://www.flickr.com/photos/21496790@N06/5065834411 Wednesday, September 26, 12
  • 17. EVERY API IS DIFFERENT apiary.io source: http://www.flickr.com/photos/marinacast/2255974192/ Wednesday, September 26, 12
  • 18. Latency? apiary.io Wednesday, September 26, 12
  • 19. Mobile? Latency? apiary.io Wednesday, September 26, 12
  • 20. s? Mobile? ox ie Pr Latency? apiary.io Wednesday, September 26, 12
  • 21. s? Mobile? ox ie Pr Caching ? Latency? apiary.io Wednesday, September 26, 12
  • 22. s? Mobile? ox ie Pr Caching ? Latency? Interactive? apiary.io Wednesday, September 26, 12
  • 23. s? Mobile? ox ie Pr Caching ? Latency? Interactive? Data size? apiary.io Wednesday, September 26, 12
  • 24. apiary.io source: http://www.flickr.com/photos/freeflyer09/7460144118 Wednesday, September 26, 12
  • 25. EXPERIMENT apiary.io source: http://www.flickr.com/photos/samipii/7590121284/ Wednesday, September 26, 12
  • 26. apiary.io source: http://www.flickr.com/photos/samipii/7590121284/ Wednesday, September 26, 12
  • 27. RESULTS apiary.io source: http://www.flickr.com/photos/eisenbahner/3697448759/ Wednesday, September 26, 12
  • 28. Mock > Use > Implement apiary.io Wednesday, September 26, 12
  • 29. Mock > Use > Implement apiary.io Wednesday, September 26, 12
  • 31. Mock > Use > Implement apiary.io Wednesday, September 26, 12
  • 32. Documentation Automated Testing Mock > Use > Implement apiary.io Wednesday, September 26, 12
  • 34. Q&A E-MAIL jakub@apiary.io TWITTER @apiaryio Wednesday, September 26, 12