SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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 cloudPatrick Bouillaud
 
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 CaseJimmy Guerrero
 
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 Gadgetsvrs3Lars Vogel
 
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 beJaewoo Ahn
 
One Hour Translation at WPTLV
One Hour Translation at WPTLVOne Hour Translation at WPTLV
One Hour Translation at WPTLVdsero
 
Wix Apps in WP TLV
Wix Apps in WP TLVWix Apps in WP TLV
Wix Apps in WP TLVdsero
 
用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人Kevin Luo
 
World Azure Day Mobile Services Presentation
World Azure Day Mobile Services PresentationWorld Azure Day Mobile Services Presentation
World Azure Day Mobile Services PresentationDmitri Artamonov
 
Serverless patterns v3 public
Serverless patterns v3 publicServerless patterns v3 public
Serverless patterns v3 publicYochay Kiriaty
 
Salesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 MarchSalesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 MarchJitendra Zaa
 
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 experiencesAndy_Gaskell
 
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...InnoTech
 
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 Aviel Lazar
 
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 DevelopersEric Shupps
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing SwaggerTony Tam
 

Tendances (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
 

En vedette

T17_LM3: Erros/Debug (2013-2014)
T17_LM3: Erros/Debug (2013-2014)T17_LM3: Erros/Debug (2013-2014)
T17_LM3: Erros/Debug (2013-2014)Carlos Santos
 
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)Carlos Santos
 
07 LabMM4 - Bases de dados
07 LabMM4 - Bases de dados07 LabMM4 - Bases de dados
07 LabMM4 - Bases de dadosCarlos Santos
 
T13_LM3: Arrays (2013-2014)
T13_LM3: Arrays (2013-2014)T13_LM3: Arrays (2013-2014)
T13_LM3: Arrays (2013-2014)Carlos Santos
 
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)Carlos Santos
 

En vedette (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)
 

Similaire à Web APIs

Introduction to Google APIs
Introduction to Google APIsIntroduction to Google APIs
Introduction to Google APIsSiva Arunachalam
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构Benjamin Tan
 
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 APIRasan Samarasinghe
 
Web Application Frameworks (WAF)
Web Application Frameworks (WAF)Web Application Frameworks (WAF)
Web Application Frameworks (WAF)Ako Kaman
 
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 AngularJSTaiseer Joudeh
 
Do not automate GUI testing
Do not automate GUI testingDo not automate GUI testing
Do not automate GUI testingAtila Inovecký
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)Cisco DevNet
 
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 ...Kim Clark
 
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 NagchowdhuryKaren Broughton-Mabbitt
 
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- MadridVinay Kumar
 
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 hoursRestlet
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
Integrating Alfresco with Portals
Integrating Alfresco with PortalsIntegrating Alfresco with Portals
Integrating Alfresco with PortalsPiergiorgio Lucidi
 
Designing RESTful APIs
Designing RESTful APIsDesigning RESTful APIs
Designing RESTful APIsanandology
 
Getting to Grips with RESTful APIs
Getting to Grips with RESTful APIsGetting to Grips with RESTful APIs
Getting to Grips with RESTful APIsPetko Mikhailov
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013Jerome Louvel
 
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 SitesRestlet
 

Similaire à 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
 

Plus de Carlos Santos

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?Carlos Santos
 
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 estudantesCarlos Santos
 
1º Encontro Científico TCEdu
1º Encontro Científico TCEdu1º Encontro Científico TCEdu
1º Encontro Científico TCEduCarlos Santos
 
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 inicialCarlos Santos
 
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 alunosCarlos 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 alunosCarlos Santos
 
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...Carlos Santos
 
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áticoCarlos Santos
 
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 EnvironmentCarlos Santos
 
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 CampusCarlos Santos
 
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 projectCarlos Santos
 
SAPO Campus: Gamification em contexto educativo
SAPO Campus: Gamification em contexto educativoSAPO Campus: Gamification em contexto educativo
SAPO Campus: Gamification em contexto educativoCarlos Santos
 
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 DeCACarlos Santos
 
T20_LM3: APIs e Scoreoid
T20_LM3: APIs e ScoreoidT20_LM3: APIs e Scoreoid
T20_LM3: APIs e ScoreoidCarlos 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çãoCarlos 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
 

Plus de 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)
 

Dernier

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Dernier (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

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