SlideShare a Scribd company logo
1 of 30
Developing Offline Mobile Apps
Salesforce Mobile SDK SmartStore and SmartSync
Tom Gersic, Salesforce.com
Director, Mobile Services Delivery
@tomgersic
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.
Tom Gersic
Director, Mobile Services Delivery
@tomgersic
Agenda
What we are going to build today
Salesforce Mobile SDK Overview
SmartStore Terminology
SmartSync Terminology
Walking through some code
“I need this data, but my connection is awful!!!”
Why offline?
Data based decisions
In the field, and by management
What we’ll build today

https://github.com/tomgersic/Opportune
Salesforce.com Mobile SDK

Customer Data
Three Options: Which One Is Right For You?
Advanced UI interactions
Fastest performance
App store distribution

Web developer skills
Access to native platform
App store distribution

Web developer skills
Instant updates
Unrestricted distribution
I swear this makes sense!
I swear this makes sense!
SmartSync
Terminology
Stores
Soups
• Hold Indexed JSON Documents
• JSON Responses can encompass data from multiple tables

Id

Soup

Created

lastModified

Index 1

Index 2

Index N…

1

{JSON}

1371069899796

1371070436125

a00E0000009Xj2mIAC

Salesforce.com

…

2

{JSON}

1371069899802

1371070436126

a00E0000009Xj36IAC

Facebook

…

3

{JSON}

1371069899803

1371129103154

a00E0000004h2MnIAI

Google

…
REST API Returns a JSON Response
/services/data/v28.0/query/?q=SELECT Id, Name FROM Opportunity
Some things you can do with your soup…
• Register a Soup with an IndexSpec
• Query a Soup using a QuerySpec
• Upsert Data to a Soup
• Delete Data from a Soup
• Remove a Soup
IndexSpec
• JSON Object
• Fields to index
• “string” or “integer”
[
{"path":"Id","type":"string"},
{"path":"Name","type":"string"}
]
QuerySpec
buildAllQuerySpec(path,order,pageSize)
Query all records from the object in the given sort order (or null order)
buildExactQuerySpec(path,matchKey,pageSize)
Search for records with index path values matching the key.
buildRangeQuerySpec(path,beginKey,endKey,pageSize)
Return all records with an index path value between the two range values
buildLikeQuerySpec(path,likeKey,order,pageSize)
Basically “select * from [table] LIKE ‘%[likeKey]%’”
buildSmartQuerySpec(smartSql,pageSize)
Basically “select * from [table] LIKE ‘%[likeKey]%’”
SmartSQL
SELECT {departments:name}, {employees:lastName}
FROM {employees}, {departments}
WHERE {departments:deptCode} = {employees:deptCode}
ORDER by {departments:name}, {employees:lastName}
SmartSync
• Extends Backbone.js
• Can be used with or without a SmartStore Cache
• Queries returned as Backbone Model Collections
Backbone
• MV* Framework
• Models: Individual records
• Collections: Collections of Model records

• View: Javascript backing for the stuff that you see
• Router: routes everything after the # in a URL to application functions
• http://myapp.com/#/user/list
Force.SObject
• sobjectType: Account, Opportunity, etc.
• fieldlist: ["Id", "Name", "Amount", "StageName"]
• cacheMode: client, server write order
• mergeMode: how to handle conflicts
• cache: if using SmartStore
• cacheForOriginals: backup data for conflict detection
Force.SObjectCollection
• config: determines queries used to access data
• cache: if using SmartStore
• cacheForOriginals: backup data for conflict detection
Force.StoreCache
• soupName: Name of the SmartStore Soup
• additionalIndexSpecs: IndexSpecs to use, in addition to defaults
• keyField: Name of the field containing the record Id

• __locally_created__
• __locally_updated__
• __locally_deleted__
• __local__ (set to true if any of the previous three are true)
Patterns for Offline Success
Offline Queueing
Tom Gersic
Director, Mobile Services Delivery
@tomgersic
@tomgersic

More Related Content

What's hot

Reinvent your App Dev Lifecycle with Continuous Delivery on Heroku
Reinvent your App Dev Lifecycle with Continuous Delivery on HerokuReinvent your App Dev Lifecycle with Continuous Delivery on Heroku
Reinvent your App Dev Lifecycle with Continuous Delivery on HerokuSalesforce Developers
 
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
 
Build, Manage, and Deploy Mobile Apps Faster with App Cloud Mobile
Build, Manage, and Deploy Mobile Apps Faster with App Cloud MobileBuild, Manage, and Deploy Mobile Apps Faster with App Cloud Mobile
Build, Manage, and Deploy Mobile Apps Faster with App Cloud MobileSalesforce Developers
 
Tour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration MethodsTour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration MethodsSalesforce Developers
 
Understanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesUnderstanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesSalesforce Developers
 
Migrating Visualforce Pages to Lightning
Migrating Visualforce Pages to LightningMigrating Visualforce Pages to Lightning
Migrating Visualforce Pages to LightningSalesforce Developers
 
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
 
Web Apps for Salesforce with Heroku Connect
Web Apps for Salesforce with Heroku ConnectWeb Apps for Salesforce with Heroku Connect
Web Apps for Salesforce with Heroku ConnectTom Gersic
 
Building a RESTful API on Heroku for Your Force.com App
Building a RESTful API on Heroku for Your Force.com AppBuilding a RESTful API on Heroku for Your Force.com App
Building a RESTful API on Heroku for Your Force.com AppSalesforce Developers
 
Salesforce Mobile architecture introduction
Salesforce Mobile architecture introductionSalesforce Mobile architecture introduction
Salesforce Mobile architecture introductionDavid Scruggs
 
Let's Learn About Heroku and How to Integrate with Salesforce
Let's Learn About Heroku and How to Integrate with SalesforceLet's Learn About Heroku and How to Integrate with Salesforce
Let's Learn About Heroku and How to Integrate with SalesforceSudipta Deb ☁
 
Modeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceModeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceSalesforce Developers
 
Developer Tour on the Salesforce1 Platform
Developer Tour on the Salesforce1 PlatformDeveloper Tour on the Salesforce1 Platform
Developer Tour on the Salesforce1 PlatformSalesforce Deutschland
 
Build Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForceBuild Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForcevraopolisetti
 
Developers guide to the Salesforce1 Platform
Developers guide to the Salesforce1 PlatformDevelopers guide to the Salesforce1 Platform
Developers guide to the Salesforce1 PlatformJohn Stevenson
 
Two-Way Integration with Writable External Objects
Two-Way Integration with Writable External ObjectsTwo-Way Integration with Writable External Objects
Two-Way Integration with Writable External ObjectsSalesforce Developers
 
The SEAN stack - Build Web Apps With Salesforce, Express, Angular and Node.js
The SEAN stack - Build Web Apps With Salesforce, Express, Angular and Node.jsThe SEAN stack - Build Web Apps With Salesforce, Express, Angular and Node.js
The SEAN stack - Build Web Apps With Salesforce, Express, Angular and Node.jsShashank Srivatsavaya (ShashForce)
 
Unite Customer-Facing Apps with a Salesforce Backend: Heroku Connect in Practice
Unite Customer-Facing Apps with a Salesforce Backend: Heroku Connect in PracticeUnite Customer-Facing Apps with a Salesforce Backend: Heroku Connect in Practice
Unite Customer-Facing Apps with a Salesforce Backend: Heroku Connect in PracticeSalesforce Developers
 

What's hot (20)

Reinvent your App Dev Lifecycle with Continuous Delivery on Heroku
Reinvent your App Dev Lifecycle with Continuous Delivery on HerokuReinvent your App Dev Lifecycle with Continuous Delivery on Heroku
Reinvent your App Dev Lifecycle with Continuous Delivery on Heroku
 
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
 
Build, Manage, and Deploy Mobile Apps Faster with App Cloud Mobile
Build, Manage, and Deploy Mobile Apps Faster with App Cloud MobileBuild, Manage, and Deploy Mobile Apps Faster with App Cloud Mobile
Build, Manage, and Deploy Mobile Apps Faster with App Cloud Mobile
 
Tour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration MethodsTour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration Methods
 
Understanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesUnderstanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile Architectures
 
Migrating Visualforce Pages to Lightning
Migrating Visualforce Pages to LightningMigrating Visualforce Pages to Lightning
Migrating Visualforce Pages to Lightning
 
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
 
Web Apps for Salesforce with Heroku Connect
Web Apps for Salesforce with Heroku ConnectWeb Apps for Salesforce with Heroku Connect
Web Apps for Salesforce with Heroku Connect
 
Building a RESTful API on Heroku for Your Force.com App
Building a RESTful API on Heroku for Your Force.com AppBuilding a RESTful API on Heroku for Your Force.com App
Building a RESTful API on Heroku for Your Force.com App
 
Salesforce Mobile architecture introduction
Salesforce Mobile architecture introductionSalesforce Mobile architecture introduction
Salesforce Mobile architecture introduction
 
Let's Learn About Heroku and How to Integrate with Salesforce
Let's Learn About Heroku and How to Integrate with SalesforceLet's Learn About Heroku and How to Integrate with Salesforce
Let's Learn About Heroku and How to Integrate with Salesforce
 
Modeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceModeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in Salesforce
 
Developer Tour on the Salesforce1 Platform
Developer Tour on the Salesforce1 PlatformDeveloper Tour on the Salesforce1 Platform
Developer Tour on the Salesforce1 Platform
 
Build Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForceBuild Amazing Website without coding using Salesforce SiteForce
Build Amazing Website without coding using Salesforce SiteForce
 
Forcelandia 2015
Forcelandia 2015Forcelandia 2015
Forcelandia 2015
 
Developers guide to the Salesforce1 Platform
Developers guide to the Salesforce1 PlatformDevelopers guide to the Salesforce1 Platform
Developers guide to the Salesforce1 Platform
 
Two-Way Integration with Writable External Objects
Two-Way Integration with Writable External ObjectsTwo-Way Integration with Writable External Objects
Two-Way Integration with Writable External Objects
 
The SEAN stack - Build Web Apps With Salesforce, Express, Angular and Node.js
The SEAN stack - Build Web Apps With Salesforce, Express, Angular and Node.jsThe SEAN stack - Build Web Apps With Salesforce, Express, Angular and Node.js
The SEAN stack - Build Web Apps With Salesforce, Express, Angular and Node.js
 
Unite Customer-Facing Apps with a Salesforce Backend: Heroku Connect in Practice
Unite Customer-Facing Apps with a Salesforce Backend: Heroku Connect in PracticeUnite Customer-Facing Apps with a Salesforce Backend: Heroku Connect in Practice
Unite Customer-Facing Apps with a Salesforce Backend: Heroku Connect in Practice
 

Similar to Develop Offline Mobile Apps with Salesforce Mobile SDK

Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps With Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStoreSalesforce Developers
 
How We Built AppExchange and our Communities on the App Cloud (Platform)
How We Built AppExchange and our Communities on the App Cloud (Platform)How We Built AppExchange and our Communities on the App Cloud (Platform)
How We Built AppExchange and our Communities on the App Cloud (Platform)Dreamforce
 
Quickly Create Data Sets for the Analytics Cloud
Quickly Create Data Sets for the Analytics CloudQuickly Create Data Sets for the Analytics Cloud
Quickly Create Data Sets for the Analytics CloudSalesforce Developers
 
Hca advanced developer workshop
Hca advanced developer workshopHca advanced developer workshop
Hca advanced developer workshopDavid Scruggs
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsRitesh Aswaney
 
Introduction to Developing Android Apps With the Salesforce Mobile SDK
Introduction to Developing Android Apps With the Salesforce Mobile SDKIntroduction to Developing Android Apps With the Salesforce Mobile SDK
Introduction to Developing Android Apps With the Salesforce Mobile SDKSalesforce Developers
 
Understanding Multitenancy and the Architecture of the Salesforce Platform
Understanding Multitenancy and the Architecture of the Salesforce PlatformUnderstanding Multitenancy and the Architecture of the Salesforce Platform
Understanding Multitenancy and the Architecture of the Salesforce PlatformSalesforce Developers
 
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...Spark Summit
 
Building Efficient Visualforce Pages
Building Efficient Visualforce PagesBuilding Efficient Visualforce Pages
Building Efficient Visualforce PagesSalesforce Developers
 
Force.com Friday: Intro to Force.com
Force.com Friday: Intro to Force.comForce.com Friday: Intro to Force.com
Force.com Friday: Intro to Force.comSalesforce Developers
 
Building Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your EmployeesBuilding Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your EmployeesSalesforce Developers
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersSalesforce Developers
 
Building Apps for the ExactTarget Marketing Cloud
Building Apps for the ExactTarget Marketing CloudBuilding Apps for the ExactTarget Marketing Cloud
Building Apps for the ExactTarget Marketing CloudSalesforce Developers
 
Seattle Dev Garage
Seattle Dev GarageSeattle Dev Garage
Seattle Dev GarageJoshua Birk
 
Data.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in SalesforceData.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in SalesforceSalesforce Developers
 
Building Efficient Visualforce Pages
Building Efficient Visualforce PagesBuilding Efficient Visualforce Pages
Building Efficient Visualforce PagesSFDCSregan
 
Turbo-charge Your Skuid Page with Apex
Turbo-charge Your Skuid Page with ApexTurbo-charge Your Skuid Page with Apex
Turbo-charge Your Skuid Page with ApexSalesforce Developers
 

Similar to Develop Offline Mobile Apps with Salesforce Mobile SDK (20)

Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps With Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps With Salesforce Mobile SDK SmartStore
 
How We Built AppExchange and our Communities on the App Cloud (Platform)
How We Built AppExchange and our Communities on the App Cloud (Platform)How We Built AppExchange and our Communities on the App Cloud (Platform)
How We Built AppExchange and our Communities on the App Cloud (Platform)
 
Quickly Create Data Sets for the Analytics Cloud
Quickly Create Data Sets for the Analytics CloudQuickly Create Data Sets for the Analytics Cloud
Quickly Create Data Sets for the Analytics Cloud
 
Hca advanced developer workshop
Hca advanced developer workshopHca advanced developer workshop
Hca advanced developer workshop
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction Objects
 
Introduction to Developing Android Apps With the Salesforce Mobile SDK
Introduction to Developing Android Apps With the Salesforce Mobile SDKIntroduction to Developing Android Apps With the Salesforce Mobile SDK
Introduction to Developing Android Apps With the Salesforce Mobile SDK
 
Introduction to Data.com APIs
Introduction to Data.com APIsIntroduction to Data.com APIs
Introduction to Data.com APIs
 
Understanding Multitenancy and the Architecture of the Salesforce Platform
Understanding Multitenancy and the Architecture of the Salesforce PlatformUnderstanding Multitenancy and the Architecture of the Salesforce Platform
Understanding Multitenancy and the Architecture of the Salesforce Platform
 
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
 
Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex
 
Building Efficient Visualforce Pages
Building Efficient Visualforce PagesBuilding Efficient Visualforce Pages
Building Efficient Visualforce Pages
 
Using the Google SOAP API
Using the Google SOAP APIUsing the Google SOAP API
Using the Google SOAP API
 
Force.com Friday: Intro to Force.com
Force.com Friday: Intro to Force.comForce.com Friday: Intro to Force.com
Force.com Friday: Intro to Force.com
 
Building Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your EmployeesBuilding Mobile Apps That Deliver Salesforce to Your Employees
Building Mobile Apps That Deliver Salesforce to Your Employees
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events Handlers
 
Building Apps for the ExactTarget Marketing Cloud
Building Apps for the ExactTarget Marketing CloudBuilding Apps for the ExactTarget Marketing Cloud
Building Apps for the ExactTarget Marketing Cloud
 
Seattle Dev Garage
Seattle Dev GarageSeattle Dev Garage
Seattle Dev Garage
 
Data.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in SalesforceData.com APIs in Action ? Bringing Data to Life in Salesforce
Data.com APIs in Action ? Bringing Data to Life in Salesforce
 
Building Efficient Visualforce Pages
Building Efficient Visualforce PagesBuilding Efficient Visualforce Pages
Building Efficient Visualforce Pages
 
Turbo-charge Your Skuid Page with Apex
Turbo-charge Your Skuid Page with ApexTurbo-charge Your Skuid Page with Apex
Turbo-charge Your Skuid Page with Apex
 

Recently uploaded

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
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
 
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
 

Recently uploaded (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
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
 
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...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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?
 
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
 
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
 

Develop Offline Mobile Apps with Salesforce Mobile SDK

  • 1. Developing Offline Mobile Apps Salesforce Mobile SDK SmartStore and SmartSync Tom Gersic, Salesforce.com Director, Mobile Services Delivery @tomgersic
  • 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. Tom Gersic Director, Mobile Services Delivery @tomgersic
  • 4. Agenda What we are going to build today Salesforce Mobile SDK Overview SmartStore Terminology SmartSync Terminology Walking through some code
  • 5. “I need this data, but my connection is awful!!!”
  • 7. Data based decisions In the field, and by management
  • 8. What we’ll build today https://github.com/tomgersic/Opportune
  • 10. Three Options: Which One Is Right For You? Advanced UI interactions Fastest performance App store distribution Web developer skills Access to native platform App store distribution Web developer skills Instant updates Unrestricted distribution
  • 11. I swear this makes sense!
  • 12. I swear this makes sense!
  • 16. Soups • Hold Indexed JSON Documents • JSON Responses can encompass data from multiple tables Id Soup Created lastModified Index 1 Index 2 Index N… 1 {JSON} 1371069899796 1371070436125 a00E0000009Xj2mIAC Salesforce.com … 2 {JSON} 1371069899802 1371070436126 a00E0000009Xj36IAC Facebook … 3 {JSON} 1371069899803 1371129103154 a00E0000004h2MnIAI Google …
  • 17. REST API Returns a JSON Response /services/data/v28.0/query/?q=SELECT Id, Name FROM Opportunity
  • 18. Some things you can do with your soup… • Register a Soup with an IndexSpec • Query a Soup using a QuerySpec • Upsert Data to a Soup • Delete Data from a Soup • Remove a Soup
  • 19. IndexSpec • JSON Object • Fields to index • “string” or “integer” [ {"path":"Id","type":"string"}, {"path":"Name","type":"string"} ]
  • 20. QuerySpec buildAllQuerySpec(path,order,pageSize) Query all records from the object in the given sort order (or null order) buildExactQuerySpec(path,matchKey,pageSize) Search for records with index path values matching the key. buildRangeQuerySpec(path,beginKey,endKey,pageSize) Return all records with an index path value between the two range values buildLikeQuerySpec(path,likeKey,order,pageSize) Basically “select * from [table] LIKE ‘%[likeKey]%’” buildSmartQuerySpec(smartSql,pageSize) Basically “select * from [table] LIKE ‘%[likeKey]%’”
  • 21. SmartSQL SELECT {departments:name}, {employees:lastName} FROM {employees}, {departments} WHERE {departments:deptCode} = {employees:deptCode} ORDER by {departments:name}, {employees:lastName}
  • 22. SmartSync • Extends Backbone.js • Can be used with or without a SmartStore Cache • Queries returned as Backbone Model Collections
  • 23. Backbone • MV* Framework • Models: Individual records • Collections: Collections of Model records • View: Javascript backing for the stuff that you see • Router: routes everything after the # in a URL to application functions • http://myapp.com/#/user/list
  • 24. Force.SObject • sobjectType: Account, Opportunity, etc. • fieldlist: ["Id", "Name", "Amount", "StageName"] • cacheMode: client, server write order • mergeMode: how to handle conflicts • cache: if using SmartStore • cacheForOriginals: backup data for conflict detection
  • 25. Force.SObjectCollection • config: determines queries used to access data • cache: if using SmartStore • cacheForOriginals: backup data for conflict detection
  • 26. Force.StoreCache • soupName: Name of the SmartStore Soup • additionalIndexSpecs: IndexSpecs to use, in addition to defaults • keyField: Name of the field containing the record Id • __locally_created__ • __locally_updated__ • __locally_deleted__ • __local__ (set to true if any of the previous three are true)
  • 29. Tom Gersic Director, Mobile Services Delivery @tomgersic

Editor's Notes

  1. Setup: Xcode Open, build project Login to org, open Oppty Open Workbench Open Git Repo
  2. We’re more connected then ever, why bother with offline access? Wifi or Cell coverage might be nearly everywhere, but it’s not everywhere, and it’s coverage is often spotty even when you do have it Sales Reps, Service Reps need access to their information in the field… Photos Credits: Farm: http://www.flickr.com/photos/sbeebe/3710702365/ Heavy Machinery: http://www.flickr.com/photos/leecontracting/3424306640/ MRI: http://www.flickr.com/photos/calliope/221238656/ Elevator: http://www.flickr.com/photos/stovak/1413735618/
  3. Not just access to information, but also capturing data – don’t create a call log later, “check in” with the person you’re visiting, track what you did while you were there online or off. Demonstrate ROI by showing usage vs. performance, etc.
  4. Offline opportunities. Hybrid offline app, based on AccountEditor sample from SDK We’ll use it to illustrate SmartStore and SmartSync concepts
  5. This diagram lays out the different strengths and limitations of each of the three custom mobile app development options. Depending your requirements, the diagram provides a simple framework by which to evaluate the approach that’s best for you. ----------------------------------------------- KEY QUESTIONS: • Will you be standardizing on one device platform? Is offline access critical? Do you have plenty of time to build an app? If so, the Native app approach could work best. • Do you want to build an app in the fastest way possible? Do you prefer to the ‘write once – deploy anywhere’ approach? Then go with an HTML5 option. • Is Flexibility a high priority? Do you want added marketing visibility for your app through an app store and leverage native platform features? Then a Hybrid provides the best of both worlds
  6. SQLite, SQCipher, Smartstore http://agrippa.english.ucsb.edu/images/paratexts/machinecode/machinecode.jpg
  7. SQLite, SQCipher, Smartstore http://agrippa.english.ucsb.edu/images/paratexts/machinecode/machinecode.jpg
  8. Stores are sqlite files – you probably only need one.
  9. Soups hold JSON Docs
  10. Both API and SmartStore return JSON Docs
  11. BookedButton.js
  12. CODE!!!