SlideShare a Scribd company logo
1 of 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

More Related Content

More from 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
 

More from 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
 

Recently uploaded

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

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