SlideShare a Scribd company logo
High Performance
APIs
Jacksonfdam
http://about.me/jacksonfdam
https://bitbucket.org/jacksonfdam
https://github.com/jacksonfdam
http://linkedin.com/in/jacksonfdam
@jacksonfdam
APIs: Windows To The Code
In the simplest terms, APIs are sets of requirements that govern
how one application can talk to another.
APIs: Windows To The Code
APIs do all this by exposing some of a program's internal
functions to the outside world in a limited fashion.
API Analogy
Every time you want to access a set of data from an application,
you have to call the API. But there is only a certain amount of
data the application will let you access, so you have to
communicate to the operator in a very specific language—a
language unique to each application.
API Analogy
A simple classification of APIs
Web service APIs
- SOAP
- XML-RPC and JSON-RPC
- REST
WebSocket APIs
Library-based APIs
- JavaScript
- TWAIN
Class-based APIs (object orientation)
- Java API
- Android API
OS functions and routines
- Access to file system
- Access to user interface
Object remoting APIs
- CORBA
- .NET
Remoting Hardware APIs
- Video acceleration
- Hard disk drives
- PCI buses
Webservices
A description of the communication methods allowed
• Requesting information
• Sending information
• Updating information
Webservices
Most often-used types of web service:
• SOAP
• XML-RPC
• JSON-RPC
• REST
Webservices
Most often-used types of web service:
• SOAP
• XML-RPC
• JSON-RPC
• REST
SOAP (Simple Object Access Protocol)
SOAP is a protocol that defines the communication method,
and the structure of the messages.
The data transfer format is XML.
A SOAP service publishes a definition of its interface in a
machine-readable document, using WSDL – Web Services
Definition Language.
XML-RPC
XML-RPC is an older protocol than SOAP. It uses a specific XML
format for data transfer, whereas SOAP allows a proprietary
XML format.
An XML-RPC call tends to be much simpler, and to use less
bandwidth, than a SOAP call. (SOAP is known to be “verbose”.)
SOAP and XML-RPC have different levels of support in various
libraries.
JSON-RPC
JSON-RPC is similar to XML-RPC, but uses JSON instead of
XML for data transfer.
REST (Representational state transfer)
REST is not a protocol, but rather a set of architectural
principles. The thing that differentiates a REST service from
other web services is its architecture. Some of the
characteristics required of a REST service include simplicity of
interfaces, identification of resources within the request, and
the ability to manipulate the resources via the interface. There
are a number of other, more fundamental architectural
requirements too.
REST Principles
It is these principles that characterize most of REST-based APIs
in use today:
• Precedence of the client-server relationship
• Requirement for stateless communication
• Implementation of cache constraints to engender efficiencies in network
communications
• Use of a uniform interface through standardized data elements such as
resources and representations
REST Principles
The common perception is that REST offers a lightweight alternative to
service-orientated mechanisms such as SOAP.
REST Principles
REST allows for the fine-grained control of objects through the use of
resources (expressed as URIs) that also allows for greater efficiency in
communications with the server (obviously important when implemented on
a mobile device).
XML and JSON
The growth of REST has been complemented by the increasing use of
JavaScript Object Notation (JSON) as the mechanism by which resources are
represented.
XML and JSON
Mobile apps driving the adoption of web APIs and the need for a compact
payloads over constrained communication links.
The consumption of web APIs by a web developer community and the
resonance of JSON-encoded data with this audience
XML and JSON
The use of JSON over XML is not a dichotomy. You will make design
decisions where you support one, both, or even other formats dependent on
the intended audience.
Layman terms
What is the difference between REST and SOAP?
Layman terms
What's the difference between MVC and HTTP?
Layman terms
MVC and REST are architectural patterns.
Layman terms
HTTP and SOAP are set of rules i.e. protocols.
Layman terms
In layman terms you are asking - What's the difference between a building
plan-map and building making process.
Layman terms
Building Plan map is deciding how you will place different things e.g.
Bathroom, dining room, doors, bed-room etc. in a particular geographical
area.
Layman terms
MVC is deciding how you will separate concerns regarding data, business
logic and controls.
Layman terms
REST is deciding how you will use different HTTP verbs to perform one of
CRUD operation on your data.
Layman terms
Building making process is following predefined steps like first create
foundation then walls and in the end go for roof.
Layman terms
HTTP is following predefined rules like you need to send request on port 80
which will consist of two parts: HTTP headers and HTTP body.
Layman terms
SOAP is following predefined set of rules how and where you can place
function to be called and various parameters to be passed in that function in
your XML SOAP request.
Layman terms
SOAP is rigid XML structure. XML is overwhelmed by data-size.
REST can use XML or JSON.
JSON is just key - value pairs.
Layman terms
Use SOAP:
1. when you have no other option provided by API exposer.
2. when your end user want to have only SOAP response.
3. Faster development. As tools Axis 2 and cxf exist. :)
Layman terms
Use REST(with JSON):
1. To have cleaner software architecture.
2. To save server resources (JSON is smaller to process).
3. To save network resources (JSON size is smaller than XML).
4. To save client side resources (JSON is much faster to parse).
RESTful API
http://social.yahooapis.com/v1/user/{guid}/profile
http://api.linkedin.com/v1/people/{guid}
RESTful API
<?xml version="1.0" encoding="UTF-8"?>
<person>
<id>111222</id>
<first-name>Jackson</first-name>
<last-name>Mafra</last-name>
<headline>Software Engineer</headline>
<connections total=”1776"> …
</person>
RESTful API
What’s Missing?
Ability to get exactly what you need (variety)
• If you need more, may require multiple API calls (if they exist)
• If you need less, resources are wasted
Consistency of responses (uniformity)
• “Same” object returned by different APIs may have different structure
• Once in production, hard to get consistent later
RESTful API
Multiple Calls to Get What You Need
Want to get user’s friend’s profile? Do this…
http://social.yahooapis.com/v1/user/123/connections
<connections yahoo:start="0" yahoo:count="1" yahoo:total="1">
<connection yahoo:uri="http://social.yahooapis.com/v1/user/123/connection/456? view=usercard">
<guid>456</guid>
<contactId>4</contactId>
</connection>
</connections>
RESTful API
Multiple Calls to Get What You Need
… then make second call to get friend’s profile:
http://social.yahooapis.com/v1/user/456/profile
<profile yahoo:uri="http://social.yahooapis.com/v1/user/456/profile">
<guid>456</guid>
<birthdate>3/3</birthdate>
<created>2008-08-4T17:13:56Z</created>
...
</profile>
- Latent, redundant data
- Optimization requires stickiness
RESTful API
Typical Solution
Variety versus Uniformity
- Solution: introduce another call
- Desire for variety of responses undermines uniformity of requests
- Leads to RPC-like REST APIs
- Many APIs + Great Documentation = Lots of Reading + Lack of Automation
RESTful API
Domain Model as Foundation
Sample Domain Model
/people : Person[] // collection of Person resources
/id : string // primary key
/name : string
/email : string // unique key
/photo : url
/best-friend : Person
/friends : Person[]
/jobs : Job[] // collection of Job resources
/company : Company
/title : string
/start-date : date
/end-date : date …
/companies : Company[]
/name : string
/ceo : Person
…
RESTful API
Domain Model as Foundation
Follow request URL to navigate through your model
To get a person’s profile: http://api.linkedin.com/v2/people/123
<person uri=“urn:linkedin:v2:people/123” key=“123”>
<id>123</id>
<name>Reid Hoffman</name>
<email>reid@linkedin.com</email>
<best-friend uri=“urn:linkedin:v2:people/456”/>
</person>
Conventional URL in request
Default representation in response
/people[/id=123]
/id
/name
/email
/photo
/best-friend
/friends
…
/jobs
/company
/title
/start-date
/end-date
…
/companies
/name
/ceo
…
RESTful API
Domain Model as Foundation
Fine-grained Request
What if you only need certain fields (e.g., name and photo)?
http://api.linkedin.com/v2/people/123:(name,photo)
<person>
<name>Reid Hoffman</name>
<photo>http://media.linkedin.com/photos/123.jpeg</photo>
</person> …
/people[/id=123]
/id
/name
/email
/photo
/best-friend
/friends
/jobs
/company
/title
/start-date
/end-date
…
RESTful API
Domain Model as Foundation
Fine-grained Request
To get names and photos of one’s friends and their best friends:
…/v2/people/456/friends:(name,photo,best-friend: (name,photo))
<friends total=“66” start=“0”>
<friend uri=“urn:linkedin:v2:people/123” key=“123”>
<name>Reid Hoffman</name>
<photo>http://media.linkedin.com/photos/123.jpeg</photo>
<best-friend uri=“urn:linkedin:v2:people/456” key=“456”>
<name>Brandon Duncan</name>
<photo>http://media.linkedin.com/photos/456.jpeg</photo>
</best-friend>
</friend>
<friend>…</friend>
</friends>
…
/people[/id=456]
/id
/name
/email
/photo
/best-friend
/friends
/123
/id
/name
/email
/photo
/best-friend
/name
/photo
/jobs
RESTful API
Domain Model as Foundation
Fine-grained Request
Allows client to construct custom calls
Better than digging for the closest matching API:
http://social...com/v1/user/123/profile
http://social...com/v1/user/123/profile/usercard
http://social...com/v1/user/123/profile/tinyusercard
Allows optimization on the backend
RESTful API
Domain Model as Foundation
Fine-grained Request
Benefits
- Provides a frame for both request and response semantics
- Still allows for flexible syntax
- Requests – path, query params, matrix params…
- Responses – JSON, XML…
- Helps to unify and automate many development tasks on both ends
- Request / response creation, parsing, marshalling
- Code (and documentation) generation
- Discovery services
RESTful API
Domain Model as Foundation
Fine-grained Request
Benefits
- Provides a frame for both request and response semantics
- Still allows for flexible syntax
- Requests – path, query params, matrix params…
- Responses – JSON, XML…
- Helps to unify and automate many development tasks on both ends
- Request / response creation, parsing, marshalling
- Code (and documentation) generation
- Discovery services
RESTful API
Examples of LinkedIn APIs HTTP GET - Read
…/people/email=brandon@gmail.com/friends?sort=name
…/people/123/friends;sort=name:(name,jobs;sort=start-date)
…/people:(id,name,photo)?name=page&company=google
…/people::(123,456)
…/people::(123,456):(name,photo)
RESTful API
Incentive System
• Multiple ways to get at the same data
• Partner can ask for exactly what they need
• Associate cost with resources, system of accounting creates incentives for
partners
• Throttling by resource rather than API
Thank you!
jacksonfdam@gmail.com
t
f
in
Email Socialmedia
@jacksonfdam
@mafra.jackson
@jacksonfdam

More Related Content

What's hot

ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA RuntimesApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
Jean-Sebastien Delfino
 
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache TuscanyApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
Jean-Sebastien Delfino
 
Cakephp
CakephpCakephp
Laravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routingLaravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routing
Christopher Pecoraro
 
CakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldCakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your world
Graham Weldon
 
PHP programmimg
PHP programmimgPHP programmimg
PHP programmimg
Sharbani Bhattacharya
 
Intro to flask2
Intro to flask2Intro to flask2
Intro to flask2
Mohamed Essam
 
REST API Laravel
REST API LaravelREST API Laravel
REST API Laravel
John Dave Decano
 
Cakephp manual-11
Cakephp manual-11Cakephp manual-11
Cakephp manual-11
Aditya Pandey
 
Application Note APLX-LMW-0403: Interfacing the Apache Web ...
Application Note APLX-LMW-0403: Interfacing the Apache Web ...Application Note APLX-LMW-0403: Interfacing the Apache Web ...
Application Note APLX-LMW-0403: Interfacing the Apache Web ...
webhostingguy
 
Soap
SoapSoap
2021.laravelconf.tw.slides1
2021.laravelconf.tw.slides12021.laravelconf.tw.slides1
2021.laravelconf.tw.slides1
LiviaLiaoFontech
 
Last train to php 7
Last train to php 7Last train to php 7
Last train to php 7
Damien Seguy
 
Object Oriented Programming with Laravel - Session 2
Object Oriented Programming with Laravel - Session 2Object Oriented Programming with Laravel - Session 2
Object Oriented Programming with Laravel - Session 2
Shahrzad Peyman
 
Laravel 5 New Features
Laravel 5 New FeaturesLaravel 5 New Features
Laravel 5 New Features
Joe Ferguson
 
Asynchronous reading and writing http r equest
Asynchronous reading and writing http r equestAsynchronous reading and writing http r equest
Asynchronous reading and writing http r equest
Pragyanshis Patnaik
 
Introduction to CakePHP
Introduction to CakePHPIntroduction to CakePHP
Introduction to CakePHP
mohamedsamirgalal
 
Have Some Rest Building Web2.0 Apps And Services
Have Some Rest   Building Web2.0 Apps And ServicesHave Some Rest   Building Web2.0 Apps And Services
Have Some Rest Building Web2.0 Apps And Services
Nenad Nikolic
 
Swoole Love PHP
Swoole Love PHPSwoole Love PHP
Swoole Love PHP
Yi-Feng Tzeng
 
Php Ppt
Php PptPhp Ppt
Php Ppt
Hema Prasanth
 

What's hot (20)

ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA RuntimesApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
 
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache TuscanyApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
 
Cakephp
CakephpCakephp
Cakephp
 
Laravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routingLaravel 5 Annotations: RESTful API routing
Laravel 5 Annotations: RESTful API routing
 
CakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldCakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your world
 
PHP programmimg
PHP programmimgPHP programmimg
PHP programmimg
 
Intro to flask2
Intro to flask2Intro to flask2
Intro to flask2
 
REST API Laravel
REST API LaravelREST API Laravel
REST API Laravel
 
Cakephp manual-11
Cakephp manual-11Cakephp manual-11
Cakephp manual-11
 
Application Note APLX-LMW-0403: Interfacing the Apache Web ...
Application Note APLX-LMW-0403: Interfacing the Apache Web ...Application Note APLX-LMW-0403: Interfacing the Apache Web ...
Application Note APLX-LMW-0403: Interfacing the Apache Web ...
 
Soap
SoapSoap
Soap
 
2021.laravelconf.tw.slides1
2021.laravelconf.tw.slides12021.laravelconf.tw.slides1
2021.laravelconf.tw.slides1
 
Last train to php 7
Last train to php 7Last train to php 7
Last train to php 7
 
Object Oriented Programming with Laravel - Session 2
Object Oriented Programming with Laravel - Session 2Object Oriented Programming with Laravel - Session 2
Object Oriented Programming with Laravel - Session 2
 
Laravel 5 New Features
Laravel 5 New FeaturesLaravel 5 New Features
Laravel 5 New Features
 
Asynchronous reading and writing http r equest
Asynchronous reading and writing http r equestAsynchronous reading and writing http r equest
Asynchronous reading and writing http r equest
 
Introduction to CakePHP
Introduction to CakePHPIntroduction to CakePHP
Introduction to CakePHP
 
Have Some Rest Building Web2.0 Apps And Services
Have Some Rest   Building Web2.0 Apps And ServicesHave Some Rest   Building Web2.0 Apps And Services
Have Some Rest Building Web2.0 Apps And Services
 
Swoole Love PHP
Swoole Love PHPSwoole Love PHP
Swoole Love PHP
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 

Viewers also liked

iKariera 2015
iKariera 2015iKariera 2015
iKariera 2015
Tomáš Muchka
 
SOA Monitoring & Administration Tips and Tricks - Spring 2014 FDUG Meeting
SOA Monitoring & Administration Tips and Tricks - Spring 2014 FDUG MeetingSOA Monitoring & Administration Tips and Tricks - Spring 2014 FDUG Meeting
SOA Monitoring & Administration Tips and Tricks - Spring 2014 FDUG Meeting
jtreague
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
Edison Lascano
 
2015.07.17 新人報告(2)
2015.07.17 新人報告(2)2015.07.17 新人報告(2)
2015.07.17 新人報告(2)
Chih-Wei Chuang
 
Meet the expert
Meet the expertMeet the expert
Meet the expert
Karthik Subramanian
 
Service Oriented Architectures (SOA) Monitoring and Management with HP OpenVi...
Service Oriented Architectures (SOA) Monitoring and Management with HP OpenVi...Service Oriented Architectures (SOA) Monitoring and Management with HP OpenVi...
Service Oriented Architectures (SOA) Monitoring and Management with HP OpenVi...
Stefan Bergstein
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
Mário Almeida
 
Webservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTWebservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and REST
Pradeep Kumar
 

Viewers also liked (8)

iKariera 2015
iKariera 2015iKariera 2015
iKariera 2015
 
SOA Monitoring & Administration Tips and Tricks - Spring 2014 FDUG Meeting
SOA Monitoring & Administration Tips and Tricks - Spring 2014 FDUG MeetingSOA Monitoring & Administration Tips and Tricks - Spring 2014 FDUG Meeting
SOA Monitoring & Administration Tips and Tricks - Spring 2014 FDUG Meeting
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
2015.07.17 新人報告(2)
2015.07.17 新人報告(2)2015.07.17 新人報告(2)
2015.07.17 新人報告(2)
 
Meet the expert
Meet the expertMeet the expert
Meet the expert
 
Service Oriented Architectures (SOA) Monitoring and Management with HP OpenVi...
Service Oriented Architectures (SOA) Monitoring and Management with HP OpenVi...Service Oriented Architectures (SOA) Monitoring and Management with HP OpenVi...
Service Oriented Architectures (SOA) Monitoring and Management with HP OpenVi...
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
 
Webservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTWebservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and REST
 

Similar to Phalcon 2 High Performance APIs - DevWeekPOA 2015

APIs enabling IoT
APIs enabling IoT APIs enabling IoT
APIs enabling IoT
Harish Vadada
 
Rest web service
Rest web serviceRest web service
Rest web service
Hamid Ghorbani
 
Unit 2
Unit 2Unit 2
Unit 2
Ravi Kumar
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
NamanVerma88
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
VijayapriyaP1
 
Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5
Charlin Agramonte
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About REST
Jeremy Brown
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About REST
Mike Wilcox
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
stephenbhadran
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
Sreeni I
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
Neil Ghosh
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
webhostingguy
 
A Conversation About REST - Extended Version
A Conversation About REST - Extended VersionA Conversation About REST - Extended Version
A Conversation About REST - Extended Version
Jeremy Brown
 
Day03 api
Day03   apiDay03   api
RIA Data and Security, 2007
RIA Data and Security, 2007RIA Data and Security, 2007
RIA Data and Security, 2007
Evgenios Skitsanos
 
WIT UNIT-5.pdf
WIT UNIT-5.pdfWIT UNIT-5.pdf
WIT UNIT-5.pdf
jashmithakakavakam
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
Aparna Sharma
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
Er. Prashant Veer Singh
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
Halil Burak Cetinkaya
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Kevin Lee
 

Similar to Phalcon 2 High Performance APIs - DevWeekPOA 2015 (20)

APIs enabling IoT
APIs enabling IoT APIs enabling IoT
APIs enabling IoT
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Unit 2
Unit 2Unit 2
Unit 2
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About REST
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About REST
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
 
A Conversation About REST - Extended Version
A Conversation About REST - Extended VersionA Conversation About REST - Extended Version
A Conversation About REST - Extended Version
 
Day03 api
Day03   apiDay03   api
Day03 api
 
RIA Data and Security, 2007
RIA Data and Security, 2007RIA Data and Security, 2007
RIA Data and Security, 2007
 
WIT UNIT-5.pdf
WIT UNIT-5.pdfWIT UNIT-5.pdf
WIT UNIT-5.pdf
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
 

More from Jackson F. de A. Mafra

PHP Conference 2020 - A eterna luta: compatibilidade retroativa vs. dívida té...
PHP Conference 2020 - A eterna luta: compatibilidade retroativa vs. dívida té...PHP Conference 2020 - A eterna luta: compatibilidade retroativa vs. dívida té...
PHP Conference 2020 - A eterna luta: compatibilidade retroativa vs. dívida té...
Jackson F. de A. Mafra
 
PHP SSO no Zentyal
PHP SSO no ZentyalPHP SSO no Zentyal
PHP SSO no Zentyal
Jackson F. de A. Mafra
 
Phprs meetup - deploys automatizados com gitlab
Phprs   meetup - deploys automatizados com gitlabPhprs   meetup - deploys automatizados com gitlab
Phprs meetup - deploys automatizados com gitlab
Jackson F. de A. Mafra
 
O que você precisa saber sobre chatbots
O que você precisa saber sobre chatbotsO que você precisa saber sobre chatbots
O que você precisa saber sobre chatbots
Jackson F. de A. Mafra
 
WCPOA2019 - WordPress como um backend de seus aplicativos
WCPOA2019  - WordPress como um backend de seus aplicativosWCPOA2019  - WordPress como um backend de seus aplicativos
WCPOA2019 - WordPress como um backend de seus aplicativos
Jackson F. de A. Mafra
 
WordPress como um backend de seus aplicativos
WordPress como um backend de seus aplicativosWordPress como um backend de seus aplicativos
WordPress como um backend de seus aplicativos
Jackson F. de A. Mafra
 
The Ultimate Guide to Development in WordPress
The Ultimate Guide to Development in WordPressThe Ultimate Guide to Development in WordPress
The Ultimate Guide to Development in WordPress
Jackson F. de A. Mafra
 
Precisamos de um barco maior introdução ao dimensionamento de aplicações
Precisamos de um barco maior introdução ao dimensionamento de aplicaçõesPrecisamos de um barco maior introdução ao dimensionamento de aplicações
Precisamos de um barco maior introdução ao dimensionamento de aplicações
Jackson F. de A. Mafra
 
Hangout Tempo Real Eventos - ChatOps (ChatBots e DevOps) - Como bots podem ...
Hangout  Tempo Real Eventos - ChatOps (ChatBots e DevOps)  - Como bots podem ...Hangout  Tempo Real Eventos - ChatOps (ChatBots e DevOps)  - Como bots podem ...
Hangout Tempo Real Eventos - ChatOps (ChatBots e DevOps) - Como bots podem ...
Jackson F. de A. Mafra
 
Hangout Tempo Real Eventos - Android - Os primeiros passos do desenvolviment...
Hangout  Tempo Real Eventos - Android - Os primeiros passos do desenvolviment...Hangout  Tempo Real Eventos - Android - Os primeiros passos do desenvolviment...
Hangout Tempo Real Eventos - Android - Os primeiros passos do desenvolviment...
Jackson F. de A. Mafra
 
Hangout Tempo Real Eventos - Javascript - Os Primeiros Passos
Hangout  Tempo Real Eventos - Javascript - Os Primeiros PassosHangout  Tempo Real Eventos - Javascript - Os Primeiros Passos
Hangout Tempo Real Eventos - Javascript - Os Primeiros Passos
Jackson F. de A. Mafra
 
Hangout Tempo Real Eventos - Nodejs - Os Primeiros Passos
Hangout  Tempo Real Eventos - Nodejs - Os Primeiros PassosHangout  Tempo Real Eventos - Nodejs - Os Primeiros Passos
Hangout Tempo Real Eventos - Nodejs - Os Primeiros Passos
Jackson F. de A. Mafra
 
Desmistificando o DialogFlow
Desmistificando o DialogFlowDesmistificando o DialogFlow
Desmistificando o DialogFlow
Jackson F. de A. Mafra
 
ChatOps (ChatBots + DevOps)
ChatOps (ChatBots + DevOps) ChatOps (ChatBots + DevOps)
ChatOps (ChatBots + DevOps)
Jackson F. de A. Mafra
 
Conexao kinghost - Vendas inteligentes com intelibots
Conexao kinghost - Vendas inteligentes com intelibotsConexao kinghost - Vendas inteligentes com intelibots
Conexao kinghost - Vendas inteligentes com intelibots
Jackson F. de A. Mafra
 
Dev Heroes
Dev HeroesDev Heroes
Trilha Android - Android Evolved
Trilha Android - Android EvolvedTrilha Android - Android Evolved
Trilha Android - Android Evolved
Jackson F. de A. Mafra
 
TDC 2015 - POA - Trilha PHP - Shit Happens
TDC 2015 - POA - Trilha PHP - Shit HappensTDC 2015 - POA - Trilha PHP - Shit Happens
TDC 2015 - POA - Trilha PHP - Shit Happens
Jackson F. de A. Mafra
 
Material design
Material designMaterial design
Material design
Jackson F. de A. Mafra
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
Jackson F. de A. Mafra
 

More from Jackson F. de A. Mafra (20)

PHP Conference 2020 - A eterna luta: compatibilidade retroativa vs. dívida té...
PHP Conference 2020 - A eterna luta: compatibilidade retroativa vs. dívida té...PHP Conference 2020 - A eterna luta: compatibilidade retroativa vs. dívida té...
PHP Conference 2020 - A eterna luta: compatibilidade retroativa vs. dívida té...
 
PHP SSO no Zentyal
PHP SSO no ZentyalPHP SSO no Zentyal
PHP SSO no Zentyal
 
Phprs meetup - deploys automatizados com gitlab
Phprs   meetup - deploys automatizados com gitlabPhprs   meetup - deploys automatizados com gitlab
Phprs meetup - deploys automatizados com gitlab
 
O que você precisa saber sobre chatbots
O que você precisa saber sobre chatbotsO que você precisa saber sobre chatbots
O que você precisa saber sobre chatbots
 
WCPOA2019 - WordPress como um backend de seus aplicativos
WCPOA2019  - WordPress como um backend de seus aplicativosWCPOA2019  - WordPress como um backend de seus aplicativos
WCPOA2019 - WordPress como um backend de seus aplicativos
 
WordPress como um backend de seus aplicativos
WordPress como um backend de seus aplicativosWordPress como um backend de seus aplicativos
WordPress como um backend de seus aplicativos
 
The Ultimate Guide to Development in WordPress
The Ultimate Guide to Development in WordPressThe Ultimate Guide to Development in WordPress
The Ultimate Guide to Development in WordPress
 
Precisamos de um barco maior introdução ao dimensionamento de aplicações
Precisamos de um barco maior introdução ao dimensionamento de aplicaçõesPrecisamos de um barco maior introdução ao dimensionamento de aplicações
Precisamos de um barco maior introdução ao dimensionamento de aplicações
 
Hangout Tempo Real Eventos - ChatOps (ChatBots e DevOps) - Como bots podem ...
Hangout  Tempo Real Eventos - ChatOps (ChatBots e DevOps)  - Como bots podem ...Hangout  Tempo Real Eventos - ChatOps (ChatBots e DevOps)  - Como bots podem ...
Hangout Tempo Real Eventos - ChatOps (ChatBots e DevOps) - Como bots podem ...
 
Hangout Tempo Real Eventos - Android - Os primeiros passos do desenvolviment...
Hangout  Tempo Real Eventos - Android - Os primeiros passos do desenvolviment...Hangout  Tempo Real Eventos - Android - Os primeiros passos do desenvolviment...
Hangout Tempo Real Eventos - Android - Os primeiros passos do desenvolviment...
 
Hangout Tempo Real Eventos - Javascript - Os Primeiros Passos
Hangout  Tempo Real Eventos - Javascript - Os Primeiros PassosHangout  Tempo Real Eventos - Javascript - Os Primeiros Passos
Hangout Tempo Real Eventos - Javascript - Os Primeiros Passos
 
Hangout Tempo Real Eventos - Nodejs - Os Primeiros Passos
Hangout  Tempo Real Eventos - Nodejs - Os Primeiros PassosHangout  Tempo Real Eventos - Nodejs - Os Primeiros Passos
Hangout Tempo Real Eventos - Nodejs - Os Primeiros Passos
 
Desmistificando o DialogFlow
Desmistificando o DialogFlowDesmistificando o DialogFlow
Desmistificando o DialogFlow
 
ChatOps (ChatBots + DevOps)
ChatOps (ChatBots + DevOps) ChatOps (ChatBots + DevOps)
ChatOps (ChatBots + DevOps)
 
Conexao kinghost - Vendas inteligentes com intelibots
Conexao kinghost - Vendas inteligentes com intelibotsConexao kinghost - Vendas inteligentes com intelibots
Conexao kinghost - Vendas inteligentes com intelibots
 
Dev Heroes
Dev HeroesDev Heroes
Dev Heroes
 
Trilha Android - Android Evolved
Trilha Android - Android EvolvedTrilha Android - Android Evolved
Trilha Android - Android Evolved
 
TDC 2015 - POA - Trilha PHP - Shit Happens
TDC 2015 - POA - Trilha PHP - Shit HappensTDC 2015 - POA - Trilha PHP - Shit Happens
TDC 2015 - POA - Trilha PHP - Shit Happens
 
Material design
Material designMaterial design
Material design
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
 

Recently uploaded

Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
mahigarg2024#G05
 
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdfTop 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Krishna L
 
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
shamrisumri
 
Iot-Internet-of-Things_Industrial revolution 4.0-ppt.pptx
Iot-Internet-of-Things_Industrial revolution 4.0-ppt.pptxIot-Internet-of-Things_Industrial revolution 4.0-ppt.pptx
Iot-Internet-of-Things_Industrial revolution 4.0-ppt.pptx
DeepakKumar862274
 
Information Systems Auditing, Controls and Assurance , tanapat limsaiprom
Information Systems Auditing, Controls and Assurance , tanapat limsaipromInformation Systems Auditing, Controls and Assurance , tanapat limsaiprom
Information Systems Auditing, Controls and Assurance , tanapat limsaiprom
TanapatLimsaiprom1
 
UMN degree offer diploma Transcript
UMN degree offer diploma TranscriptUMN degree offer diploma Transcript
UMN degree offer diploma Transcript
cenocb
 
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdfHow-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
Dolphin Data Lab
 
workbook and project U5 1ºsecundaria.pdf
workbook and project U5 1ºsecundaria.pdfworkbook and project U5 1ºsecundaria.pdf
workbook and project U5 1ºsecundaria.pdf
anya2024forgya
 
Effective Tips for Creating the Best Rich Media Ads .pptx
Effective Tips for Creating the Best Rich Media Ads .pptxEffective Tips for Creating the Best Rich Media Ads .pptx
Effective Tips for Creating the Best Rich Media Ads .pptx
AirtoryInc
 
Why Your Business Needs a Professional Web Design Company UAE
Why Your Business Needs a Professional Web Design Company UAEWhy Your Business Needs a Professional Web Design Company UAE
Why Your Business Needs a Professional Web Design Company UAE
adelewhite125
 
Cyber Security Course & Guide. X.GI. pdf
Cyber Security Course & Guide. X.GI. pdfCyber Security Course & Guide. X.GI. pdf
Cyber Security Course & Guide. X.GI. pdf
RohitRoshanBengROHIT
 
6 Reasons to Use a VPN | 3S VPN Server App
6 Reasons to Use a VPN | 3S VPN Server App6 Reasons to Use a VPN | 3S VPN Server App
6 Reasons to Use a VPN | 3S VPN Server App
VPN Server
 
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
shamrisumri
 
Corporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptxCorporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptx
byubyu7
 
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptxDraya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
ashishkumarrana9
 
Build a Professional Resume using Canva , Tanapat Limsaiprom
Build a Professional Resume using Canva , Tanapat LimsaipromBuild a Professional Resume using Canva , Tanapat Limsaiprom
Build a Professional Resume using Canva , Tanapat Limsaiprom
TanapatLimsaiprom1
 
Dewanstudio Project Portfolio 2023 show case
Dewanstudio Project Portfolio 2023 show caseDewanstudio Project Portfolio 2023 show case
Dewanstudio Project Portfolio 2023 show case
DEWANSTUDIO.COM
 
Quiz Quiz Hota Hai (School Quiz 2018-19)
Quiz Quiz Hota Hai (School Quiz 2018-19)Quiz Quiz Hota Hai (School Quiz 2018-19)
Quiz Quiz Hota Hai (School Quiz 2018-19)
Kashyap J
 
Web development Platform Constraints.pptx
Web development Platform Constraints.pptxWeb development Platform Constraints.pptx
Web development Platform Constraints.pptx
ssuser2f6682
 
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
ffg01100
 

Recently uploaded (20)

Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
 
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdfTop 50 Telephone Conversation Sample Examples For IT Industries.pdf
Top 50 Telephone Conversation Sample Examples For IT Industries.pdf
 
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
 
Iot-Internet-of-Things_Industrial revolution 4.0-ppt.pptx
Iot-Internet-of-Things_Industrial revolution 4.0-ppt.pptxIot-Internet-of-Things_Industrial revolution 4.0-ppt.pptx
Iot-Internet-of-Things_Industrial revolution 4.0-ppt.pptx
 
Information Systems Auditing, Controls and Assurance , tanapat limsaiprom
Information Systems Auditing, Controls and Assurance , tanapat limsaipromInformation Systems Auditing, Controls and Assurance , tanapat limsaiprom
Information Systems Auditing, Controls and Assurance , tanapat limsaiprom
 
UMN degree offer diploma Transcript
UMN degree offer diploma TranscriptUMN degree offer diploma Transcript
UMN degree offer diploma Transcript
 
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdfHow-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
 
workbook and project U5 1ºsecundaria.pdf
workbook and project U5 1ºsecundaria.pdfworkbook and project U5 1ºsecundaria.pdf
workbook and project U5 1ºsecundaria.pdf
 
Effective Tips for Creating the Best Rich Media Ads .pptx
Effective Tips for Creating the Best Rich Media Ads .pptxEffective Tips for Creating the Best Rich Media Ads .pptx
Effective Tips for Creating the Best Rich Media Ads .pptx
 
Why Your Business Needs a Professional Web Design Company UAE
Why Your Business Needs a Professional Web Design Company UAEWhy Your Business Needs a Professional Web Design Company UAE
Why Your Business Needs a Professional Web Design Company UAE
 
Cyber Security Course & Guide. X.GI. pdf
Cyber Security Course & Guide. X.GI. pdfCyber Security Course & Guide. X.GI. pdf
Cyber Security Course & Guide. X.GI. pdf
 
6 Reasons to Use a VPN | 3S VPN Server App
6 Reasons to Use a VPN | 3S VPN Server App6 Reasons to Use a VPN | 3S VPN Server App
6 Reasons to Use a VPN | 3S VPN Server App
 
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
 
Corporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptxCorporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptx
 
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptxDraya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
 
Build a Professional Resume using Canva , Tanapat Limsaiprom
Build a Professional Resume using Canva , Tanapat LimsaipromBuild a Professional Resume using Canva , Tanapat Limsaiprom
Build a Professional Resume using Canva , Tanapat Limsaiprom
 
Dewanstudio Project Portfolio 2023 show case
Dewanstudio Project Portfolio 2023 show caseDewanstudio Project Portfolio 2023 show case
Dewanstudio Project Portfolio 2023 show case
 
Quiz Quiz Hota Hai (School Quiz 2018-19)
Quiz Quiz Hota Hai (School Quiz 2018-19)Quiz Quiz Hota Hai (School Quiz 2018-19)
Quiz Quiz Hota Hai (School Quiz 2018-19)
 
Web development Platform Constraints.pptx
Web development Platform Constraints.pptxWeb development Platform Constraints.pptx
Web development Platform Constraints.pptx
 
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
 

Phalcon 2 High Performance APIs - DevWeekPOA 2015

  • 3. APIs: Windows To The Code In the simplest terms, APIs are sets of requirements that govern how one application can talk to another.
  • 4. APIs: Windows To The Code APIs do all this by exposing some of a program's internal functions to the outside world in a limited fashion.
  • 5. API Analogy Every time you want to access a set of data from an application, you have to call the API. But there is only a certain amount of data the application will let you access, so you have to communicate to the operator in a very specific language—a language unique to each application.
  • 7. A simple classification of APIs Web service APIs - SOAP - XML-RPC and JSON-RPC - REST WebSocket APIs Library-based APIs - JavaScript - TWAIN Class-based APIs (object orientation) - Java API - Android API OS functions and routines - Access to file system - Access to user interface Object remoting APIs - CORBA - .NET Remoting Hardware APIs - Video acceleration - Hard disk drives - PCI buses
  • 8. Webservices A description of the communication methods allowed • Requesting information • Sending information • Updating information
  • 9. Webservices Most often-used types of web service: • SOAP • XML-RPC • JSON-RPC • REST
  • 10. Webservices Most often-used types of web service: • SOAP • XML-RPC • JSON-RPC • REST
  • 11. SOAP (Simple Object Access Protocol) SOAP is a protocol that defines the communication method, and the structure of the messages. The data transfer format is XML. A SOAP service publishes a definition of its interface in a machine-readable document, using WSDL – Web Services Definition Language.
  • 12. XML-RPC XML-RPC is an older protocol than SOAP. It uses a specific XML format for data transfer, whereas SOAP allows a proprietary XML format. An XML-RPC call tends to be much simpler, and to use less bandwidth, than a SOAP call. (SOAP is known to be “verbose”.) SOAP and XML-RPC have different levels of support in various libraries.
  • 13. JSON-RPC JSON-RPC is similar to XML-RPC, but uses JSON instead of XML for data transfer.
  • 14. REST (Representational state transfer) REST is not a protocol, but rather a set of architectural principles. The thing that differentiates a REST service from other web services is its architecture. Some of the characteristics required of a REST service include simplicity of interfaces, identification of resources within the request, and the ability to manipulate the resources via the interface. There are a number of other, more fundamental architectural requirements too.
  • 15. REST Principles It is these principles that characterize most of REST-based APIs in use today: • Precedence of the client-server relationship • Requirement for stateless communication • Implementation of cache constraints to engender efficiencies in network communications • Use of a uniform interface through standardized data elements such as resources and representations
  • 16. REST Principles The common perception is that REST offers a lightweight alternative to service-orientated mechanisms such as SOAP.
  • 17. REST Principles REST allows for the fine-grained control of objects through the use of resources (expressed as URIs) that also allows for greater efficiency in communications with the server (obviously important when implemented on a mobile device).
  • 18. XML and JSON The growth of REST has been complemented by the increasing use of JavaScript Object Notation (JSON) as the mechanism by which resources are represented.
  • 19. XML and JSON Mobile apps driving the adoption of web APIs and the need for a compact payloads over constrained communication links. The consumption of web APIs by a web developer community and the resonance of JSON-encoded data with this audience
  • 20. XML and JSON The use of JSON over XML is not a dichotomy. You will make design decisions where you support one, both, or even other formats dependent on the intended audience.
  • 21. Layman terms What is the difference between REST and SOAP?
  • 22. Layman terms What's the difference between MVC and HTTP?
  • 23. Layman terms MVC and REST are architectural patterns.
  • 24. Layman terms HTTP and SOAP are set of rules i.e. protocols.
  • 25. Layman terms In layman terms you are asking - What's the difference between a building plan-map and building making process.
  • 26. Layman terms Building Plan map is deciding how you will place different things e.g. Bathroom, dining room, doors, bed-room etc. in a particular geographical area.
  • 27. Layman terms MVC is deciding how you will separate concerns regarding data, business logic and controls.
  • 28. Layman terms REST is deciding how you will use different HTTP verbs to perform one of CRUD operation on your data.
  • 29. Layman terms Building making process is following predefined steps like first create foundation then walls and in the end go for roof.
  • 30. Layman terms HTTP is following predefined rules like you need to send request on port 80 which will consist of two parts: HTTP headers and HTTP body.
  • 31. Layman terms SOAP is following predefined set of rules how and where you can place function to be called and various parameters to be passed in that function in your XML SOAP request.
  • 32. Layman terms SOAP is rigid XML structure. XML is overwhelmed by data-size. REST can use XML or JSON. JSON is just key - value pairs.
  • 33. Layman terms Use SOAP: 1. when you have no other option provided by API exposer. 2. when your end user want to have only SOAP response. 3. Faster development. As tools Axis 2 and cxf exist. :)
  • 34. Layman terms Use REST(with JSON): 1. To have cleaner software architecture. 2. To save server resources (JSON is smaller to process). 3. To save network resources (JSON size is smaller than XML). 4. To save client side resources (JSON is much faster to parse).
  • 36. RESTful API <?xml version="1.0" encoding="UTF-8"?> <person> <id>111222</id> <first-name>Jackson</first-name> <last-name>Mafra</last-name> <headline>Software Engineer</headline> <connections total=”1776"> … </person>
  • 37. RESTful API What’s Missing? Ability to get exactly what you need (variety) • If you need more, may require multiple API calls (if they exist) • If you need less, resources are wasted Consistency of responses (uniformity) • “Same” object returned by different APIs may have different structure • Once in production, hard to get consistent later
  • 38. RESTful API Multiple Calls to Get What You Need Want to get user’s friend’s profile? Do this… http://social.yahooapis.com/v1/user/123/connections <connections yahoo:start="0" yahoo:count="1" yahoo:total="1"> <connection yahoo:uri="http://social.yahooapis.com/v1/user/123/connection/456? view=usercard"> <guid>456</guid> <contactId>4</contactId> </connection> </connections>
  • 39. RESTful API Multiple Calls to Get What You Need … then make second call to get friend’s profile: http://social.yahooapis.com/v1/user/456/profile <profile yahoo:uri="http://social.yahooapis.com/v1/user/456/profile"> <guid>456</guid> <birthdate>3/3</birthdate> <created>2008-08-4T17:13:56Z</created> ... </profile> - Latent, redundant data - Optimization requires stickiness
  • 40. RESTful API Typical Solution Variety versus Uniformity - Solution: introduce another call - Desire for variety of responses undermines uniformity of requests - Leads to RPC-like REST APIs - Many APIs + Great Documentation = Lots of Reading + Lack of Automation
  • 41. RESTful API Domain Model as Foundation Sample Domain Model /people : Person[] // collection of Person resources /id : string // primary key /name : string /email : string // unique key /photo : url /best-friend : Person /friends : Person[] /jobs : Job[] // collection of Job resources /company : Company /title : string /start-date : date /end-date : date … /companies : Company[] /name : string /ceo : Person …
  • 42. RESTful API Domain Model as Foundation Follow request URL to navigate through your model To get a person’s profile: http://api.linkedin.com/v2/people/123 <person uri=“urn:linkedin:v2:people/123” key=“123”> <id>123</id> <name>Reid Hoffman</name> <email>reid@linkedin.com</email> <best-friend uri=“urn:linkedin:v2:people/456”/> </person> Conventional URL in request Default representation in response /people[/id=123] /id /name /email /photo /best-friend /friends … /jobs /company /title /start-date /end-date … /companies /name /ceo …
  • 43. RESTful API Domain Model as Foundation Fine-grained Request What if you only need certain fields (e.g., name and photo)? http://api.linkedin.com/v2/people/123:(name,photo) <person> <name>Reid Hoffman</name> <photo>http://media.linkedin.com/photos/123.jpeg</photo> </person> … /people[/id=123] /id /name /email /photo /best-friend /friends /jobs /company /title /start-date /end-date …
  • 44. RESTful API Domain Model as Foundation Fine-grained Request To get names and photos of one’s friends and their best friends: …/v2/people/456/friends:(name,photo,best-friend: (name,photo)) <friends total=“66” start=“0”> <friend uri=“urn:linkedin:v2:people/123” key=“123”> <name>Reid Hoffman</name> <photo>http://media.linkedin.com/photos/123.jpeg</photo> <best-friend uri=“urn:linkedin:v2:people/456” key=“456”> <name>Brandon Duncan</name> <photo>http://media.linkedin.com/photos/456.jpeg</photo> </best-friend> </friend> <friend>…</friend> </friends> … /people[/id=456] /id /name /email /photo /best-friend /friends /123 /id /name /email /photo /best-friend /name /photo /jobs
  • 45. RESTful API Domain Model as Foundation Fine-grained Request Allows client to construct custom calls Better than digging for the closest matching API: http://social...com/v1/user/123/profile http://social...com/v1/user/123/profile/usercard http://social...com/v1/user/123/profile/tinyusercard Allows optimization on the backend
  • 46. RESTful API Domain Model as Foundation Fine-grained Request Benefits - Provides a frame for both request and response semantics - Still allows for flexible syntax - Requests – path, query params, matrix params… - Responses – JSON, XML… - Helps to unify and automate many development tasks on both ends - Request / response creation, parsing, marshalling - Code (and documentation) generation - Discovery services
  • 47. RESTful API Domain Model as Foundation Fine-grained Request Benefits - Provides a frame for both request and response semantics - Still allows for flexible syntax - Requests – path, query params, matrix params… - Responses – JSON, XML… - Helps to unify and automate many development tasks on both ends - Request / response creation, parsing, marshalling - Code (and documentation) generation - Discovery services
  • 48. RESTful API Examples of LinkedIn APIs HTTP GET - Read …/people/email=brandon@gmail.com/friends?sort=name …/people/123/friends;sort=name:(name,jobs;sort=start-date) …/people:(id,name,photo)?name=page&company=google …/people::(123,456) …/people::(123,456):(name,photo)
  • 49. RESTful API Incentive System • Multiple ways to get at the same data • Partner can ask for exactly what they need • Associate cost with resources, system of accounting creates incentives for partners • Throttling by resource rather than API

Editor's Notes

  1. Building plan-map – Planta Baixa