SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
Web APIs
Carlos Santos
Tecnologias Dinâmicas para a Internet - MCMM - UA
25 outubro 2013
API
•

Application programming interface

•

“Reasons Why APIs Are Reshaping Your Business”
http://www.slideshare.net/faberNovel/6-reasons-why-apis-are-reshaping-yourbusiness

•

(1 a 18)

Página Wikipédia sobre APIs http://en.wikipedia.org/wiki/
Application_programming_interface

•

ver referência: “What is an API? Your guide to
the Internet Business (R)evolution” http://www.
3scale.net/wp-content/uploads/2012/06/What-is-an-API-1.0.pdf
SOAP vs REST
•

Web Services vs Web API
•

[...] a software system designed to support interoperable
machine-to-machine interaction over a network. It has an
interface described in a machine-processable format
(specifically WSDL). Other systems interact with the Web
service in a manner prescribed by its description using SOAP
messages, typically conveyed using HTTP with an XML serialization
in conjunction with other Web-related standards. (W3C)

•

Complexidade vs Simplicidade

•

Proprietário vs Aberto
REST
“REST, or in the full form, Representational State Transfer has become the standard design
architecture for developing web APIs. At its heart REST is a stateless client-server relationship;
this means that unlike many other approaches there is no client context being stored server
side (no Sessions). To counteract that, each request contains all the information necessary for
the server to authenticate the user, and any session state data that must be sent as well.




REST takes advantage of the HTTP request methods to layer itself into the existing HTTP
architecture. These operations consist of the following:
•

GET - Used for basic read requests to the server

•

PUT - Used to modify an existing object on the server

•

POST - Used to create a new object on the server

•

DELETE - Used to remove an object on the server

By creating URI endpoints that utilize these operations, a RESTful API is quickly assembled.”
“Creating a RESTful API with PHP” - http://coreymaynard.com/blog/creating-a-restful-api-with-php/
HTTP
•

“HTTP: The Protocol Every Web Developer Must
Know” http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocolevery-web-developer-must-know-part-1/

•

Mais importante: Verbos e Status Codes
Boas práticas
•

“How To Design A Good API and Why it Matters”
•
•

•

vídeo: http://www.youtube.com/watch?v=heh4OeB9A-c
slides: http://lcsd05.cs.tamu.edu/slides/keynote.pdf

“Best Practices for Designing a Pragmatic RESTful
API” http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
XML vs JSON

http://www.oxygenxml.com/xml_editor/json_editor.html
XML vs JSON
•

“JSON vs XML: How JSON Is Superior To XML”
https://www.udemy.com/blog/json-vs-xml/

•

“Why JSON will continue to push XML out of the
picture” http://blog.appfog.com/why-json-will-continue-to-push-xml-outof-the-picture/

•

“JSON: The Fat-Free Alternative to XML” http://
www.json.org/xml.html
JSON
•

“JSON” http://en.wikipedia.org/wiki/JSON

•

“jQuery.getJSON()” http://api.jquery.com/jQuery.getJSON/

•

“jQuery.parseJSON()” http://api.jquery.com/jQuery.parseJSON/

•

“PHP: JSON - Manual” http://php.net/manual/en/
book.json.php
XSS
•

“What is Cross Site Scripting and How Can You Fix
it?” http://www.acunetix.com/websitesecurity/cross-site-scripting/

•

“Cross-site scripting” http://en.wikipedia.org/wiki/Crosssite_scripting

•

“Same origin policy” http://en.wikipedia.org/wiki/Sameorigin_policy
JSONP vs Proxy
•

Como efetuar pedidos Ajax?
•

•

“Breaking The Cross Domain Barrier” http://www.slideshare.net/SlexAxton/
breaking-the-cross-domain-barrier

JSONP
•

•

•

http://en.wikipedia.org/wiki/JSONP
http://stackoverflow.com/questions/2067472/what-is-jsonp-all-about

Proxy
•

http://developer.yahoo.com/javascript/howto-proxy.html
Autenticação
•

“Basic access authentication” http://en.wikipedia.org/wiki/
Basic_access_authentication

•

“Digest access authentication” http://en.wikipedia.org/wiki/
Digest_access_authentication

•

OAuth (1.0 ou 2.0) http://en.wikipedia.org/wiki/Oauth
Versões
•

Compatibilidade?

•

E quando deixa de existir?

•

“Best Practices for Designing a Pragmatic RESTful
API” http://www.vinaysahni.com/best-practices-for-a-pragmatic-restfulapi#versioning
Segurança API
•

API Rate limiting
•

http://stackoverflow.com/questions/8775079/

•

http://www.quora.com/APIs/How-are-API-keys-and-developer-accountsgenerated-by-platforms-like-Facebook-Twitter-Mint-and-LinkedIn
A seguir...

•

Exemplo de criação de uma Web API em REST
com respostas em JSON
•

http://code.ua.pt/projects/ajax-api-ntc-lab4-2012

Weitere ähnliche Inhalte

Was ist angesagt?

Rishabh Technology and Tools Overview (1)
Rishabh Technology and Tools Overview (1)Rishabh Technology and Tools Overview (1)
Rishabh Technology and Tools Overview (1)
D Trivedi
 
Eclipse E4 Open Social Gadgetsvrs3
Eclipse E4 Open Social Gadgetsvrs3Eclipse E4 Open Social Gadgetsvrs3
Eclipse E4 Open Social Gadgetsvrs3
Lars Vogel
 
One Hour Translation at WPTLV
One Hour Translation at WPTLVOne Hour Translation at WPTLV
One Hour Translation at WPTLV
dsero
 
Wix Apps in WP TLV
Wix Apps in WP TLVWix Apps in WP TLV
Wix Apps in WP TLV
dsero
 

Was ist angesagt? (20)

What is IBM Bluemix , Une nouvelle façon de coder , dans le cloud
What is IBM Bluemix , Une nouvelle façon de coder , dans le cloudWhat is IBM Bluemix , Une nouvelle façon de coder , dans le cloud
What is IBM Bluemix , Une nouvelle façon de coder , dans le cloud
 
Picking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use CasePicking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use Case
 
Rishabh Technology and Tools Overview (1)
Rishabh Technology and Tools Overview (1)Rishabh Technology and Tools Overview (1)
Rishabh Technology and Tools Overview (1)
 
Eclipse E4 Open Social Gadgetsvrs3
Eclipse E4 Open Social Gadgetsvrs3Eclipse E4 Open Social Gadgetsvrs3
Eclipse E4 Open Social Gadgetsvrs3
 
Api gateway : To be or not to be
Api gateway : To be or not to beApi gateway : To be or not to be
Api gateway : To be or not to be
 
One Hour Translation at WPTLV
One Hour Translation at WPTLVOne Hour Translation at WPTLV
One Hour Translation at WPTLV
 
Wix Apps in WP TLV
Wix Apps in WP TLVWix Apps in WP TLV
Wix Apps in WP TLV
 
用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人
 
World Azure Day Mobile Services Presentation
World Azure Day Mobile Services PresentationWorld Azure Day Mobile Services Presentation
World Azure Day Mobile Services Presentation
 
Serverless patterns v3 public
Serverless patterns v3 publicServerless patterns v3 public
Serverless patterns v3 public
 
Salesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 MarchSalesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 March
 
Platforms FTW!
Platforms FTW!Platforms FTW!
Platforms FTW!
 
Aapkamanch
AapkamanchAapkamanch
Aapkamanch
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Pushing the boundaries a deep-dive into real-world share point add-in and a...
Pushing the boundaries   a deep-dive into real-world share point add-in and a...Pushing the boundaries   a deep-dive into real-world share point add-in and a...
Pushing the boundaries a deep-dive into real-world share point add-in and a...
 
Adapting iOS 8 in iOS 7 Apps
Adapting iOS 8 in iOS 7 Apps Adapting iOS 8 in iOS 7 Apps
Adapting iOS 8 in iOS 7 Apps
 
Introduction to Azure Web Applications for Office and SharePoint Developers
Introduction to Azure Web Applications for Office and SharePoint DevelopersIntroduction to Azure Web Applications for Office and SharePoint Developers
Introduction to Azure Web Applications for Office and SharePoint Developers
 
Symfony demonstration
Symfony demonstrationSymfony demonstration
Symfony demonstration
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing Swagger
 
Full stack
Full stackFull stack
Full stack
 

Andere mochten auch (6)

T18_LM3: Ajax
T18_LM3: AjaxT18_LM3: Ajax
T18_LM3: Ajax
 
T17_LM3: Erros/Debug (2013-2014)
T17_LM3: Erros/Debug (2013-2014)T17_LM3: Erros/Debug (2013-2014)
T17_LM3: Erros/Debug (2013-2014)
 
T15_T16_LM3: Mais objetos do Javascript (2013-2014)
T15_T16_LM3: Mais objetos do Javascript (2013-2014)T15_T16_LM3: Mais objetos do Javascript (2013-2014)
T15_T16_LM3: Mais objetos do Javascript (2013-2014)
 
07 LabMM4 - Bases de dados
07 LabMM4 - Bases de dados07 LabMM4 - Bases de dados
07 LabMM4 - Bases de dados
 
T13_LM3: Arrays (2013-2014)
T13_LM3: Arrays (2013-2014)T13_LM3: Arrays (2013-2014)
T13_LM3: Arrays (2013-2014)
 
Sessão de acolhimento do MCMM da Universidade de Aveiro (2016/2017)
Sessão de acolhimento do MCMM da Universidade de Aveiro (2016/2017)Sessão de acolhimento do MCMM da Universidade de Aveiro (2016/2017)
Sessão de acolhimento do MCMM da Universidade de Aveiro (2016/2017)
 

Ähnlich wie Web APIs

Web Application Frameworks (WAF)
Web Application Frameworks (WAF)Web Application Frameworks (WAF)
Web Application Frameworks (WAF)
Ako Kaman
 

Ähnlich wie Web APIs (20)

Introduction to Google APIs
Introduction to Google APIsIntroduction to Google APIs
Introduction to Google APIs
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
 
Web Application Frameworks (WAF)
Web Application Frameworks (WAF)Web Application Frameworks (WAF)
Web Application Frameworks (WAF)
 
Build Modern Web Apps Using ASP.NET Web API and AngularJS
Build Modern Web Apps Using ASP.NET Web API and AngularJSBuild Modern Web Apps Using ASP.NET Web API and AngularJS
Build Modern Web Apps Using ASP.NET Web API and AngularJS
 
Do not automate GUI testing
Do not automate GUI testingDo not automate GUI testing
Do not automate GUI testing
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)
 
What’s behind a high quality web API? Ensure your APIs are more than just a ...
What’s behind a high quality web API? Ensure your APIs are more than just a ...What’s behind a high quality web API? Ensure your APIs are more than just a ...
What’s behind a high quality web API? Ensure your APIs are more than just a ...
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
 
Extend soa with api management spoug- Madrid
Extend soa with api management   spoug- MadridExtend soa with api management   spoug- Madrid
Extend soa with api management spoug- Madrid
 
Design & Deploy a data-driven Web API in 2 hours
Design & Deploy a data-driven Web API in 2 hoursDesign & Deploy a data-driven Web API in 2 hours
Design & Deploy a data-driven Web API in 2 hours
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
M meijer api management - tech-days 2015
M meijer   api management - tech-days 2015M meijer   api management - tech-days 2015
M meijer api management - tech-days 2015
 
Integrating Alfresco with Portals
Integrating Alfresco with PortalsIntegrating Alfresco with Portals
Integrating Alfresco with Portals
 
Designing RESTful APIs
Designing RESTful APIsDesigning RESTful APIs
Designing RESTful APIs
 
REST APIs
REST APIsREST APIs
REST APIs
 
Getting to Grips with RESTful APIs
Getting to Grips with RESTful APIsGetting to Grips with RESTful APIs
Getting to Grips with RESTful APIs
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web Sites
 
Rhodes
RhodesRhodes
Rhodes
 

Mehr von Carlos Santos

AVILA Crew – Uma experiência de tutoria de alunos para alunos
AVILA Crew – Uma experiência de tutoria de alunos para alunosAVILA Crew – Uma experiência de tutoria de alunos para alunos
AVILA Crew – Uma experiência de tutoria de alunos para alunos
Carlos Santos
 
SAPO Campus: Gamification em contexto educativo
SAPO Campus: Gamification em contexto educativoSAPO Campus: Gamification em contexto educativo
SAPO Campus: Gamification em contexto educativo
Carlos Santos
 
T20_LM3: APIs e Scoreoid
T20_LM3: APIs e ScoreoidT20_LM3: APIs e Scoreoid
T20_LM3: APIs e Scoreoid
Carlos Santos
 
T19_LM3: Projeto final e documentação de planificação
T19_LM3: Projeto final e documentação de planificaçãoT19_LM3: Projeto final e documentação de planificação
T19_LM3: Projeto final e documentação de planificação
Carlos Santos
 
T14_LM3: Animação (2013-2014)
T14_LM3: Animação (2013-2014)T14_LM3: Animação (2013-2014)
T14_LM3: Animação (2013-2014)
Carlos Santos
 
T12_LM3: Arrays (2013-2014)
T12_LM3: Arrays (2013-2014)T12_LM3: Arrays (2013-2014)
T12_LM3: Arrays (2013-2014)
Carlos Santos
 
T11_LM3: Subalgoritmose colisões (2013-2014)
T11_LM3: Subalgoritmose colisões (2013-2014)T11_LM3: Subalgoritmose colisões (2013-2014)
T11_LM3: Subalgoritmose colisões (2013-2014)
Carlos Santos
 

Mehr von Carlos Santos (20)

Is AI the Spice of our future?
Is AI the Spice of our future?Is AI the Spice of our future?
Is AI the Spice of our future?
 
Mentoria entre pares de estudantes para estudantes
Mentoria entre pares de estudantes para estudantesMentoria entre pares de estudantes para estudantes
Mentoria entre pares de estudantes para estudantes
 
1º Encontro Científico TCEdu
1º Encontro Científico TCEdu1º Encontro Científico TCEdu
1º Encontro Científico TCEdu
 
Tecnologias da Comunicação em Educação 2018: Aula inicial
Tecnologias da Comunicação em Educação 2018: Aula inicialTecnologias da Comunicação em Educação 2018: Aula inicial
Tecnologias da Comunicação em Educação 2018: Aula inicial
 
AVILA Crew - Uma experiência de tutoria (com jogos) de alunos para alunos
AVILA Crew - Uma experiência de tutoria (com jogos) de alunos para alunosAVILA Crew - Uma experiência de tutoria (com jogos) de alunos para alunos
AVILA Crew - Uma experiência de tutoria (com jogos) de alunos para alunos
 
AVILA Crew – Uma experiência de tutoria de alunos para alunos
AVILA Crew – Uma experiência de tutoria de alunos para alunosAVILA Crew – Uma experiência de tutoria de alunos para alunos
AVILA Crew – Uma experiência de tutoria de alunos para alunos
 
chmod 777 education
chmod 777 educationchmod 777 education
chmod 777 education
 
Mestrado em Comunicação Multimédia da Universidade de Aveiro - Sessão de acol...
Mestrado em Comunicação Multimédia da Universidade de Aveiro - Sessão de acol...Mestrado em Comunicação Multimédia da Universidade de Aveiro - Sessão de acol...
Mestrado em Comunicação Multimédia da Universidade de Aveiro - Sessão de acol...
 
Tecnologias da Comunicação em Educação: trabalho prático
Tecnologias da Comunicação em Educação: trabalho práticoTecnologias da Comunicação em Educação: trabalho prático
Tecnologias da Comunicação em Educação: trabalho prático
 
chmod 777 education
chmod 777 educationchmod 777 education
chmod 777 education
 
SAPO Campus towards a
 Smart Learning Environment
SAPO Campus towards a
 Smart Learning EnvironmentSAPO Campus towards a
 Smart Learning Environment
SAPO Campus towards a
 Smart Learning Environment
 
Repensar a tecnologia em contexto educativo: o caso do SAPO Campus
Repensar a tecnologia em contexto educativo: o caso do SAPO CampusRepensar a tecnologia em contexto educativo: o caso do SAPO Campus
Repensar a tecnologia em contexto educativo: o caso do SAPO Campus
 
A technological approach to Open and Social Learning: 
the SAPO Campus project
A technological approach to Open and Social Learning: 
the SAPO Campus projectA technological approach to Open and Social Learning: 
the SAPO Campus project
A technological approach to Open and Social Learning: 
the SAPO Campus project
 
SAPO Campus: Gamification em contexto educativo
SAPO Campus: Gamification em contexto educativoSAPO Campus: Gamification em contexto educativo
SAPO Campus: Gamification em contexto educativo
 
Repensar a tecnologia em contextos educativos: o SAPO Campus no DeCA
Repensar a tecnologia em contextos educativos: o SAPO Campus no DeCARepensar a tecnologia em contextos educativos: o SAPO Campus no DeCA
Repensar a tecnologia em contextos educativos: o SAPO Campus no DeCA
 
T20_LM3: APIs e Scoreoid
T20_LM3: APIs e ScoreoidT20_LM3: APIs e Scoreoid
T20_LM3: APIs e Scoreoid
 
T19_LM3: Projeto final e documentação de planificação
T19_LM3: Projeto final e documentação de planificaçãoT19_LM3: Projeto final e documentação de planificação
T19_LM3: Projeto final e documentação de planificação
 
T14_LM3: Animação (2013-2014)
T14_LM3: Animação (2013-2014)T14_LM3: Animação (2013-2014)
T14_LM3: Animação (2013-2014)
 
T12_LM3: Arrays (2013-2014)
T12_LM3: Arrays (2013-2014)T12_LM3: Arrays (2013-2014)
T12_LM3: Arrays (2013-2014)
 
T11_LM3: Subalgoritmose colisões (2013-2014)
T11_LM3: Subalgoritmose colisões (2013-2014)T11_LM3: Subalgoritmose colisões (2013-2014)
T11_LM3: Subalgoritmose colisões (2013-2014)
 

Kürzlich hochgeladen

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

Web APIs

  • 1. Web APIs Carlos Santos Tecnologias Dinâmicas para a Internet - MCMM - UA 25 outubro 2013
  • 2. API • Application programming interface • “Reasons Why APIs Are Reshaping Your Business” http://www.slideshare.net/faberNovel/6-reasons-why-apis-are-reshaping-yourbusiness • (1 a 18) Página Wikipédia sobre APIs http://en.wikipedia.org/wiki/ Application_programming_interface • ver referência: “What is an API? Your guide to the Internet Business (R)evolution” http://www. 3scale.net/wp-content/uploads/2012/06/What-is-an-API-1.0.pdf
  • 3. SOAP vs REST • Web Services vs Web API • [...] a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards. (W3C) • Complexidade vs Simplicidade • Proprietário vs Aberto
  • 4. REST “REST, or in the full form, Representational State Transfer has become the standard design architecture for developing web APIs. At its heart REST is a stateless client-server relationship; this means that unlike many other approaches there is no client context being stored server side (no Sessions). To counteract that, each request contains all the information necessary for the server to authenticate the user, and any session state data that must be sent as well.
 
 REST takes advantage of the HTTP request methods to layer itself into the existing HTTP architecture. These operations consist of the following: • GET - Used for basic read requests to the server • PUT - Used to modify an existing object on the server • POST - Used to create a new object on the server • DELETE - Used to remove an object on the server By creating URI endpoints that utilize these operations, a RESTful API is quickly assembled.” “Creating a RESTful API with PHP” - http://coreymaynard.com/blog/creating-a-restful-api-with-php/
  • 5. HTTP • “HTTP: The Protocol Every Web Developer Must Know” http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocolevery-web-developer-must-know-part-1/ • Mais importante: Verbos e Status Codes
  • 6. Boas práticas • “How To Design A Good API and Why it Matters” • • • vídeo: http://www.youtube.com/watch?v=heh4OeB9A-c slides: http://lcsd05.cs.tamu.edu/slides/keynote.pdf “Best Practices for Designing a Pragmatic RESTful API” http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
  • 8. XML vs JSON • “JSON vs XML: How JSON Is Superior To XML” https://www.udemy.com/blog/json-vs-xml/ • “Why JSON will continue to push XML out of the picture” http://blog.appfog.com/why-json-will-continue-to-push-xml-outof-the-picture/ • “JSON: The Fat-Free Alternative to XML” http:// www.json.org/xml.html
  • 9. JSON • “JSON” http://en.wikipedia.org/wiki/JSON • “jQuery.getJSON()” http://api.jquery.com/jQuery.getJSON/ • “jQuery.parseJSON()” http://api.jquery.com/jQuery.parseJSON/ • “PHP: JSON - Manual” http://php.net/manual/en/ book.json.php
  • 10. XSS • “What is Cross Site Scripting and How Can You Fix it?” http://www.acunetix.com/websitesecurity/cross-site-scripting/ • “Cross-site scripting” http://en.wikipedia.org/wiki/Crosssite_scripting • “Same origin policy” http://en.wikipedia.org/wiki/Sameorigin_policy
  • 11. JSONP vs Proxy • Como efetuar pedidos Ajax? • • “Breaking The Cross Domain Barrier” http://www.slideshare.net/SlexAxton/ breaking-the-cross-domain-barrier JSONP • • • http://en.wikipedia.org/wiki/JSONP http://stackoverflow.com/questions/2067472/what-is-jsonp-all-about Proxy • http://developer.yahoo.com/javascript/howto-proxy.html
  • 12. Autenticação • “Basic access authentication” http://en.wikipedia.org/wiki/ Basic_access_authentication • “Digest access authentication” http://en.wikipedia.org/wiki/ Digest_access_authentication • OAuth (1.0 ou 2.0) http://en.wikipedia.org/wiki/Oauth
  • 13. Versões • Compatibilidade? • E quando deixa de existir? • “Best Practices for Designing a Pragmatic RESTful API” http://www.vinaysahni.com/best-practices-for-a-pragmatic-restfulapi#versioning
  • 14. Segurança API • API Rate limiting • http://stackoverflow.com/questions/8775079/ • http://www.quora.com/APIs/How-are-API-keys-and-developer-accountsgenerated-by-platforms-like-Facebook-Twitter-Mint-and-LinkedIn
  • 15. A seguir... • Exemplo de criação de uma Web API em REST com respostas em JSON • http://code.ua.pt/projects/ajax-api-ntc-lab4-2012