SlideShare a Scribd company logo
1 of 23
Download to read offline
All Aboard the Boxcar!
Going Beyond the Basics of REST
Pat Patterson
Developer Evangelist Architect
ppatterson@salesforce.com
@metadaddy
Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize
or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the
forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any
projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding
strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or
technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for
our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate
of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with
completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability
to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our
limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential
factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year
and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are
available on the SEC Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and
may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are
currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Safe Harbor
RESTful principles
When our REST API ran out of steam
The Boxcar
Composite resources – still REST?
Agenda
RESTful Principles
Fielding’s Masterpiece
Client-Server
• Separate UI from Data Storage
• Independent evolution of components
Stateless
• Each request is self-contained
• Visibility, reliability, scalability
Cache
• Responses labeled as cacheable, or not
• Efficiency, scalability, performance
From http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
Fielding’s Six Constraints
Uniform Interface
• Decouple implementations from services
• Trade-off: degraded efficiency
Layered System
• Each component cannot see beyond
the next layer
Code-On-Demand (optional)
• Extend client functionality via applets (!)
or scripts
Fielding’s Six Constraints
Identification of resources
• Resource: “any information that can be named”
Manipulation of resources through representations
• Current or intended state of resource
Self-descriptive messages
• Metadata: e.g. media type, last modified time
Hypermedia as the engine of application state
• Resource navigation via links contained in the representation
From http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
Uniform Interface
Resources identified by URIs
• http://api.example.com/widgets/w000123
Representation by Internet media types
• JSON
HTTP with standard methods
• GET, PUT, POST, DELETE, PATCH
Hypertext links between resources
• No ‘magic knowledge’ driving interaction
REST in Practice - 2015
Force.com REST API Demo
Principles in Practice
Transactional semantics when creating hierarchies of objects?
• ‘Stateless’ REST constraint means that transaction context is tricky
Performance with high latency networks (mobile clients)
• Client framework has a message queue, wants to submit multiple
operations in a single network request
But… All Was Not Perfect in the REST API!
All Aboard the Boxcar! Going Beyond the Basics of REST
POST to /vXX.X/composite/tree/ObjectName
{
"records" :[{
"attributes" : {"type" : "Account", "referenceId" : "ref1"},
"name" : "SampleAccount",
"Contacts" : {
"records" : [{
"attributes" : {"type" : "Contact", "referenceId" : "ref2"},
"lastname" : "Smith",
"email" : smith@example.com
}, {
"attributes" : {"type" : "Contact", "referenceId" : "ref3"},
"lastname" : "Jones",
"email" : jones@example.com
}]
}
}]
}
Create whole hierarchies of related objects in a single request
Solution 1: Object Trees
{
"hasErrors" : false,
"results" : [{
"referenceId" : "ref1",
"id" : "001D000000K0fXOIAZ"
},{
"referenceId" : "ref2",
"id" : "001D000000K0fXPIAZ"
},{
"referenceId" : "ref3",
"id" : "003D000000QV9n2IAD"
}]
}
Object Tree Response
Object Tree Demo
Principles in Practice
✔ Client-Server
✔ Stateless
✔ Cache
? Uniform Interface
✔ Layered System
Is This RESTful?
✔ Identification of resources
✔ Manipulation of resources through representations
✔ Self-descriptive messages
✔ Hypermedia as the engine of application state
What About Uniform Interface?
POST to /vXX.X/composite/batch
{
"batchRequests" : [{
"method" : "PATCH",
"url" : "v34.0/sobjects/account/001D000000K0fXOIAZ",
"richInput" : {"Name" : "NewName"}
},{
"method" : "GET",
"url" : "v34.0/sobjects/account/001D000000K0fXOIAZ?fields=Name,LastModifiedDate"
}]
}
Coalesce independent requests
Solution 2: Batch Requests
{
"hasErrors" : false,
"results" : [{
"statusCode" : 204,
"result" : null
},{
"statusCode" : 200,
"result": {
"attributes" : {
"type" : "Account",
"url" : "/services/data/v34.0/sobjects/Account/001D000000K0fXOIAZ"
},
"Name" : "NewName",
"LastModifiedDate" : "2015-01-27T20:51:14.000+0000",
"Id" : "001D000000K0fXOIAZ"
}
}]
}
Batch Response
Batch Demo
Principles in Practice
✔ Client-Server
✔ Stateless
✔ Cache
? Uniform Interface
✔ Layered System
Is This RESTful?
✔ Identification of resources
✔ Manipulation of resources through representations
✔ Self-descriptive messages
✔ Hypermedia as the engine of application state
Straight JSON via HTTP is just one pattern, not the law!
What About Uniform Interface?
Go read (or reread!) Fielding’s dissertation…
at the very least, read chapter 5!
Follow the REST orthodoxy…
until it makes more sense to blaze a new trail…
and, even then, check that you’re not driving over a cliff!
Conclusion
Thank you

More Related Content

What's hot

SAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesSAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesAshish Saxena
 
Open Data Protocol (OData)
Open Data Protocol (OData)Open Data Protocol (OData)
Open Data Protocol (OData)Pistoia Alliance
 
Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Stephan Klevenz
 
OData - The Universal REST API
OData - The Universal REST APIOData - The Universal REST API
OData - The Universal REST APINishanth Kadiyala
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePointSanjay Patel
 
OData, External objects & Lightning Connect
OData, External objects & Lightning ConnectOData, External objects & Lightning Connect
OData, External objects & Lightning ConnectPrasanna Deshpande ☁
 
Node learnings implementation
Node learnings implementationNode learnings implementation
Node learnings implementationVijay Polsani
 
WebLogic Developer Webcast 1: JPA 2.0
WebLogic Developer Webcast 1: JPA 2.0WebLogic Developer Webcast 1: JPA 2.0
WebLogic Developer Webcast 1: JPA 2.0Jeffrey West
 
How to separate the f2 e and sde in web development for_taobao
How to separate the f2 e and sde in web development for_taobaoHow to separate the f2 e and sde in web development for_taobao
How to separate the f2 e and sde in web development for_taobaotaobao.com
 
GoToMeeting Competitive / Market Analysis
GoToMeeting Competitive / Market AnalysisGoToMeeting Competitive / Market Analysis
GoToMeeting Competitive / Market AnalysisNishanth Kadiyala
 
OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)Apigee | Google Cloud
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State TransferPeter R. Egli
 
REST - Representational state transfer
REST - Representational state transferREST - Representational state transfer
REST - Representational state transferTricode (part of Dept)
 
IndyCodeCamp SDS May 16th 2009
IndyCodeCamp SDS May 16th 2009IndyCodeCamp SDS May 16th 2009
IndyCodeCamp SDS May 16th 2009Aaron King
 
RESTful Architecture
RESTful ArchitectureRESTful Architecture
RESTful ArchitectureKabir Baidya
 

What's hot (20)

SAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesSAP ODATA Overview & Guidelines
SAP ODATA Overview & Guidelines
 
Odata
OdataOdata
Odata
 
Open Data Protocol (OData)
Open Data Protocol (OData)Open Data Protocol (OData)
Open Data Protocol (OData)
 
Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014
 
OData - The Universal REST API
OData - The Universal REST APIOData - The Universal REST API
OData - The Universal REST API
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
 
OData, External objects & Lightning Connect
OData, External objects & Lightning ConnectOData, External objects & Lightning Connect
OData, External objects & Lightning Connect
 
Node learnings implementation
Node learnings implementationNode learnings implementation
Node learnings implementation
 
API
APIAPI
API
 
WebLogic Developer Webcast 1: JPA 2.0
WebLogic Developer Webcast 1: JPA 2.0WebLogic Developer Webcast 1: JPA 2.0
WebLogic Developer Webcast 1: JPA 2.0
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
How to separate the f2 e and sde in web development for_taobao
How to separate the f2 e and sde in web development for_taobaoHow to separate the f2 e and sde in web development for_taobao
How to separate the f2 e and sde in web development for_taobao
 
GoToMeeting Competitive / Market Analysis
GoToMeeting Competitive / Market AnalysisGoToMeeting Competitive / Market Analysis
GoToMeeting Competitive / Market Analysis
 
OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)
 
OData Services
OData ServicesOData Services
OData Services
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 
JSON and REST
JSON and RESTJSON and REST
JSON and REST
 
REST - Representational state transfer
REST - Representational state transferREST - Representational state transfer
REST - Representational state transfer
 
IndyCodeCamp SDS May 16th 2009
IndyCodeCamp SDS May 16th 2009IndyCodeCamp SDS May 16th 2009
IndyCodeCamp SDS May 16th 2009
 
RESTful Architecture
RESTful ArchitectureRESTful Architecture
RESTful Architecture
 

Viewers also liked

Infowatch endpoint security
Infowatch endpoint securityInfowatch endpoint security
Infowatch endpoint securityhassan latifi
 
CAF- Iniciativa Regional de Patentes Tecnológicas para el Desarrollo
CAF-  Iniciativa Regional de Patentes Tecnológicas para el DesarrolloCAF-  Iniciativa Regional de Patentes Tecnológicas para el Desarrollo
CAF- Iniciativa Regional de Patentes Tecnológicas para el DesarrolloCafé Innovación
 
Las TIC como alternativa innovadora a las tradicionales tareas para casa
Las TIC como alternativa innovadora a las tradicionales tareas para casaLas TIC como alternativa innovadora a las tradicionales tareas para casa
Las TIC como alternativa innovadora a las tradicionales tareas para casaCarmen Gallego-Domínguez
 
3 c 3d_leave_v5_0_ext
3 c 3d_leave_v5_0_ext3 c 3d_leave_v5_0_ext
3 c 3d_leave_v5_0_extxmuxcwtb
 
Havas Digital - Social Media Attribution
Havas Digital - Social Media AttributionHavas Digital - Social Media Attribution
Havas Digital - Social Media AttributionHavas Media Miami
 
Funcionamiento de las redes neuronales simples
Funcionamiento de las redes neuronales simplesFuncionamiento de las redes neuronales simples
Funcionamiento de las redes neuronales simplesDavid Freire
 
Digitalisierungsbarometer/ Studie von Antrieb Mittelstand
Digitalisierungsbarometer/ Studie von Antrieb MittelstandDigitalisierungsbarometer/ Studie von Antrieb Mittelstand
Digitalisierungsbarometer/ Studie von Antrieb MittelstandAntriebMittelstand
 
Historia de la Música en Cali.
Historia de la Música en Cali.Historia de la Música en Cali.
Historia de la Música en Cali.Diego López
 
Unidad educativa imantag
Unidad educativa imantagUnidad educativa imantag
Unidad educativa imantagLûis Chavz
 
Comercio electronico características de programas indeseables
Comercio electronico características de programas indeseablesComercio electronico características de programas indeseables
Comercio electronico características de programas indeseablesOscar Santos
 
Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?Pat Patterson
 
Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?Pat Patterson
 
Building Custom Big Data Integrations
Building Custom Big Data IntegrationsBuilding Custom Big Data Integrations
Building Custom Big Data IntegrationsPat Patterson
 
Ch11 functional arts
Ch11 functional artsCh11 functional arts
Ch11 functional artsCyrus Helf
 

Viewers also liked (20)

POKEMON JUEGO DE ROL.
POKEMON JUEGO DE ROL.POKEMON JUEGO DE ROL.
POKEMON JUEGO DE ROL.
 
Animals of our place
Animals of our placeAnimals of our place
Animals of our place
 
Itinerari formatiu radiodiagnostic 2015 2016
Itinerari formatiu radiodiagnostic 2015 2016Itinerari formatiu radiodiagnostic 2015 2016
Itinerari formatiu radiodiagnostic 2015 2016
 
Infowatch endpoint security
Infowatch endpoint securityInfowatch endpoint security
Infowatch endpoint security
 
Estructuras organizativas
Estructuras organizativasEstructuras organizativas
Estructuras organizativas
 
CAF- Iniciativa Regional de Patentes Tecnológicas para el Desarrollo
CAF-  Iniciativa Regional de Patentes Tecnológicas para el DesarrolloCAF-  Iniciativa Regional de Patentes Tecnológicas para el Desarrollo
CAF- Iniciativa Regional de Patentes Tecnológicas para el Desarrollo
 
Folleto exposicion cervantes encantado2
Folleto exposicion cervantes encantado2Folleto exposicion cervantes encantado2
Folleto exposicion cervantes encantado2
 
Las TIC como alternativa innovadora a las tradicionales tareas para casa
Las TIC como alternativa innovadora a las tradicionales tareas para casaLas TIC como alternativa innovadora a las tradicionales tareas para casa
Las TIC como alternativa innovadora a las tradicionales tareas para casa
 
3 c 3d_leave_v5_0_ext
3 c 3d_leave_v5_0_ext3 c 3d_leave_v5_0_ext
3 c 3d_leave_v5_0_ext
 
Havas Digital - Social Media Attribution
Havas Digital - Social Media AttributionHavas Digital - Social Media Attribution
Havas Digital - Social Media Attribution
 
Funcionamiento de las redes neuronales simples
Funcionamiento de las redes neuronales simplesFuncionamiento de las redes neuronales simples
Funcionamiento de las redes neuronales simples
 
Digitalisierungsbarometer/ Studie von Antrieb Mittelstand
Digitalisierungsbarometer/ Studie von Antrieb MittelstandDigitalisierungsbarometer/ Studie von Antrieb Mittelstand
Digitalisierungsbarometer/ Studie von Antrieb Mittelstand
 
Historia de la Música en Cali.
Historia de la Música en Cali.Historia de la Música en Cali.
Historia de la Música en Cali.
 
Unidad educativa imantag
Unidad educativa imantagUnidad educativa imantag
Unidad educativa imantag
 
Comercio electronico características de programas indeseables
Comercio electronico características de programas indeseablesComercio electronico características de programas indeseables
Comercio electronico características de programas indeseables
 
Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?
 
Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?
 
Building Custom Big Data Integrations
Building Custom Big Data IntegrationsBuilding Custom Big Data Integrations
Building Custom Big Data Integrations
 
Ch11 functional arts
Ch11 functional artsCh11 functional arts
Ch11 functional arts
 
Mapreduce in Python
Mapreduce in PythonMapreduce in Python
Mapreduce in Python
 

Similar to All Aboard the Boxcar! Going Beyond the Basics of REST

Salesforce1 Platform: Data Model, Relationships and Queries Webinar
Salesforce1 Platform: Data Model, Relationships and Queries WebinarSalesforce1 Platform: Data Model, Relationships and Queries Webinar
Salesforce1 Platform: Data Model, Relationships and Queries WebinarSalesforce Developers
 
Understanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoUnderstanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoSalesforce Developers
 
Design Patterns Every ISV Needs to Know (October 15, 2014)
Design Patterns Every ISV Needs to Know (October 15, 2014)Design Patterns Every ISV Needs to Know (October 15, 2014)
Design Patterns Every ISV Needs to Know (October 15, 2014)Salesforce Partners
 
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...Codemotion
 
Mbf2 salesforce webinar 2
Mbf2 salesforce webinar 2Mbf2 salesforce webinar 2
Mbf2 salesforce webinar 2BeMyApp
 
Building towards a Composite API Framework in Salesforce
Building towards a Composite API Framework in SalesforceBuilding towards a Composite API Framework in Salesforce
Building towards a Composite API Framework in SalesforceSalesforce Developers
 
Next Generation Web Services
Next Generation Web ServicesNext Generation Web Services
Next Generation Web Servicesdreamforce2006
 
CCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexCCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexPeter Chittum
 
How We Built AppExchange and our Communities on the App Cloud (Platform)
How We Built AppExchange and our Communities on the App Cloud (Platform)How We Built AppExchange and our Communities on the App Cloud (Platform)
How We Built AppExchange and our Communities on the App Cloud (Platform)Dreamforce
 
Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchBoxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchPeter Chittum
 
Salesforce Multitenant Architecture: How We Do the Magic We Do
Salesforce Multitenant Architecture: How We Do the Magic We DoSalesforce Multitenant Architecture: How We Do the Magic We Do
Salesforce Multitenant Architecture: How We Do the Magic We DoSalesforce Developers
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsRitesh Aswaney
 
ISV Tech Talk: Usage Metrics for Your LMA Managed Packages
ISV Tech Talk:  Usage Metrics for Your LMA Managed PackagesISV Tech Talk:  Usage Metrics for Your LMA Managed Packages
ISV Tech Talk: Usage Metrics for Your LMA Managed PackagesSalesforce Partners
 
Tour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration MethodsTour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration MethodsSalesforce Developers
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce IntegrationJoshua Hoskins
 
ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)Salesforce Partners
 
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and ApexDreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and ApexPeter Chittum
 
Df16 - Troubleshooting user access problems
Df16 - Troubleshooting user access problemsDf16 - Troubleshooting user access problems
Df16 - Troubleshooting user access problemsBuyan Thyagarajan
 

Similar to All Aboard the Boxcar! Going Beyond the Basics of REST (20)

Salesforce1 Platform: Data Model, Relationships and Queries Webinar
Salesforce1 Platform: Data Model, Relationships and Queries WebinarSalesforce1 Platform: Data Model, Relationships and Queries Webinar
Salesforce1 Platform: Data Model, Relationships and Queries Webinar
 
Understanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoUnderstanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We Do
 
Design Patterns Every ISV Needs to Know (October 15, 2014)
Design Patterns Every ISV Needs to Know (October 15, 2014)Design Patterns Every ISV Needs to Know (October 15, 2014)
Design Patterns Every ISV Needs to Know (October 15, 2014)
 
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
 
Exploring the Salesforce REST API
Exploring the Salesforce REST APIExploring the Salesforce REST API
Exploring the Salesforce REST API
 
Mbf2 salesforce webinar 2
Mbf2 salesforce webinar 2Mbf2 salesforce webinar 2
Mbf2 salesforce webinar 2
 
Building towards a Composite API Framework in Salesforce
Building towards a Composite API Framework in SalesforceBuilding towards a Composite API Framework in Salesforce
Building towards a Composite API Framework in Salesforce
 
Next Generation Web Services
Next Generation Web ServicesNext Generation Web Services
Next Generation Web Services
 
CCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexCCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to Apex
 
How We Built AppExchange and our Communities on the App Cloud (Platform)
How We Built AppExchange and our Communities on the App Cloud (Platform)How We Built AppExchange and our Communities on the App Cloud (Platform)
How We Built AppExchange and our Communities on the App Cloud (Platform)
 
Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchBoxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too Much
 
Salesforce Multitenant Architecture: How We Do the Magic We Do
Salesforce Multitenant Architecture: How We Do the Magic We DoSalesforce Multitenant Architecture: How We Do the Magic We Do
Salesforce Multitenant Architecture: How We Do the Magic We Do
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction Objects
 
ISV Tech Talk: Usage Metrics for Your LMA Managed Packages
ISV Tech Talk:  Usage Metrics for Your LMA Managed PackagesISV Tech Talk:  Usage Metrics for Your LMA Managed Packages
ISV Tech Talk: Usage Metrics for Your LMA Managed Packages
 
Tour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration MethodsTour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration Methods
 
Beyond Custom Metadata Types
Beyond Custom Metadata TypesBeyond Custom Metadata Types
Beyond Custom Metadata Types
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)ISV Tech Talk: Usage Metrics (October 15, 2014)
ISV Tech Talk: Usage Metrics (October 15, 2014)
 
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and ApexDreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
 
Df16 - Troubleshooting user access problems
Df16 - Troubleshooting user access problemsDf16 - Troubleshooting user access problems
Df16 - Troubleshooting user access problems
 

More from Pat Patterson

DevOps from the Provider Perspective
DevOps from the Provider PerspectiveDevOps from the Provider Perspective
DevOps from the Provider PerspectivePat Patterson
 
How Imprivata Combines External Data Sources for Business Insights
How Imprivata Combines External Data Sources for Business InsightsHow Imprivata Combines External Data Sources for Business Insights
How Imprivata Combines External Data Sources for Business InsightsPat Patterson
 
Data Integration with Apache Kafka: What, Why, How
Data Integration with Apache Kafka: What, Why, HowData Integration with Apache Kafka: What, Why, How
Data Integration with Apache Kafka: What, Why, HowPat Patterson
 
Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...
Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...
Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...Pat Patterson
 
Dealing with Drift: Building an Enterprise Data Lake
Dealing with Drift: Building an Enterprise Data LakeDealing with Drift: Building an Enterprise Data Lake
Dealing with Drift: Building an Enterprise Data LakePat Patterson
 
Integrating with Einstein Analytics
Integrating with Einstein AnalyticsIntegrating with Einstein Analytics
Integrating with Einstein AnalyticsPat Patterson
 
Efficient Schemas in Motion with Kafka and Schema Registry
Efficient Schemas in Motion with Kafka and Schema RegistryEfficient Schemas in Motion with Kafka and Schema Registry
Efficient Schemas in Motion with Kafka and Schema RegistryPat Patterson
 
Dealing With Drift - Building an Enterprise Data Lake
Dealing With Drift - Building an Enterprise Data LakeDealing With Drift - Building an Enterprise Data Lake
Dealing With Drift - Building an Enterprise Data LakePat Patterson
 
Building Data Pipelines with Spark and StreamSets
Building Data Pipelines with Spark and StreamSetsBuilding Data Pipelines with Spark and StreamSets
Building Data Pipelines with Spark and StreamSetsPat Patterson
 
Adaptive Data Cleansing with StreamSets and Cassandra
Adaptive Data Cleansing with StreamSets and CassandraAdaptive Data Cleansing with StreamSets and Cassandra
Adaptive Data Cleansing with StreamSets and CassandraPat Patterson
 
Open Source Big Data Ingestion - Without the Heartburn!
Open Source Big Data Ingestion - Without the Heartburn!Open Source Big Data Ingestion - Without the Heartburn!
Open Source Big Data Ingestion - Without the Heartburn!Pat Patterson
 
Provisioning IDaaS - Using SCIM to Enable Cloud Identity
Provisioning IDaaS - Using SCIM to Enable Cloud IdentityProvisioning IDaaS - Using SCIM to Enable Cloud Identity
Provisioning IDaaS - Using SCIM to Enable Cloud IdentityPat Patterson
 
Enterprise IoT: Data in Context
Enterprise IoT: Data in ContextEnterprise IoT: Data in Context
Enterprise IoT: Data in ContextPat Patterson
 
API-Driven Relationships: Building The Trans-Internet Express of the Future
API-Driven Relationships: Building The Trans-Internet Express of the FutureAPI-Driven Relationships: Building The Trans-Internet Express of the Future
API-Driven Relationships: Building The Trans-Internet Express of the FuturePat Patterson
 
Using Salesforce to Manage Your Developer Community
Using Salesforce to Manage Your Developer CommunityUsing Salesforce to Manage Your Developer Community
Using Salesforce to Manage Your Developer CommunityPat Patterson
 
Identity in the Cloud
Identity in the CloudIdentity in the Cloud
Identity in the CloudPat Patterson
 
OpenID Connect: An Overview
OpenID Connect: An OverviewOpenID Connect: An Overview
OpenID Connect: An OverviewPat Patterson
 
How I Learned to Stop Worrying and Love Open Source Identity (Paris Edition)
How I Learned to Stop Worrying and Love Open Source Identity (Paris Edition)How I Learned to Stop Worrying and Love Open Source Identity (Paris Edition)
How I Learned to Stop Worrying and Love Open Source Identity (Paris Edition)Pat Patterson
 
Salesforce Integration with Twilio
Salesforce Integration with TwilioSalesforce Integration with Twilio
Salesforce Integration with TwilioPat Patterson
 

More from Pat Patterson (20)

DevOps from the Provider Perspective
DevOps from the Provider PerspectiveDevOps from the Provider Perspective
DevOps from the Provider Perspective
 
How Imprivata Combines External Data Sources for Business Insights
How Imprivata Combines External Data Sources for Business InsightsHow Imprivata Combines External Data Sources for Business Insights
How Imprivata Combines External Data Sources for Business Insights
 
Data Integration with Apache Kafka: What, Why, How
Data Integration with Apache Kafka: What, Why, HowData Integration with Apache Kafka: What, Why, How
Data Integration with Apache Kafka: What, Why, How
 
Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...
Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...
Project Ouroboros: Using StreamSets Data Collector to Help Manage the StreamS...
 
Dealing with Drift: Building an Enterprise Data Lake
Dealing with Drift: Building an Enterprise Data LakeDealing with Drift: Building an Enterprise Data Lake
Dealing with Drift: Building an Enterprise Data Lake
 
Integrating with Einstein Analytics
Integrating with Einstein AnalyticsIntegrating with Einstein Analytics
Integrating with Einstein Analytics
 
Efficient Schemas in Motion with Kafka and Schema Registry
Efficient Schemas in Motion with Kafka and Schema RegistryEfficient Schemas in Motion with Kafka and Schema Registry
Efficient Schemas in Motion with Kafka and Schema Registry
 
Dealing With Drift - Building an Enterprise Data Lake
Dealing With Drift - Building an Enterprise Data LakeDealing With Drift - Building an Enterprise Data Lake
Dealing With Drift - Building an Enterprise Data Lake
 
Building Data Pipelines with Spark and StreamSets
Building Data Pipelines with Spark and StreamSetsBuilding Data Pipelines with Spark and StreamSets
Building Data Pipelines with Spark and StreamSets
 
Adaptive Data Cleansing with StreamSets and Cassandra
Adaptive Data Cleansing with StreamSets and CassandraAdaptive Data Cleansing with StreamSets and Cassandra
Adaptive Data Cleansing with StreamSets and Cassandra
 
Open Source Big Data Ingestion - Without the Heartburn!
Open Source Big Data Ingestion - Without the Heartburn!Open Source Big Data Ingestion - Without the Heartburn!
Open Source Big Data Ingestion - Without the Heartburn!
 
Provisioning IDaaS - Using SCIM to Enable Cloud Identity
Provisioning IDaaS - Using SCIM to Enable Cloud IdentityProvisioning IDaaS - Using SCIM to Enable Cloud Identity
Provisioning IDaaS - Using SCIM to Enable Cloud Identity
 
Enterprise IoT: Data in Context
Enterprise IoT: Data in ContextEnterprise IoT: Data in Context
Enterprise IoT: Data in Context
 
API-Driven Relationships: Building The Trans-Internet Express of the Future
API-Driven Relationships: Building The Trans-Internet Express of the FutureAPI-Driven Relationships: Building The Trans-Internet Express of the Future
API-Driven Relationships: Building The Trans-Internet Express of the Future
 
Using Salesforce to Manage Your Developer Community
Using Salesforce to Manage Your Developer CommunityUsing Salesforce to Manage Your Developer Community
Using Salesforce to Manage Your Developer Community
 
Identity in the Cloud
Identity in the CloudIdentity in the Cloud
Identity in the Cloud
 
OpenID Connect: An Overview
OpenID Connect: An OverviewOpenID Connect: An Overview
OpenID Connect: An Overview
 
How I Learned to Stop Worrying and Love Open Source Identity (Paris Edition)
How I Learned to Stop Worrying and Love Open Source Identity (Paris Edition)How I Learned to Stop Worrying and Love Open Source Identity (Paris Edition)
How I Learned to Stop Worrying and Love Open Source Identity (Paris Edition)
 
Salesforce Integration with Twilio
Salesforce Integration with TwilioSalesforce Integration with Twilio
Salesforce Integration with Twilio
 
SAML Smackdown
SAML SmackdownSAML Smackdown
SAML Smackdown
 

Recently uploaded

AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilVICTOR MAESTRE RAMIREZ
 
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.Sharon Liu
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptkinjal48
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeNeo4j
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfBrain Inventory
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Jaydeep Chhasatia
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze IncEnterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Incrobinwilliams8624
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfTobias Schneck
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionsNirav Modi
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxJoão Esperancinha
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsJaydeep Chhasatia
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIIvo Andreev
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdfMeon Technology
 

Recently uploaded (20)

Salesforce AI Associate Certification.pptx
Salesforce AI Associate Certification.pptxSalesforce AI Associate Certification.pptx
Salesforce AI Associate Certification.pptx
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
 
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.ppt
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdf
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze IncEnterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Inc
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptx
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AI
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdf
 

All Aboard the Boxcar! Going Beyond the Basics of REST

  • 1. All Aboard the Boxcar! Going Beyond the Basics of REST Pat Patterson Developer Evangelist Architect ppatterson@salesforce.com @metadaddy
  • 2. Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. Safe Harbor
  • 3. RESTful principles When our REST API ran out of steam The Boxcar Composite resources – still REST? Agenda
  • 5. Client-Server • Separate UI from Data Storage • Independent evolution of components Stateless • Each request is self-contained • Visibility, reliability, scalability Cache • Responses labeled as cacheable, or not • Efficiency, scalability, performance From http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm Fielding’s Six Constraints
  • 6. Uniform Interface • Decouple implementations from services • Trade-off: degraded efficiency Layered System • Each component cannot see beyond the next layer Code-On-Demand (optional) • Extend client functionality via applets (!) or scripts Fielding’s Six Constraints
  • 7. Identification of resources • Resource: “any information that can be named” Manipulation of resources through representations • Current or intended state of resource Self-descriptive messages • Metadata: e.g. media type, last modified time Hypermedia as the engine of application state • Resource navigation via links contained in the representation From http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm Uniform Interface
  • 8. Resources identified by URIs • http://api.example.com/widgets/w000123 Representation by Internet media types • JSON HTTP with standard methods • GET, PUT, POST, DELETE, PATCH Hypertext links between resources • No ‘magic knowledge’ driving interaction REST in Practice - 2015
  • 9. Force.com REST API Demo Principles in Practice
  • 10. Transactional semantics when creating hierarchies of objects? • ‘Stateless’ REST constraint means that transaction context is tricky Performance with high latency networks (mobile clients) • Client framework has a message queue, wants to submit multiple operations in a single network request But… All Was Not Perfect in the REST API!
  • 12. POST to /vXX.X/composite/tree/ObjectName { "records" :[{ "attributes" : {"type" : "Account", "referenceId" : "ref1"}, "name" : "SampleAccount", "Contacts" : { "records" : [{ "attributes" : {"type" : "Contact", "referenceId" : "ref2"}, "lastname" : "Smith", "email" : smith@example.com }, { "attributes" : {"type" : "Contact", "referenceId" : "ref3"}, "lastname" : "Jones", "email" : jones@example.com }] } }] } Create whole hierarchies of related objects in a single request Solution 1: Object Trees
  • 13. { "hasErrors" : false, "results" : [{ "referenceId" : "ref1", "id" : "001D000000K0fXOIAZ" },{ "referenceId" : "ref2", "id" : "001D000000K0fXPIAZ" },{ "referenceId" : "ref3", "id" : "003D000000QV9n2IAD" }] } Object Tree Response
  • 15. ✔ Client-Server ✔ Stateless ✔ Cache ? Uniform Interface ✔ Layered System Is This RESTful?
  • 16. ✔ Identification of resources ✔ Manipulation of resources through representations ✔ Self-descriptive messages ✔ Hypermedia as the engine of application state What About Uniform Interface?
  • 17. POST to /vXX.X/composite/batch { "batchRequests" : [{ "method" : "PATCH", "url" : "v34.0/sobjects/account/001D000000K0fXOIAZ", "richInput" : {"Name" : "NewName"} },{ "method" : "GET", "url" : "v34.0/sobjects/account/001D000000K0fXOIAZ?fields=Name,LastModifiedDate" }] } Coalesce independent requests Solution 2: Batch Requests
  • 18. { "hasErrors" : false, "results" : [{ "statusCode" : 204, "result" : null },{ "statusCode" : 200, "result": { "attributes" : { "type" : "Account", "url" : "/services/data/v34.0/sobjects/Account/001D000000K0fXOIAZ" }, "Name" : "NewName", "LastModifiedDate" : "2015-01-27T20:51:14.000+0000", "Id" : "001D000000K0fXOIAZ" } }] } Batch Response
  • 20. ✔ Client-Server ✔ Stateless ✔ Cache ? Uniform Interface ✔ Layered System Is This RESTful?
  • 21. ✔ Identification of resources ✔ Manipulation of resources through representations ✔ Self-descriptive messages ✔ Hypermedia as the engine of application state Straight JSON via HTTP is just one pattern, not the law! What About Uniform Interface?
  • 22. Go read (or reread!) Fielding’s dissertation… at the very least, read chapter 5! Follow the REST orthodoxy… until it makes more sense to blaze a new trail… and, even then, check that you’re not driving over a cliff! Conclusion

Editor's Notes

  1. Applets were big in 2000, Ajax wasn’t described until 2005
  2. Resources can be collections of other resources Fielding talks about HTML, JPEG – JSON not until 2001
  3. Use workbench to show REST API – root, sobjects, query, get account, create account, create contact, delete contact Show how validation fail on a contact leaves us with an account we don’t want
  4. Create account, contacts in one hit. Show how validation fail on a contact will back out account creation.
  5. Remember - resources can be collections of other resources
  6. Feels a bit SOAPy, but it’s effectively an extension of HTTP – once client understands batch semantics, no special magic knowledge required.