SlideShare ist ein Scribd-Unternehmen logo
1 von 18
How to Design a Good API?
2012-05-11


www.outsystems.com   Page 1   © 2012 OutSystems – all rights reserved
What is a Good API?

                     Hard to          Leads to
                     misuse         readable code
                                        Stable

       Easy to learn
                                            Complete
       and memorize




www.outsystems.com             Page 2            © 2012 OutSystems – all rights reserved
What to consider?

User Stories                                         Logging



Naming                                         Versioning



Granularity                                    Scalablility



Error Handling                                       Security


   www.outsystems.com   Page 3   © 2012 OutSystems – all rights reserved
User Stories
• Who will use the API?
• How will they use it?
• Where will they use it?
• Put yourself in the developer’s shoes!

Naming & Type
• Meaningful & Readable
• Consistent
• Strongly typed


www.outsystems.com        Page 4      © 2012 OutSystems – all rights reserved
Granularity


                          GetOrderDetail()

                                              CalculateTotalAmount()


    GetEmployeeName()




           3 x GetOrderLine()




www.outsystems.com                   Page 5       © 2012 OutSystems – all rights reserved
Error Handling




www.outsystems.com   Page 6   © 2012 OutSystems – all rights reserved
Logging
• Measure Usage
• Performance Monitoring
• Troubleshoot
• Service Center helps you out!

 Versioning
• Go public means you have to version
• No usage = deprecate old version
• It’s costly so avoid it!


www.outsystems.com           Page 7   © 2012 OutSystems – all rights reserved
Scalability
• Use Partial Response
      – Pagination
      – Filtering
• agileplatform™ already scales!

 Security
• Control access to API for internal
• HTTPS/SSL for Public APIs
• Token-based Authentication


www.outsystems.com       Page 8        © 2012 OutSystems – all rights reserved
API is a Product!




www.outsystems.com   Page 9   © 2012 OutSystems – all rights reserved
Scenarios

www.outsystems.com      Page 10   © 2012 OutSystems – all rights reserved
Master data
                Most companies want to centralize their master
                                    data.
                                                        - Nouns and Verbs                            Naming
Applications
Composite




                   Directory    Performance             - Read-only Entities                        Security
                                Management



                                                        -Throw Exception                 Error handling
Core Business
 Components




                                                        - TrueChange™                           Versioning

                         Employees




    www.outsystems.com                        Page 11                      © 2012 OutSystems – all rights reserved
Information Provider
      Airport management company provides real time flights’
                    information to their clients

                         3rd Parties

                                                              - Lifetime Token                            Security


                                                              - Custom Audit                              Logging
   agileplatform™




                                 Flight                       - Partial Response                     Scalablility
                               Services



                                                              - API Document                  Documentation


                    Airports              Flights             - New WebService                        Versioning



www.outsystems.com                                  Page 12                      © 2012 OutSystems – all rights reserved
3-Tier Layer
    Bank company wants a CRM application with a
          SOA approach. Security is critical.

                                                           - Int. Auth, Int. Net.                     Security
       UI Layer




1
                        CRM        HomeBank

                                                           - Resource based                    User Stories
       Business Layer




                        Account      Customer              - Cache                               Scalablility
                        Services      Services
2
                                                           - OutDoc                       Documentation
                        Accounts    Customers




www.outsystems.com                               Page 13                     © 2012 OutSystems – all rights reserved
Extranet
      Insurance company wants to scale out claim management
                        through partners.

 Small                        Large
                             Partners
                                                     - Use reUse                          Granularity
Partners


                                                     - Return error                 Error Handling
                 WebPortal

                                                     - Application Log                         Logging
agileplatform™




                                  Claim
                                Services


                                                     - HTTPS + S.Token                         Security


                 Claim Management



www.outsystems.com                         Page 14                    © 2012 OutSystems – all rights reserved
What is a Good API?

                     Hard to           Leads to
                     misuse          readable code
                                         Stable

       Easy to learn
                                             Complete
       and memorize




www.outsystems.com             Page 15            © 2012 OutSystems – all rights reserved
Steve Jobs
www.outsystems.com   Page 17   © 2012 OutSystems – all rights reserved
andre.vieira@outsystems.com             nuno.baptista@outsystems.com




www.outsystems.com                       Page 18                 © 2012 OutSystems – all rights reserved

Weitere ähnliche Inhalte

Andere mochten auch

цели и программа протестного движения4
цели и программа протестного движения4цели и программа протестного движения4
цели и программа протестного движения4
Primeries
 
Шашки
ШашкиШашки
Шашки
rivoi
 
Tseli i programma protestnogo dvizhenia
 Tseli i programma protestnogo dvizhenia Tseli i programma protestnogo dvizhenia
Tseli i programma protestnogo dvizhenia
Primeries
 
Презентация шашечный турнир
Презентация шашечный турнирПрезентация шашечный турнир
Презентация шашечный турнир
rivoi
 
Kisah pohon epal dgn budak lelaki
Kisah pohon epal dgn budak lelakiKisah pohon epal dgn budak lelaki
Kisah pohon epal dgn budak lelaki
Japri Kasran
 
AYAN SAMADDAR - RESUME
AYAN SAMADDAR - RESUMEAYAN SAMADDAR - RESUME
AYAN SAMADDAR - RESUME
Ayan Samaddar
 

Andere mochten auch (12)

цели и программа протестного движения4
цели и программа протестного движения4цели и программа протестного движения4
цели и программа протестного движения4
 
Шашки
ШашкиШашки
Шашки
 
Tseli i programma protestnogo dvizhenia
Tseli i programma protestnogo dvizheniaTseli i programma protestnogo dvizhenia
Tseli i programma protestnogo dvizhenia
 
Kakovy tseli protestnogo dvizheniya?
Kakovy tseli protestnogo dvizheniya?Kakovy tseli protestnogo dvizheniya?
Kakovy tseli protestnogo dvizheniya?
 
Importance of staffing
Importance of staffingImportance of staffing
Importance of staffing
 
Tseli i programma protestnogo dvizhenia
Tseli i programma protestnogo dvizheniaTseli i programma protestnogo dvizhenia
Tseli i programma protestnogo dvizhenia
 
Tseli i programma protestnogo dvizhenia
 Tseli i programma protestnogo dvizhenia Tseli i programma protestnogo dvizhenia
Tseli i programma protestnogo dvizhenia
 
Цели и программа протестного движения
Цели и программа протестного движенияЦели и программа протестного движения
Цели и программа протестного движения
 
Презентация шашечный турнир
Презентация шашечный турнирПрезентация шашечный турнир
Презентация шашечный турнир
 
Kisah pohon epal dgn budak lelaki
Kisah pohon epal dgn budak lelakiKisah pohon epal dgn budak lelaki
Kisah pohon epal dgn budak lelaki
 
Julius caesar
Julius caesar Julius caesar
Julius caesar
 
AYAN SAMADDAR - RESUME
AYAN SAMADDAR - RESUMEAYAN SAMADDAR - RESUME
AYAN SAMADDAR - RESUME
 

Ähnlich wie How to design good APIs

Smart data onboarding webinar oct 10 2013
Smart data onboarding webinar oct 10 2013Smart data onboarding webinar oct 10 2013
Smart data onboarding webinar oct 10 2013
Marty Loughlin
 
Edwin Vd Sanden Composite Applications For Users
Edwin Vd Sanden     Composite Applications For UsersEdwin Vd Sanden     Composite Applications For Users
Edwin Vd Sanden Composite Applications For Users
SOA Symposium
 
Jobo 1 ims_tm_value_2012_q2
Jobo 1 ims_tm_value_2012_q2Jobo 1 ims_tm_value_2012_q2
Jobo 1 ims_tm_value_2012_q2
Helene Lyon
 
Cloud Computing, Business Models, Geilo April 2009
Cloud Computing, Business Models, Geilo April 2009Cloud Computing, Business Models, Geilo April 2009
Cloud Computing, Business Models, Geilo April 2009
Francis D'Silva
 
Microsoft X
Microsoft XMicrosoft X
Microsoft X
Credera
 
Maximo differentiators
Maximo differentiatorsMaximo differentiators
Maximo differentiators
Projetech
 
Pervasive PLM
Pervasive PLMPervasive PLM
Pervasive PLM
Aras
 
Apptio up cloud conference 2012 [final].pptx
Apptio up cloud conference 2012 [final].pptxApptio up cloud conference 2012 [final].pptx
Apptio up cloud conference 2012 [final].pptx
Khazret Sapenov
 

Ähnlich wie How to design good APIs (20)

Smart data onboarding webinar oct 10 2013
Smart data onboarding webinar oct 10 2013Smart data onboarding webinar oct 10 2013
Smart data onboarding webinar oct 10 2013
 
Symantec I3 Presentation
Symantec I3 PresentationSymantec I3 Presentation
Symantec I3 Presentation
 
Edwin Vd Sanden Composite Applications For Users
Edwin Vd Sanden     Composite Applications For UsersEdwin Vd Sanden     Composite Applications For Users
Edwin Vd Sanden Composite Applications For Users
 
Jobo 1 ims_tm_value_2012_q2
Jobo 1 ims_tm_value_2012_q2Jobo 1 ims_tm_value_2012_q2
Jobo 1 ims_tm_value_2012_q2
 
Cloud Computing, Business Models, Geilo April 2009
Cloud Computing, Business Models, Geilo April 2009Cloud Computing, Business Models, Geilo April 2009
Cloud Computing, Business Models, Geilo April 2009
 
With over 1,000 business software applications available, how do you select t...
With over 1,000 business software applications available, how do you select t...With over 1,000 business software applications available, how do you select t...
With over 1,000 business software applications available, how do you select t...
 
Motadata - Unified Product Suite for IT Operations and Big Data Analytics
Motadata - Unified Product Suite for IT Operations and Big Data AnalyticsMotadata - Unified Product Suite for IT Operations and Big Data Analytics
Motadata - Unified Product Suite for IT Operations and Big Data Analytics
 
Microsoft X
Microsoft XMicrosoft X
Microsoft X
 
JavaOne2012 _linkeddata_oslc
JavaOne2012 _linkeddata_oslcJavaOne2012 _linkeddata_oslc
JavaOne2012 _linkeddata_oslc
 
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
 
How Boeing is Using AWS to Transform Commercial Aviation (ENT213) | AWS re:In...
How Boeing is Using AWS to Transform Commercial Aviation (ENT213) | AWS re:In...How Boeing is Using AWS to Transform Commercial Aviation (ENT213) | AWS re:In...
How Boeing is Using AWS to Transform Commercial Aviation (ENT213) | AWS re:In...
 
Standard Issue: Preparing for the Future of Data Management
Standard Issue: Preparing for the Future of Data ManagementStandard Issue: Preparing for the Future of Data Management
Standard Issue: Preparing for the Future of Data Management
 
Are Your Applications Delivering What Your End-Users Expect?
Are Your Applications Delivering What Your End-Users Expect?Are Your Applications Delivering What Your End-Users Expect?
Are Your Applications Delivering What Your End-Users Expect?
 
Maximo differentiators
Maximo differentiatorsMaximo differentiators
Maximo differentiators
 
Pervasive PLM
Pervasive PLMPervasive PLM
Pervasive PLM
 
Apptio up cloud conference 2012 [final].pptx
Apptio up cloud conference 2012 [final].pptxApptio up cloud conference 2012 [final].pptx
Apptio up cloud conference 2012 [final].pptx
 
Leveraging Identity to Manage Change and Complexity
Leveraging Identity to Manage Change and ComplexityLeveraging Identity to Manage Change and Complexity
Leveraging Identity to Manage Change and Complexity
 
zEnterpise integration of Linux and traditional workload
zEnterpise integration of Linux and traditional workloadzEnterpise integration of Linux and traditional workload
zEnterpise integration of Linux and traditional workload
 
Monitoring of Web Applications and GlassFish for Performance and Availability...
Monitoring of Web Applications and GlassFish for Performance and Availability...Monitoring of Web Applications and GlassFish for Performance and Availability...
Monitoring of Web Applications and GlassFish for Performance and Availability...
 
Composite Applications For Users
Composite Applications For UsersComposite Applications For Users
Composite Applications For Users
 

Kürzlich hochgeladen

call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
vikas rana
 
the Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationthe Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentation
brynpueblos04
 
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
Cara Menggugurkan Kandungan 087776558899
 

Kürzlich hochgeladen (14)

$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
the Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationthe Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentation
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptx
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
 

How to design good APIs

  • 1. How to Design a Good API? 2012-05-11 www.outsystems.com Page 1 © 2012 OutSystems – all rights reserved
  • 2. What is a Good API? Hard to Leads to misuse readable code Stable Easy to learn Complete and memorize www.outsystems.com Page 2 © 2012 OutSystems – all rights reserved
  • 3. What to consider? User Stories Logging Naming Versioning Granularity Scalablility Error Handling Security www.outsystems.com Page 3 © 2012 OutSystems – all rights reserved
  • 4. User Stories • Who will use the API? • How will they use it? • Where will they use it? • Put yourself in the developer’s shoes! Naming & Type • Meaningful & Readable • Consistent • Strongly typed www.outsystems.com Page 4 © 2012 OutSystems – all rights reserved
  • 5. Granularity GetOrderDetail() CalculateTotalAmount() GetEmployeeName() 3 x GetOrderLine() www.outsystems.com Page 5 © 2012 OutSystems – all rights reserved
  • 6. Error Handling www.outsystems.com Page 6 © 2012 OutSystems – all rights reserved
  • 7. Logging • Measure Usage • Performance Monitoring • Troubleshoot • Service Center helps you out! Versioning • Go public means you have to version • No usage = deprecate old version • It’s costly so avoid it! www.outsystems.com Page 7 © 2012 OutSystems – all rights reserved
  • 8. Scalability • Use Partial Response – Pagination – Filtering • agileplatform™ already scales! Security • Control access to API for internal • HTTPS/SSL for Public APIs • Token-based Authentication www.outsystems.com Page 8 © 2012 OutSystems – all rights reserved
  • 9. API is a Product! www.outsystems.com Page 9 © 2012 OutSystems – all rights reserved
  • 10. Scenarios www.outsystems.com Page 10 © 2012 OutSystems – all rights reserved
  • 11. Master data Most companies want to centralize their master data. - Nouns and Verbs Naming Applications Composite Directory Performance - Read-only Entities Security Management -Throw Exception Error handling Core Business Components - TrueChange™ Versioning Employees www.outsystems.com Page 11 © 2012 OutSystems – all rights reserved
  • 12. Information Provider Airport management company provides real time flights’ information to their clients 3rd Parties - Lifetime Token Security - Custom Audit Logging agileplatform™ Flight - Partial Response Scalablility Services - API Document Documentation Airports Flights - New WebService Versioning www.outsystems.com Page 12 © 2012 OutSystems – all rights reserved
  • 13. 3-Tier Layer Bank company wants a CRM application with a SOA approach. Security is critical. - Int. Auth, Int. Net. Security UI Layer 1 CRM HomeBank - Resource based User Stories Business Layer Account Customer - Cache Scalablility Services Services 2 - OutDoc Documentation Accounts Customers www.outsystems.com Page 13 © 2012 OutSystems – all rights reserved
  • 14. Extranet Insurance company wants to scale out claim management through partners. Small Large Partners - Use reUse Granularity Partners - Return error Error Handling WebPortal - Application Log Logging agileplatform™ Claim Services - HTTPS + S.Token Security Claim Management www.outsystems.com Page 14 © 2012 OutSystems – all rights reserved
  • 15. What is a Good API? Hard to Leads to misuse readable code Stable Easy to learn Complete and memorize www.outsystems.com Page 15 © 2012 OutSystems – all rights reserved
  • 17. www.outsystems.com Page 17 © 2012 OutSystems – all rights reserved
  • 18. andre.vieira@outsystems.com nuno.baptista@outsystems.com www.outsystems.com Page 18 © 2012 OutSystems – all rights reserved