SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Designing custom REST and SOAP
interfaces on Force.com
Steven Herod, Technical Director (Australia), Cloud Sherpas
@sherod
Safe harbor
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.
Steven Herod
Technical Director, Cloud Sherpas (Australia)
@sherod
http://limitexception.herod.net/
Agenda
• Use cases for custom interfaces
• Upsides and downsides
• Code walkthrough
• Best Practices
3 (example) use cases
• Multiple external parties need to log leads w/o duplicates
• Concern: 3rd Party needs to understand Salesforce and your data model
semantics and logic.

• Need to interact with a complex opportunity process/data model
• Concern: An internal business process with many rules needs to be
exposed to an external system.

• Your mobile app needs to modify multiple parts of the data model to
complete an action
• Concern: ‘Chatty’ network traffic, opportunity for failures at any point.
Benefits of going custom…
•

Transaction safety
•

•

Lower latency
•

•

Offers a narrow/specific interface that allows you to expose only the aspects of the business
logic and data model that are needed.

More Robust
•

•

Complete many activities in a single request

Service Oriented
•

•

Update multiple objects in a single request

Can unit tested.

Controlled interface
•

A published and controlled interface specific to your business.
Caveats
• Your ETL Tool may not understand custom REST/SOAP interfaces with
Salesforce.
•

An out of the box ‘Salesforce Adapter’ is not applicable here.
(Generic REST / SOAP should work however)

• You need to write code (and test coverage)
•

What was ‘no effort’ on the Salesforce side now becomes a Software
Development process

• Limits!
•
•
•

Request size (3MB)
SOQL query limits (100 per request)
Record modification limits(10,000 records touched)
For and against
A real life example
Public Internet user clicks this button on a Heroku
Based website or a Mobile app
Salesforce needs to do this
Class structure
sObjects
sObjects
sObjects
RestQuoteServiceV1

Defers to

QuoteService

DAOs
DAOs
DAOs

SoapQuoteServiceV1

Uses

Uses

QuoteModel

QuoteRequest

QuoteResponse
Best Practices
• Consciously design your API
• Think about it! Govern it! Consider every method/operation! Document it!

• Fight for the user
• Think: “What is easiest for the consumer of the interface?”

• Work with the platform
• Salesforce REST != REST purist
• Salesforce SOAP != WS-*

• Consider how you will manage testing with external parties
• Test data, test system availability…
Best Practices
• Use Apex Wrapper Classes as Data Transfer Objects
• Refrain from sending or expecting sObjects or you may expose a lot of
internal details

• Use a Services layer
• Keep your business code out of the class that handles the public interface.

• Bake in versioning
• Consider if you need to make a change to your interface

• Unit test all the things
• The unit test is your insurance and means you can detect when declarative
changes affect your code
Best Practices
• Manage your transactions explicitly
• Especially if you do exception trapping

• Use @future if you need to.
• Shorten response times where its safe to go async

• Indicate in the Apex Class name that is a public interface
• Consider the error feedback
• What does a API consumer see if things go wrong?

• Program defensively
• Expect bad input
Finally… REST specific advice
• 1 Class per URL mapping = proliferation
• Don’t forget the Query String
• E.g. GET /LoanApplications/?daysSinceUpdate=5

• Watch your status codes and verbs!
• Use the right status code and the right verb (GET, PUT, POST)

Beep
Designing custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.com

Weitere ähnliche Inhalte

Was ist angesagt?

Interview questions and answers for salesforce developer
Interview questions and answers for salesforce developerInterview questions and answers for salesforce developer
Interview questions and answers for salesforce developerPmp15780
 
Designing Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comDesigning Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comSalesforce Developers
 
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
App to AppExchange - A Journey from Idea to Market for Salesforce DevelopersApp to AppExchange - A Journey from Idea to Market for Salesforce Developers
App to AppExchange - A Journey from Idea to Market for Salesforce DevelopersEric Shupps
 
How to Launch Your AppExchange App at Dreamforce
How to Launch Your AppExchange App at DreamforceHow to Launch Your AppExchange App at Dreamforce
How to Launch Your AppExchange App at DreamforceCodeScience
 
Salesforce Mobile architecture introduction
Salesforce Mobile architecture introductionSalesforce Mobile architecture introduction
Salesforce Mobile architecture introductionDavid Scruggs
 
Operationalizing Big Data as a Service
Operationalizing Big Data as a ServiceOperationalizing Big Data as a Service
Operationalizing Big Data as a ServiceSalesforce Engineering
 
AppExchange for Admins: Apps Every Admin Should Know
AppExchange for Admins: Apps Every Admin Should KnowAppExchange for Admins: Apps Every Admin Should Know
AppExchange for Admins: Apps Every Admin Should KnowCodeScience
 
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow NavigationStreamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow NavigationSalesforce Developers
 
Using Oculus Rift and VR to Visualize Data on Salesforce
Using Oculus Rift and VR to Visualize Data on SalesforceUsing Oculus Rift and VR to Visualize Data on Salesforce
Using Oculus Rift and VR to Visualize Data on SalesforceCodeScience
 
Digitalize your Approval processes with approvals in Microsoft Teams
Digitalize your Approval processes with approvals in Microsoft TeamsDigitalize your Approval processes with approvals in Microsoft Teams
Digitalize your Approval processes with approvals in Microsoft TeamsJuan Carlos Gonzalez
 
Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar Abhinav Gupta
 
Service Level Terminology : SLA ,SLO & SLI
Service Level Terminology : SLA ,SLO & SLIService Level Terminology : SLA ,SLO & SLI
Service Level Terminology : SLA ,SLO & SLIKnoldus Inc.
 
Secure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part ISecure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part ISalesforce Developers
 
How a PDO Can Help Get You to Market Faster
How a PDO Can Help Get You to Market FasterHow a PDO Can Help Get You to Market Faster
How a PDO Can Help Get You to Market FasterCodeScience
 

Was ist angesagt? (20)

Deep Dive into Apex Triggers
Deep Dive into Apex TriggersDeep Dive into Apex Triggers
Deep Dive into Apex Triggers
 
Tailoring the DITA Suit to Fit
Tailoring the DITA Suit to FitTailoring the DITA Suit to Fit
Tailoring the DITA Suit to Fit
 
Security Boundaries in Apex
Security Boundaries in ApexSecurity Boundaries in Apex
Security Boundaries in Apex
 
Interview questions and answers for salesforce developer
Interview questions and answers for salesforce developerInterview questions and answers for salesforce developer
Interview questions and answers for salesforce developer
 
ISV App Lab
ISV App LabISV App Lab
ISV App Lab
 
Designing Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comDesigning Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.com
 
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
App to AppExchange - A Journey from Idea to Market for Salesforce DevelopersApp to AppExchange - A Journey from Idea to Market for Salesforce Developers
App to AppExchange - A Journey from Idea to Market for Salesforce Developers
 
How to Launch Your AppExchange App at Dreamforce
How to Launch Your AppExchange App at DreamforceHow to Launch Your AppExchange App at Dreamforce
How to Launch Your AppExchange App at Dreamforce
 
Scrum at Scale
Scrum at ScaleScrum at Scale
Scrum at Scale
 
Salesforce Mobile architecture introduction
Salesforce Mobile architecture introductionSalesforce Mobile architecture introduction
Salesforce Mobile architecture introduction
 
Ten Years of DITA: Are We There Yet?
Ten Years of DITA: Are We There Yet?Ten Years of DITA: Are We There Yet?
Ten Years of DITA: Are We There Yet?
 
Operationalizing Big Data as a Service
Operationalizing Big Data as a ServiceOperationalizing Big Data as a Service
Operationalizing Big Data as a Service
 
AppExchange for Admins: Apps Every Admin Should Know
AppExchange for Admins: Apps Every Admin Should KnowAppExchange for Admins: Apps Every Admin Should Know
AppExchange for Admins: Apps Every Admin Should Know
 
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow NavigationStreamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
 
Using Oculus Rift and VR to Visualize Data on Salesforce
Using Oculus Rift and VR to Visualize Data on SalesforceUsing Oculus Rift and VR to Visualize Data on Salesforce
Using Oculus Rift and VR to Visualize Data on Salesforce
 
Digitalize your Approval processes with approvals in Microsoft Teams
Digitalize your Approval processes with approvals in Microsoft TeamsDigitalize your Approval processes with approvals in Microsoft Teams
Digitalize your Approval processes with approvals in Microsoft Teams
 
Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar
 
Service Level Terminology : SLA ,SLO & SLI
Service Level Terminology : SLA ,SLO & SLIService Level Terminology : SLA ,SLO & SLI
Service Level Terminology : SLA ,SLO & SLI
 
Secure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part ISecure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part I
 
How a PDO Can Help Get You to Market Faster
How a PDO Can Help Get You to Market FasterHow a PDO Can Help Get You to Market Faster
How a PDO Can Help Get You to Market Faster
 

Andere mochten auch

Becoming a Salesforce.com Technical Architect
Becoming a Salesforce.com Technical ArchitectBecoming a Salesforce.com Technical Architect
Becoming a Salesforce.com Technical ArchitectSteven Herod
 
Introduction to Force.com Canvas Apps
Introduction to Force.com Canvas AppsIntroduction to Force.com Canvas Apps
Introduction to Force.com Canvas AppsSalesforce Developers
 
O auth, sso, saml, canvas app zhugin(final)
O auth, sso, saml, canvas app   zhugin(final)O auth, sso, saml, canvas app   zhugin(final)
O auth, sso, saml, canvas app zhugin(final)Dmitry Zhugin
 
Trust Me, I'm An Architect
Trust Me, I'm An ArchitectTrust Me, I'm An Architect
Trust Me, I'm An ArchitectKeir Bowden
 
CIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCloudIDSummit
 
Seamless Authentication with Force.com Canvas
Seamless Authentication with Force.com CanvasSeamless Authentication with Force.com Canvas
Seamless Authentication with Force.com CanvasSalesforce Developers
 
Force.com Canvas: Salesforce1, SAML, & Apex...Oh My!
Force.com Canvas: Salesforce1, SAML, & Apex...Oh My!Force.com Canvas: Salesforce1, SAML, & Apex...Oh My!
Force.com Canvas: Salesforce1, SAML, & Apex...Oh My!Salesforce Developers
 
Integrating Active Directory With Salesforce Using Identity Connect
Integrating Active Directory With Salesforce Using Identity ConnectIntegrating Active Directory With Salesforce Using Identity Connect
Integrating Active Directory With Salesforce Using Identity ConnectSalesforce Developers
 
Dreamforce 2013 for Developers (Sydney Salesforce Developer User Group)
Dreamforce 2013 for Developers (Sydney Salesforce Developer User Group)Dreamforce 2013 for Developers (Sydney Salesforce Developer User Group)
Dreamforce 2013 for Developers (Sydney Salesforce Developer User Group)Steven Herod
 
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
Salesforce1 dev week UYSDUG 2014 - the force canvas sparkSalesforce1 dev week UYSDUG 2014 - the force canvas spark
Salesforce1 dev week UYSDUG 2014 - the force canvas sparkAldo Fernandez
 
Dive Deep Into the Force.com Canvas Framework
Dive Deep Into the Force.com Canvas FrameworkDive Deep Into the Force.com Canvas Framework
Dive Deep Into the Force.com Canvas FrameworkSalesforce Developers
 
Salesforce Developer Garage Seattle: Force.com Canvas
Salesforce Developer Garage Seattle: Force.com CanvasSalesforce Developer Garage Seattle: Force.com Canvas
Salesforce Developer Garage Seattle: Force.com CanvasSalesforce Developers
 
Making External Web Pages Interact With Visualforce
Making External Web Pages Interact With VisualforceMaking External Web Pages Interact With Visualforce
Making External Web Pages Interact With VisualforceSalesforce Developers
 
force.com Canvas Overview: Leveraging Legacy Applications to Become a Custome...
force.com Canvas Overview: Leveraging Legacy Applications to Become a Custome...force.com Canvas Overview: Leveraging Legacy Applications to Become a Custome...
force.com Canvas Overview: Leveraging Legacy Applications to Become a Custome...Salesforce.org
 
Visualforce & Force.com Canvas: Unlock your Web App inside of Salesforce.com ...
Visualforce & Force.com Canvas: Unlock your Web App inside of Salesforce.com ...Visualforce & Force.com Canvas: Unlock your Web App inside of Salesforce.com ...
Visualforce & Force.com Canvas: Unlock your Web App inside of Salesforce.com ...Salesforce Developers
 
Dive Deep into Apex: Advanced Apex!
Dive Deep into Apex: Advanced Apex! Dive Deep into Apex: Advanced Apex!
Dive Deep into Apex: Advanced Apex! Salesforce Developers
 
Intro to Force.com Canvas: Running External Apps within the Salesforce UI Web...
Intro to Force.com Canvas: Running External Apps within the Salesforce UI Web...Intro to Force.com Canvas: Running External Apps within the Salesforce UI Web...
Intro to Force.com Canvas: Running External Apps within the Salesforce UI Web...Salesforce Developers
 
Authentication with OAuth and Connected Apps
Authentication with OAuth and Connected AppsAuthentication with OAuth and Connected Apps
Authentication with OAuth and Connected AppsSalesforce Developers
 
Force.com Canvas - a Quick Introduction
Force.com Canvas - a Quick IntroductionForce.com Canvas - a Quick Introduction
Force.com Canvas - a Quick IntroductionSteven Herod
 
Single Sign-On and User Management for Portals and Communities
Single Sign-On and User Management for Portals and CommunitiesSingle Sign-On and User Management for Portals and Communities
Single Sign-On and User Management for Portals and CommunitiesSalesforce Developers
 

Andere mochten auch (20)

Becoming a Salesforce.com Technical Architect
Becoming a Salesforce.com Technical ArchitectBecoming a Salesforce.com Technical Architect
Becoming a Salesforce.com Technical Architect
 
Introduction to Force.com Canvas Apps
Introduction to Force.com Canvas AppsIntroduction to Force.com Canvas Apps
Introduction to Force.com Canvas Apps
 
O auth, sso, saml, canvas app zhugin(final)
O auth, sso, saml, canvas app   zhugin(final)O auth, sso, saml, canvas app   zhugin(final)
O auth, sso, saml, canvas app zhugin(final)
 
Trust Me, I'm An Architect
Trust Me, I'm An ArchitectTrust Me, I'm An Architect
Trust Me, I'm An Architect
 
CIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in Action
 
Seamless Authentication with Force.com Canvas
Seamless Authentication with Force.com CanvasSeamless Authentication with Force.com Canvas
Seamless Authentication with Force.com Canvas
 
Force.com Canvas: Salesforce1, SAML, & Apex...Oh My!
Force.com Canvas: Salesforce1, SAML, & Apex...Oh My!Force.com Canvas: Salesforce1, SAML, & Apex...Oh My!
Force.com Canvas: Salesforce1, SAML, & Apex...Oh My!
 
Integrating Active Directory With Salesforce Using Identity Connect
Integrating Active Directory With Salesforce Using Identity ConnectIntegrating Active Directory With Salesforce Using Identity Connect
Integrating Active Directory With Salesforce Using Identity Connect
 
Dreamforce 2013 for Developers (Sydney Salesforce Developer User Group)
Dreamforce 2013 for Developers (Sydney Salesforce Developer User Group)Dreamforce 2013 for Developers (Sydney Salesforce Developer User Group)
Dreamforce 2013 for Developers (Sydney Salesforce Developer User Group)
 
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
Salesforce1 dev week UYSDUG 2014 - the force canvas sparkSalesforce1 dev week UYSDUG 2014 - the force canvas spark
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
 
Dive Deep Into the Force.com Canvas Framework
Dive Deep Into the Force.com Canvas FrameworkDive Deep Into the Force.com Canvas Framework
Dive Deep Into the Force.com Canvas Framework
 
Salesforce Developer Garage Seattle: Force.com Canvas
Salesforce Developer Garage Seattle: Force.com CanvasSalesforce Developer Garage Seattle: Force.com Canvas
Salesforce Developer Garage Seattle: Force.com Canvas
 
Making External Web Pages Interact With Visualforce
Making External Web Pages Interact With VisualforceMaking External Web Pages Interact With Visualforce
Making External Web Pages Interact With Visualforce
 
force.com Canvas Overview: Leveraging Legacy Applications to Become a Custome...
force.com Canvas Overview: Leveraging Legacy Applications to Become a Custome...force.com Canvas Overview: Leveraging Legacy Applications to Become a Custome...
force.com Canvas Overview: Leveraging Legacy Applications to Become a Custome...
 
Visualforce & Force.com Canvas: Unlock your Web App inside of Salesforce.com ...
Visualforce & Force.com Canvas: Unlock your Web App inside of Salesforce.com ...Visualforce & Force.com Canvas: Unlock your Web App inside of Salesforce.com ...
Visualforce & Force.com Canvas: Unlock your Web App inside of Salesforce.com ...
 
Dive Deep into Apex: Advanced Apex!
Dive Deep into Apex: Advanced Apex! Dive Deep into Apex: Advanced Apex!
Dive Deep into Apex: Advanced Apex!
 
Intro to Force.com Canvas: Running External Apps within the Salesforce UI Web...
Intro to Force.com Canvas: Running External Apps within the Salesforce UI Web...Intro to Force.com Canvas: Running External Apps within the Salesforce UI Web...
Intro to Force.com Canvas: Running External Apps within the Salesforce UI Web...
 
Authentication with OAuth and Connected Apps
Authentication with OAuth and Connected AppsAuthentication with OAuth and Connected Apps
Authentication with OAuth and Connected Apps
 
Force.com Canvas - a Quick Introduction
Force.com Canvas - a Quick IntroductionForce.com Canvas - a Quick Introduction
Force.com Canvas - a Quick Introduction
 
Single Sign-On and User Management for Portals and Communities
Single Sign-On and User Management for Portals and CommunitiesSingle Sign-On and User Management for Portals and Communities
Single Sign-On and User Management for Portals and Communities
 

Ähnlich wie Designing custom REST and SOAP interfaces on Force.com

Manage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkManage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkSalesforce Developers
 
Elevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackElevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackCarolEnLaNube
 
Building Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIBuilding Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIJeff Douglas
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforceMark Adcock
 
Build Consumer-Facing Apps with Heroku Connect
Build Consumer-Facing Apps with Heroku ConnectBuild Consumer-Facing Apps with Heroku Connect
Build Consumer-Facing Apps with Heroku ConnectJeff Douglas
 
Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)
Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)
Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)Salesforce Partners
 
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
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Mark Adcock
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Salesforce Developers
 
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...Shell Black
 
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
 
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
 
Planning Your Migration to the Lightning Experience
Planning Your Migration to the Lightning ExperiencePlanning Your Migration to the Lightning Experience
Planning Your Migration to the Lightning ExperienceShell Black
 
Apex Trigger Debugging: Solving the Hard Problems
Apex Trigger Debugging: Solving the Hard ProblemsApex Trigger Debugging: Solving the Hard Problems
Apex Trigger Debugging: Solving the Hard ProblemsSalesforce Developers
 
Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Salesforce Partners
 
Build your API with Force.com and Heroku
Build your API with Force.com and HerokuBuild your API with Force.com and Heroku
Build your API with Force.com and HerokuJeff Douglas
 
PHP and Rails with AppExchange
PHP and Rails with AppExchangePHP and Rails with AppExchange
PHP and Rails with AppExchangedreamforce2006
 

Ähnlich wie Designing custom REST and SOAP interfaces on Force.com (20)

Manage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkManage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance Framework
 
Elevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackElevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance Track
 
Building Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIBuilding Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling API
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
Build Consumer-Facing Apps with Heroku Connect
Build Consumer-Facing Apps with Heroku ConnectBuild Consumer-Facing Apps with Heroku Connect
Build Consumer-Facing Apps with Heroku Connect
 
Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)
Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)
Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)
 
Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
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
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
 
Coding in the App Cloud
Coding in the App CloudCoding in the App Cloud
Coding in the App Cloud
 
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
Transition to the Lightning Experience: Pro Tips, Tools and a Transition Stra...
 
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 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
 
Planning Your Migration to the Lightning Experience
Planning Your Migration to the Lightning ExperiencePlanning Your Migration to the Lightning Experience
Planning Your Migration to the Lightning Experience
 
Apex Trigger Debugging: Solving the Hard Problems
Apex Trigger Debugging: Solving the Hard ProblemsApex Trigger Debugging: Solving the Hard Problems
Apex Trigger Debugging: Solving the Hard Problems
 
Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)
 
Build your API with Force.com and Heroku
Build your API with Force.com and HerokuBuild your API with Force.com and Heroku
Build your API with Force.com and Heroku
 
Org Merge Best Practices
Org Merge Best PracticesOrg Merge Best Practices
Org Merge Best Practices
 
PHP and Rails with AppExchange
PHP and Rails with AppExchangePHP and Rails with AppExchange
PHP and Rails with AppExchange
 

Mehr von Steven Herod

How Custom is your Org? CEER at Dreamforce 2019
How Custom is your Org?  CEER at Dreamforce 2019How Custom is your Org?  CEER at Dreamforce 2019
How Custom is your Org? CEER at Dreamforce 2019Steven Herod
 
Super Secret Salesforce
Super Secret SalesforceSuper Secret Salesforce
Super Secret SalesforceSteven Herod
 
Perspectives on salesforce architecture Forcelandia talk 2017
Perspectives on salesforce architecture   Forcelandia talk 2017Perspectives on salesforce architecture   Forcelandia talk 2017
Perspectives on salesforce architecture Forcelandia talk 2017Steven Herod
 
The dreamforce 2018 wrap final
The dreamforce 2018 wrap finalThe dreamforce 2018 wrap final
The dreamforce 2018 wrap finalSteven Herod
 
Sydney salesforce developer group talker tips
Sydney salesforce developer group   talker tipsSydney salesforce developer group   talker tips
Sydney salesforce developer group talker tipsSteven Herod
 
Twitter bootstrap force.com site and responsive design
Twitter bootstrap   force.com site and responsive designTwitter bootstrap   force.com site and responsive design
Twitter bootstrap force.com site and responsive designSteven Herod
 

Mehr von Steven Herod (6)

How Custom is your Org? CEER at Dreamforce 2019
How Custom is your Org?  CEER at Dreamforce 2019How Custom is your Org?  CEER at Dreamforce 2019
How Custom is your Org? CEER at Dreamforce 2019
 
Super Secret Salesforce
Super Secret SalesforceSuper Secret Salesforce
Super Secret Salesforce
 
Perspectives on salesforce architecture Forcelandia talk 2017
Perspectives on salesforce architecture   Forcelandia talk 2017Perspectives on salesforce architecture   Forcelandia talk 2017
Perspectives on salesforce architecture Forcelandia talk 2017
 
The dreamforce 2018 wrap final
The dreamforce 2018 wrap finalThe dreamforce 2018 wrap final
The dreamforce 2018 wrap final
 
Sydney salesforce developer group talker tips
Sydney salesforce developer group   talker tipsSydney salesforce developer group   talker tips
Sydney salesforce developer group talker tips
 
Twitter bootstrap force.com site and responsive design
Twitter bootstrap   force.com site and responsive designTwitter bootstrap   force.com site and responsive design
Twitter bootstrap force.com site and responsive design
 

Kürzlich hochgeladen

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Kürzlich hochgeladen (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Designing custom REST and SOAP interfaces on Force.com

  • 1. Designing custom REST and SOAP interfaces on Force.com Steven Herod, Technical Director (Australia), Cloud Sherpas @sherod
  • 2. Safe harbor 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.
  • 3. Steven Herod Technical Director, Cloud Sherpas (Australia) @sherod http://limitexception.herod.net/
  • 4. Agenda • Use cases for custom interfaces • Upsides and downsides • Code walkthrough • Best Practices
  • 5. 3 (example) use cases • Multiple external parties need to log leads w/o duplicates • Concern: 3rd Party needs to understand Salesforce and your data model semantics and logic. • Need to interact with a complex opportunity process/data model • Concern: An internal business process with many rules needs to be exposed to an external system. • Your mobile app needs to modify multiple parts of the data model to complete an action • Concern: ‘Chatty’ network traffic, opportunity for failures at any point.
  • 6. Benefits of going custom… • Transaction safety • • Lower latency • • Offers a narrow/specific interface that allows you to expose only the aspects of the business logic and data model that are needed. More Robust • • Complete many activities in a single request Service Oriented • • Update multiple objects in a single request Can unit tested. Controlled interface • A published and controlled interface specific to your business.
  • 7. Caveats • Your ETL Tool may not understand custom REST/SOAP interfaces with Salesforce. • An out of the box ‘Salesforce Adapter’ is not applicable here. (Generic REST / SOAP should work however) • You need to write code (and test coverage) • What was ‘no effort’ on the Salesforce side now becomes a Software Development process • Limits! • • • Request size (3MB) SOQL query limits (100 per request) Record modification limits(10,000 records touched)
  • 9. A real life example Public Internet user clicks this button on a Heroku Based website or a Mobile app Salesforce needs to do this
  • 11. Best Practices • Consciously design your API • Think about it! Govern it! Consider every method/operation! Document it! • Fight for the user • Think: “What is easiest for the consumer of the interface?” • Work with the platform • Salesforce REST != REST purist • Salesforce SOAP != WS-* • Consider how you will manage testing with external parties • Test data, test system availability…
  • 12. Best Practices • Use Apex Wrapper Classes as Data Transfer Objects • Refrain from sending or expecting sObjects or you may expose a lot of internal details • Use a Services layer • Keep your business code out of the class that handles the public interface. • Bake in versioning • Consider if you need to make a change to your interface • Unit test all the things • The unit test is your insurance and means you can detect when declarative changes affect your code
  • 13. Best Practices • Manage your transactions explicitly • Especially if you do exception trapping • Use @future if you need to. • Shorten response times where its safe to go async • Indicate in the Apex Class name that is a public interface • Consider the error feedback • What does a API consumer see if things go wrong? • Program defensively • Expect bad input
  • 14. Finally… REST specific advice • 1 Class per URL mapping = proliferation • Don’t forget the Query String • E.g. GET /LoanApplications/?daysSinceUpdate=5 • Watch your status codes and verbs! • Use the right status code and the right verb (GET, PUT, POST) Beep