SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Simplifying Salesforce REST in Java
Using Annotations
The SPA library
David Buccola, Salesforce,
Principal Member of Technical Staff
@davidbuccola
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.
Introduction
Leveraging Salesforce from Java
You might choose Java when…
• Integrating an existing application written in java
•

Large body of existing code

• Integrating a completely new application
•

Developer expertise and environment
Network APIs for Java
Multiple styles of network API
• SOAP
• REST

You need a Java API to help put the bits on the wire
Different Levels of Java API
Low level APIs
• Protocol-specific
•

JAX-RS for REST

•

JAX-WS for SOAP

•

Salesforce Web Services Connector (WSC)

High level APIs
• More abstract, protocol independent, layered on low-level APIs
•

Java Persistence Annotations (JPA)
SPA is a High Level API
So…
• No religion about SOAP vs. REST
• No focus on network protocols
•

Implementation based on REST but that’s not necessarily important
Different Styles of Java API Access
Loosely typed bag of properties
• Property maps
• Jackson JsonNode
• Dynamic, flexible

Strongly typed beans
• Jackson bean bindings
• Java Persistence Annotations (JPA)
• Additional compiler and IDE assist to assure correctness
SPA is a Strongly Typed API
Not preaching loosely typed vs. strongly typed
• Different problems call for different approaches

If problem calls for strongly typed then…
• SPA can help you out

If problem calls for loosely typed then…
• Check out “Rich SObjects”
•

https://github.com/ryanbrainard/richsobjects
Quickstart Overview
Beans with Annotations
• Salesforce Persistence
Annotations (SPA)
• Annotated beans that correspond
to Salesforce objects
• In the style of Jackson or JPA
RecordAccessor Interface
•

CRUD+
•

create

•

get

•

delete

•

patch

•

update

•

query

•

more…
Simple Example
• Configure a RecordAccessorFactory
•

Jersey-based RecordAccessor factory

•

Configured to use username/password
•

In real life you’d use something better
(OAuth)

• Create a RecordAccessor
•

Stateless, thread-safe, reusable

• Get your record
Like Jackson but Different
Built on top of Jackson
• Leverages Jackson annotation processing, serialization and
deserialization

But…
• More semantic knowledge about Salesforce objects and relationships
than raw Jackson
• Allows SPA to make your life easier, and more powerful
Like JPA but different
Some JPA-like capabilities
• Building complex queries for you automatically
• Pulling in trees of related objects in one shot

But…
• Not JPA, MUCH lighter weight
• Operates on simple passive beans
•

No complex runtime bean modification or instrumentation

• Stateless
How SPA Helps
Subtleties of Salesforce REST
• Jackson Annotations can be used with Salesforce REST, but…
• There are various subtleties that require extra effort
• SPA Bridges the gap between raw Jackson and Salesforce REST
Help with Object Trees
•

Reading multiple objects at once
improves performance

•

Supported by Salesforce REST but takes
extra work

•

SPA does the work for you

Account
owned by

User

has

Note
created by

User
Builds the Tree Query
• Leverages the Annotations
• Helps with relationship
complexities
• Maintenance simplified when leaf
objects change
Deserializes the Tree
• Deserialization is not automatic
with vanilla Jackson
• Examples that take extra effort:
•

Parent-to-child relationships

•

Polymorphic relationships
Polymorphic Relationships
Generates required SOQL syntax

Handles type information
Help with Read-Only Fields
• Some Salesforce fields can’t be
updated
•

CreatedBy, CreatedDate, etc…

• A hassle for certain programming
patterns (read-modify-write)
• SPA leverages Jackson views to
filter read-only fields on update
• Automatic for many common fields
• Configurable through annotations

Read-Modify-Write

Annotated Read-Only Field
The Annotations
@SalesforceObject
• Identifies beans that correspond to
a Salesforce Object
• Multiple beans can correspond to
the same Salesforce Object
•

Allows you to define different “views”
into the data
@SalesforceField
• Identifies bean members that
correspond to a Salesforce field
• Only need annotated members for
the fields you care about
• Can describe special behaviors:
•

‘insertable’ – whether or not to serialize
the value for ‘create’

•

‘updatable’ - whether or not to serialize
the value for ‘update’ or ‘patch’
@Polymorphic
• Identifies a relationship field as
polymorphic
• Augments the @SalesforceField
annotation
• Identifies valid choices for the
related object type
•

Only need to identify the choices you
care about
The Record Accessor
Record Accessor Recap
• CRUD+
•

Create, get, update, patch, delete,
query, and more

• Similarities to JPA but…
• More like Jackson internally
•
•
•

Operates on passive beans
No fancy runtime instrumentation or
per-object state
Stateless, thread-safe, lightweight
Input Beans are not Modified
• If you’ve used JPA in the past…
•

JPA updates your bean state after
write to do things like:
•

Clear modification state

•

Set a new ID field after create

• SPA will not
•

SPA leaves your input bean alone
Patch vs. Update
• SPA doesn’t maintain state about
modified fields in a bean
• You need to tell SPA how much
you want to change
•

Patch – Change only selected things.
“null” in bean field means don’t
change.

•

Update – Change everything. “null” in
bean field means set to null in
persistence

Update

Patch
Operation Lists
• SPA can execute lists of
operations
• Powerful model that enables
advanced capabilities
•

Access to statistics
•
•

Rows processed

•

•

Bytes sent and received
Elapsed time

Will soon execute as a batch
•
•

Leverages Connect batch resource

•

•

Reduces round trip latency
In pilot

Asynchronous execution planned
Configuration
Authorization Connectors
• Many ways to do authorization
•

HTTP headers

•

OAuth

•

Username/Password

•

Etc…

• SPA delegates the choice
•

Standard authorization connectors

•

Custom authorization connectors
Record Accessor Config
• Authorization Connector selection
• Configurable behaviors
• API Version
• Etc…
Simple Spring Configuration
• Designed for Spring configuration
•

Autowired or manually wired

•

Supports component scanning

Component scan

Get injected with a little

Get injected with a lot
Complex Spring Configuration
• Configure standard
components by referencing
their id (spa.xxx)
• Inject entirely new components
David Buccola
Principal Member of
Technical Staff,
@davidbuccola
Simplifying Salesforce REST in Java Using Annotations

Más contenido relacionado

La actualidad más candente

Scalable Salesforce Integrations - a real-life scenario
Scalable Salesforce Integrations - a real-life scenarioScalable Salesforce Integrations - a real-life scenario
Scalable Salesforce Integrations - a real-life scenarioGiuseppe Cardace
 
Primavera integration possibilities Technical overview - Oracle Primavera Col...
Primavera integration possibilities Technical overview - Oracle Primavera Col...Primavera integration possibilities Technical overview - Oracle Primavera Col...
Primavera integration possibilities Technical overview - Oracle Primavera Col...p6academy
 
Build Cloud & Mobile App on Salesforce Force.com Platform in 15 mins
Build Cloud & Mobile App on Salesforce Force.com Platform in 15 minsBuild Cloud & Mobile App on Salesforce Force.com Platform in 15 mins
Build Cloud & Mobile App on Salesforce Force.com Platform in 15 minsKashi Ahmed
 
Solving todays problems with oracle integration cloud
Solving todays problems with oracle integration cloudSolving todays problems with oracle integration cloud
Solving todays problems with oracle integration cloudHeba Fouad
 
206520 p6 web services programming interface
206520 p6 web services programming interface206520 p6 web services programming interface
206520 p6 web services programming interfacep6academy
 
Oracle Planning and Budgeting Cloud Service
Oracle Planning and Budgeting Cloud ServiceOracle Planning and Budgeting Cloud Service
Oracle Planning and Budgeting Cloud ServiceDatavail
 
Integrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-insIntegrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-insSalesforce Developers
 
Use of unifier with primavera
Use of unifier with primaveraUse of unifier with primavera
Use of unifier with primaveragjmstleonards
 
Enterprise Integration - Solution Patterns From the Field
Enterprise Integration - Solution Patterns From the FieldEnterprise Integration - Solution Patterns From the Field
Enterprise Integration - Solution Patterns From the FieldSalesforce 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
 
Recipes for the Oracle Cloud: Cooking with OneCloud in Your EPM Kitchen
Recipes for the Oracle Cloud: Cooking with OneCloud in Your EPM KitchenRecipes for the Oracle Cloud: Cooking with OneCloud in Your EPM Kitchen
Recipes for the Oracle Cloud: Cooking with OneCloud in Your EPM KitchenAlithya
 
Phx User Group Salesforce Connect
Phx User Group Salesforce ConnectPhx User Group Salesforce Connect
Phx User Group Salesforce ConnectAdam Olshansky
 
Oracle Primavera Gateway 15.2 Webcast
Oracle Primavera Gateway 15.2 WebcastOracle Primavera Gateway 15.2 Webcast
Oracle Primavera Gateway 15.2 Webcastp6academy
 
Salesforce Cloud Infrastructure and Challenges - A Brief Overview
Salesforce Cloud Infrastructure and Challenges - A Brief OverviewSalesforce Cloud Infrastructure and Challenges - A Brief Overview
Salesforce Cloud Infrastructure and Challenges - A Brief OverviewSalesforce Engineering
 
Salesforce1: Every Developer is a Mobile Developer
Salesforce1: Every Developer is a Mobile DeveloperSalesforce1: Every Developer is a Mobile Developer
Salesforce1: Every Developer is a Mobile DeveloperSalesforce Developers
 
Integrating primavera p6 with oracle erp which technology path is right for...
Integrating primavera p6 with oracle erp   which technology path is right for...Integrating primavera p6 with oracle erp   which technology path is right for...
Integrating primavera p6 with oracle erp which technology path is right for...p6academy
 
What's New in Primavera Gateway 16.1
What's New in Primavera Gateway 16.1What's New in Primavera Gateway 16.1
What's New in Primavera Gateway 16.1p6academy
 
Anypoint monitoring capabilities
Anypoint monitoring capabilitiesAnypoint monitoring capabilities
Anypoint monitoring capabilitiesMarioMartinez88103
 
Salesforce Consulting Services
Salesforce Consulting ServicesSalesforce Consulting Services
Salesforce Consulting ServicesManasa Nuguri
 
Primavera Gateway overview - Oracle Primavera P6 Collaborate 14
Primavera Gateway overview - Oracle Primavera P6 Collaborate 14Primavera Gateway overview - Oracle Primavera P6 Collaborate 14
Primavera Gateway overview - Oracle Primavera P6 Collaborate 14p6academy
 

La actualidad más candente (20)

Scalable Salesforce Integrations - a real-life scenario
Scalable Salesforce Integrations - a real-life scenarioScalable Salesforce Integrations - a real-life scenario
Scalable Salesforce Integrations - a real-life scenario
 
Primavera integration possibilities Technical overview - Oracle Primavera Col...
Primavera integration possibilities Technical overview - Oracle Primavera Col...Primavera integration possibilities Technical overview - Oracle Primavera Col...
Primavera integration possibilities Technical overview - Oracle Primavera Col...
 
Build Cloud & Mobile App on Salesforce Force.com Platform in 15 mins
Build Cloud & Mobile App on Salesforce Force.com Platform in 15 minsBuild Cloud & Mobile App on Salesforce Force.com Platform in 15 mins
Build Cloud & Mobile App on Salesforce Force.com Platform in 15 mins
 
Solving todays problems with oracle integration cloud
Solving todays problems with oracle integration cloudSolving todays problems with oracle integration cloud
Solving todays problems with oracle integration cloud
 
206520 p6 web services programming interface
206520 p6 web services programming interface206520 p6 web services programming interface
206520 p6 web services programming interface
 
Oracle Planning and Budgeting Cloud Service
Oracle Planning and Budgeting Cloud ServiceOracle Planning and Budgeting Cloud Service
Oracle Planning and Budgeting Cloud Service
 
Integrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-insIntegrating Salesforce with Microsoft Office through Add-ins
Integrating Salesforce with Microsoft Office through Add-ins
 
Use of unifier with primavera
Use of unifier with primaveraUse of unifier with primavera
Use of unifier with primavera
 
Enterprise Integration - Solution Patterns From the Field
Enterprise Integration - Solution Patterns From the FieldEnterprise Integration - Solution Patterns From the Field
Enterprise Integration - Solution Patterns From the Field
 
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
 
Recipes for the Oracle Cloud: Cooking with OneCloud in Your EPM Kitchen
Recipes for the Oracle Cloud: Cooking with OneCloud in Your EPM KitchenRecipes for the Oracle Cloud: Cooking with OneCloud in Your EPM Kitchen
Recipes for the Oracle Cloud: Cooking with OneCloud in Your EPM Kitchen
 
Phx User Group Salesforce Connect
Phx User Group Salesforce ConnectPhx User Group Salesforce Connect
Phx User Group Salesforce Connect
 
Oracle Primavera Gateway 15.2 Webcast
Oracle Primavera Gateway 15.2 WebcastOracle Primavera Gateway 15.2 Webcast
Oracle Primavera Gateway 15.2 Webcast
 
Salesforce Cloud Infrastructure and Challenges - A Brief Overview
Salesforce Cloud Infrastructure and Challenges - A Brief OverviewSalesforce Cloud Infrastructure and Challenges - A Brief Overview
Salesforce Cloud Infrastructure and Challenges - A Brief Overview
 
Salesforce1: Every Developer is a Mobile Developer
Salesforce1: Every Developer is a Mobile DeveloperSalesforce1: Every Developer is a Mobile Developer
Salesforce1: Every Developer is a Mobile Developer
 
Integrating primavera p6 with oracle erp which technology path is right for...
Integrating primavera p6 with oracle erp   which technology path is right for...Integrating primavera p6 with oracle erp   which technology path is right for...
Integrating primavera p6 with oracle erp which technology path is right for...
 
What's New in Primavera Gateway 16.1
What's New in Primavera Gateway 16.1What's New in Primavera Gateway 16.1
What's New in Primavera Gateway 16.1
 
Anypoint monitoring capabilities
Anypoint monitoring capabilitiesAnypoint monitoring capabilities
Anypoint monitoring capabilities
 
Salesforce Consulting Services
Salesforce Consulting ServicesSalesforce Consulting Services
Salesforce Consulting Services
 
Primavera Gateway overview - Oracle Primavera P6 Collaborate 14
Primavera Gateway overview - Oracle Primavera P6 Collaborate 14Primavera Gateway overview - Oracle Primavera P6 Collaborate 14
Primavera Gateway overview - Oracle Primavera P6 Collaborate 14
 

Similar a Simplifying Salesforce REST in Java Using Annotations

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.comSteven Herod
 
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsOur API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsDreamforce
 
High Scale Relational Storage at Salesforce Built with Apache HBase and Apach...
High Scale Relational Storage at Salesforce Built with Apache HBase and Apach...High Scale Relational Storage at Salesforce Built with Apache HBase and Apach...
High Scale Relational Storage at Salesforce Built with Apache HBase and Apach...Salesforce Engineering
 
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
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Peter Chittum
 
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
 
Enterprise API New Features and Roadmap
Enterprise API New Features and RoadmapEnterprise API New Features and Roadmap
Enterprise API New Features and RoadmapSalesforce Developers
 
REST - What's It All About? (SAP TechEd 2012, CD110)
REST - What's It All About? (SAP TechEd 2012, CD110)REST - What's It All About? (SAP TechEd 2012, CD110)
REST - What's It All About? (SAP TechEd 2012, CD110)Sascha Wenninger
 
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
 
Getting Started With Apex REST Services
Getting Started With Apex REST ServicesGetting Started With Apex REST Services
Getting Started With Apex REST ServicesSalesforce Developers
 
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...Salesforce Developers
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352sflynn073
 
Building a Java Play! App on Heroku using Database.com
Building a Java Play! App on Heroku using Database.comBuilding a Java Play! App on Heroku using Database.com
Building a Java Play! App on Heroku using Database.comSalesforce Developers
 
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
 
Staying Ahead of the Curve with Lightning - Snowforce16 Keynote
Staying Ahead of the Curve with Lightning - Snowforce16 KeynoteStaying Ahead of the Curve with Lightning - Snowforce16 Keynote
Staying Ahead of the Curve with Lightning - Snowforce16 KeynoteSalesforce Admins
 
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)VMware Tanzu
 

Similar a Simplifying Salesforce REST in Java Using Annotations (20)

Spring '16 Release Preview Webinar
Spring '16 Release Preview Webinar Spring '16 Release Preview Webinar
Spring '16 Release Preview Webinar
 
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
 
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsOur API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
 
High Scale Relational Storage at Salesforce Built with Apache HBase and Apach...
High Scale Relational Storage at Salesforce Built with Apache HBase and Apach...High Scale Relational Storage at Salesforce Built with Apache HBase and Apach...
High Scale Relational Storage at Salesforce Built with Apache HBase and Apach...
 
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
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016
 
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
 
Enterprise API New Features and Roadmap
Enterprise API New Features and RoadmapEnterprise API New Features and Roadmap
Enterprise API New Features and Roadmap
 
REST - What's It All About? (SAP TechEd 2012, CD110)
REST - What's It All About? (SAP TechEd 2012, CD110)REST - What's It All About? (SAP TechEd 2012, CD110)
REST - What's It All About? (SAP TechEd 2012, CD110)
 
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
 
Getting Started With Apex REST Services
Getting Started With Apex REST ServicesGetting Started With Apex REST Services
Getting Started With Apex REST Services
 
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
Hands-On Workshop: Introduction to Coding for on Force.com for Admins and Non...
 
Sap Business Objects solutioning Framework architecture
Sap Business Objects solutioning Framework architectureSap Business Objects solutioning Framework architecture
Sap Business Objects solutioning Framework architecture
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352
 
SAP Business Objects Trianing
SAP Business Objects TrianingSAP Business Objects Trianing
SAP Business Objects Trianing
 
Building a Java Play! App on Heroku using Database.com
Building a Java Play! App on Heroku using Database.comBuilding a Java Play! App on Heroku using Database.com
Building a Java Play! App on Heroku using Database.com
 
pravin_1yr_exp
pravin_1yr_exppravin_1yr_exp
pravin_1yr_exp
 
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)
 
Staying Ahead of the Curve with Lightning - Snowforce16 Keynote
Staying Ahead of the Curve with Lightning - Snowforce16 KeynoteStaying Ahead of the Curve with Lightning - Snowforce16 Keynote
Staying Ahead of the Curve with Lightning - Snowforce16 Keynote
 
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
 

Más de Salesforce Developers

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSalesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceSalesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base ComponentsSalesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsSalesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaSalesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentSalesforce Developers
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsSalesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsSalesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsSalesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and TestingSalesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionSalesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPSalesforce Developers
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceSalesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureSalesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DXSalesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectSalesforce Developers
 

Más de Salesforce Developers (20)

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
[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
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[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
 
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
 
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...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Simplifying Salesforce REST in Java Using Annotations

  • 1. Simplifying Salesforce REST in Java Using Annotations The SPA library David Buccola, Salesforce, Principal Member of Technical Staff @davidbuccola
  • 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.
  • 4. Leveraging Salesforce from Java You might choose Java when… • Integrating an existing application written in java • Large body of existing code • Integrating a completely new application • Developer expertise and environment
  • 5. Network APIs for Java Multiple styles of network API • SOAP • REST You need a Java API to help put the bits on the wire
  • 6. Different Levels of Java API Low level APIs • Protocol-specific • JAX-RS for REST • JAX-WS for SOAP • Salesforce Web Services Connector (WSC) High level APIs • More abstract, protocol independent, layered on low-level APIs • Java Persistence Annotations (JPA)
  • 7. SPA is a High Level API So… • No religion about SOAP vs. REST • No focus on network protocols • Implementation based on REST but that’s not necessarily important
  • 8. Different Styles of Java API Access Loosely typed bag of properties • Property maps • Jackson JsonNode • Dynamic, flexible Strongly typed beans • Jackson bean bindings • Java Persistence Annotations (JPA) • Additional compiler and IDE assist to assure correctness
  • 9. SPA is a Strongly Typed API Not preaching loosely typed vs. strongly typed • Different problems call for different approaches If problem calls for strongly typed then… • SPA can help you out If problem calls for loosely typed then… • Check out “Rich SObjects” • https://github.com/ryanbrainard/richsobjects
  • 11. Beans with Annotations • Salesforce Persistence Annotations (SPA) • Annotated beans that correspond to Salesforce objects • In the style of Jackson or JPA
  • 13. Simple Example • Configure a RecordAccessorFactory • Jersey-based RecordAccessor factory • Configured to use username/password • In real life you’d use something better (OAuth) • Create a RecordAccessor • Stateless, thread-safe, reusable • Get your record
  • 14. Like Jackson but Different Built on top of Jackson • Leverages Jackson annotation processing, serialization and deserialization But… • More semantic knowledge about Salesforce objects and relationships than raw Jackson • Allows SPA to make your life easier, and more powerful
  • 15. Like JPA but different Some JPA-like capabilities • Building complex queries for you automatically • Pulling in trees of related objects in one shot But… • Not JPA, MUCH lighter weight • Operates on simple passive beans • No complex runtime bean modification or instrumentation • Stateless
  • 17. Subtleties of Salesforce REST • Jackson Annotations can be used with Salesforce REST, but… • There are various subtleties that require extra effort • SPA Bridges the gap between raw Jackson and Salesforce REST
  • 18. Help with Object Trees • Reading multiple objects at once improves performance • Supported by Salesforce REST but takes extra work • SPA does the work for you Account owned by User has Note created by User
  • 19. Builds the Tree Query • Leverages the Annotations • Helps with relationship complexities • Maintenance simplified when leaf objects change
  • 20. Deserializes the Tree • Deserialization is not automatic with vanilla Jackson • Examples that take extra effort: • Parent-to-child relationships • Polymorphic relationships
  • 21. Polymorphic Relationships Generates required SOQL syntax Handles type information
  • 22. Help with Read-Only Fields • Some Salesforce fields can’t be updated • CreatedBy, CreatedDate, etc… • A hassle for certain programming patterns (read-modify-write) • SPA leverages Jackson views to filter read-only fields on update • Automatic for many common fields • Configurable through annotations Read-Modify-Write Annotated Read-Only Field
  • 24. @SalesforceObject • Identifies beans that correspond to a Salesforce Object • Multiple beans can correspond to the same Salesforce Object • Allows you to define different “views” into the data
  • 25. @SalesforceField • Identifies bean members that correspond to a Salesforce field • Only need annotated members for the fields you care about • Can describe special behaviors: • ‘insertable’ – whether or not to serialize the value for ‘create’ • ‘updatable’ - whether or not to serialize the value for ‘update’ or ‘patch’
  • 26. @Polymorphic • Identifies a relationship field as polymorphic • Augments the @SalesforceField annotation • Identifies valid choices for the related object type • Only need to identify the choices you care about
  • 28. Record Accessor Recap • CRUD+ • Create, get, update, patch, delete, query, and more • Similarities to JPA but… • More like Jackson internally • • • Operates on passive beans No fancy runtime instrumentation or per-object state Stateless, thread-safe, lightweight
  • 29. Input Beans are not Modified • If you’ve used JPA in the past… • JPA updates your bean state after write to do things like: • Clear modification state • Set a new ID field after create • SPA will not • SPA leaves your input bean alone
  • 30. Patch vs. Update • SPA doesn’t maintain state about modified fields in a bean • You need to tell SPA how much you want to change • Patch – Change only selected things. “null” in bean field means don’t change. • Update – Change everything. “null” in bean field means set to null in persistence Update Patch
  • 31. Operation Lists • SPA can execute lists of operations • Powerful model that enables advanced capabilities • Access to statistics • • Rows processed • • Bytes sent and received Elapsed time Will soon execute as a batch • • Leverages Connect batch resource • • Reduces round trip latency In pilot Asynchronous execution planned
  • 33. Authorization Connectors • Many ways to do authorization • HTTP headers • OAuth • Username/Password • Etc… • SPA delegates the choice • Standard authorization connectors • Custom authorization connectors
  • 34. Record Accessor Config • Authorization Connector selection • Configurable behaviors • API Version • Etc…
  • 35. Simple Spring Configuration • Designed for Spring configuration • Autowired or manually wired • Supports component scanning Component scan Get injected with a little Get injected with a lot
  • 36. Complex Spring Configuration • Configure standard components by referencing their id (spa.xxx) • Inject entirely new components
  • 37. David Buccola Principal Member of Technical Staff, @davidbuccola