SlideShare una empresa de Scribd logo
1 de 30
Developing Offline Mobile Apps 
Tom Gersic 
Mobile Practice Director 
@tomgersic 
Follow along here! 
https://github.com/tomgersic/dialer
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 
Mobile Practice Director 
@tomgersic
What are we doing here? 
• What we are going to build today 
• Talk a little about offline 
• Salesforce Mobile SDK Overview 
• SmartStore Terminology 
• SmartSync Terminology 
• Walking through some code
“I need this data, but my connection is awful!!!”
Why offline? Go where your customers are.
Field Usage Analytics
What we’ll build today 
https://github.com/tomgersic/dialer
Google Polymer 
https://github.com/tomgersic/polymer-helloworld
Google Material Design Language
Polymer Hello World 
•https://github.com/tomgersic/polymer-helloworld 
•bower init 
•bower install --save Polymer/polymer 
•bower install --save Polymer/core-elements 
•bower install --save Polymer/paper-elements 
•python -m SimpleHTTPServer 
•http://localhost:8000/
Salesforce.com Mobile SDK Customer Data
Three Options: Which One Is Right For You? 
Web developer skills 
Access to native platform 
App store distribution 
Advanced UI interactions 
Fastest performance 
App store distribution 
Web developer skills 
Instant updates 
Unrestricted distribution
It’s all about soup
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/v29.0/query/?q=SELECT Id, Name FROM Contact
Soups and Stores
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
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
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore

Más contenido relacionado

La actualidad más candente

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
 
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
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforceMark Adcock
 
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
 
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
 
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com WebinarSalesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com WebinarSalesforce Developers
 
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
 
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
 
Introduction to Building E-Commerce Solutions on Heroku and Salesforce
Introduction to Building E-Commerce Solutions on Heroku and SalesforceIntroduction to Building E-Commerce Solutions on Heroku and Salesforce
Introduction to Building E-Commerce Solutions on Heroku and SalesforceSalesforce Developers
 
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
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsSalesforce Developers
 
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 ☁
 
Intro to the Salesforce Mobile SDK: Building Android Apps
Intro to the Salesforce Mobile SDK: Building Android AppsIntro to the Salesforce Mobile SDK: Building Android Apps
Intro to the Salesforce Mobile SDK: Building Android AppsSalesforce Developers
 
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps WebinarIntro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps WebinarSalesforce Developers
 
Custom Metadata Data Types
Custom Metadata Data TypesCustom Metadata Data Types
Custom Metadata Data TypesSamuel Moyson
 
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
 
Introduction to the Wave Platform API
Introduction to the Wave Platform APIIntroduction to the Wave Platform API
Introduction to the Wave Platform APISalesforce 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
 
Advanced Apex Development - Asynchronous Processes
Advanced Apex Development - Asynchronous ProcessesAdvanced Apex Development - Asynchronous Processes
Advanced Apex Development - Asynchronous ProcessesSalesforce Developers
 

La actualidad más candente (20)

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
 
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
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
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
 
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
 
Salesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com WebinarSalesforce API Series: Integrating Applications with Force.com Webinar
Salesforce API Series: Integrating Applications with Force.com Webinar
 
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
 
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
 
Introduction to Building E-Commerce Solutions on Heroku and Salesforce
Introduction to Building E-Commerce Solutions on Heroku and SalesforceIntroduction to Building E-Commerce Solutions on Heroku and Salesforce
Introduction to Building E-Commerce Solutions on Heroku and Salesforce
 
Take your app offline via SMS
Take your app offline via SMSTake your app offline via SMS
Take your app offline via SMS
 
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
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform Events
 
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
 
Intro to the Salesforce Mobile SDK: Building Android Apps
Intro to the Salesforce Mobile SDK: Building Android AppsIntro to the Salesforce Mobile SDK: Building Android Apps
Intro to the Salesforce Mobile SDK: Building Android Apps
 
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps WebinarIntro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
 
Custom Metadata Data Types
Custom Metadata Data TypesCustom Metadata Data Types
Custom Metadata Data Types
 
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
 
Introduction to the Wave Platform API
Introduction to the Wave Platform APIIntroduction to the Wave Platform API
Introduction to the Wave Platform API
 
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
 
Advanced Apex Development - Asynchronous Processes
Advanced Apex Development - Asynchronous ProcessesAdvanced Apex Development - Asynchronous Processes
Advanced Apex Development - Asynchronous Processes
 

Similar a 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)Dreamforce
 
[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter Chittum[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter ChittumBeMyApp
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Mark Adcock
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Salesforce Developers
 
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
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsRitesh Aswaney
 
Hca advanced developer workshop
Hca advanced developer workshopHca advanced developer workshop
Hca advanced developer workshopDavid Scruggs
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comSalesforce Developers
 
Lightning Web Components - A new era, René Winkelmeyer
Lightning Web Components - A new era, René WinkelmeyerLightning Web Components - A new era, René Winkelmeyer
Lightning Web Components - A new era, René WinkelmeyerCzechDreamin
 
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
 
Spring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview WebinarSpring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview WebinarSalesforce Developers
 
Salesforce Campus Tour - Developer Advanced
Salesforce Campus Tour - Developer AdvancedSalesforce Campus Tour - Developer Advanced
Salesforce Campus Tour - Developer AdvancedJames Ward
 
Dreamforce 14 : Responsive Design with Visualforce and Twitter Bootstrap
Dreamforce 14 : Responsive Design with Visualforce and Twitter BootstrapDreamforce 14 : Responsive Design with Visualforce and Twitter Bootstrap
Dreamforce 14 : Responsive Design with Visualforce and Twitter BootstrapKeir Bowden
 
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDK
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDKLook Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDK
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDKSalesforce Developers
 
AngularJS App In Two Weeks
AngularJS App In Two WeeksAngularJS App In Two Weeks
AngularJS App In Two WeeksPeter Chittum
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce IntegrationJoshua Hoskins
 
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...JAX London
 

Similar a Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore (20)

Salesforce platform session 2
 Salesforce platform session 2 Salesforce platform session 2
Salesforce platform session 2
 
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)
 
[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter Chittum[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter Chittum
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
 
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
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction Objects
 
Hca advanced developer workshop
Hca advanced developer workshopHca advanced developer workshop
Hca advanced developer workshop
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.com
 
Lightning Web Components - A new era, René Winkelmeyer
Lightning Web Components - A new era, René WinkelmeyerLightning Web Components - A new era, René Winkelmeyer
Lightning Web Components - A new era, René Winkelmeyer
 
Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex
 
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
 
Spring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview WebinarSpring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview Webinar
 
Salesforce Campus Tour - Developer Advanced
Salesforce Campus Tour - Developer AdvancedSalesforce Campus Tour - Developer Advanced
Salesforce Campus Tour - Developer Advanced
 
Dreamforce 14 : Responsive Design with Visualforce and Twitter Bootstrap
Dreamforce 14 : Responsive Design with Visualforce and Twitter BootstrapDreamforce 14 : Responsive Design with Visualforce and Twitter Bootstrap
Dreamforce 14 : Responsive Design with Visualforce and Twitter Bootstrap
 
Tdxgg18 summary presentation
Tdxgg18 summary presentationTdxgg18 summary presentation
Tdxgg18 summary presentation
 
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDK
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDKLook Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDK
Look Ma, No Apex: Mobile Apps with RemoteObject and Mobile SDK
 
AngularJS App In Two Weeks
AngularJS App In Two WeeksAngularJS App In Two Weeks
AngularJS App In Two Weeks
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sande...
 

Último

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 

Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore

  • 1. Developing Offline Mobile Apps Tom Gersic Mobile Practice Director @tomgersic Follow along here! https://github.com/tomgersic/dialer
  • 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 Mobile Practice Director @tomgersic
  • 4. What are we doing here? • What we are going to build today • Talk a little about offline • Salesforce Mobile SDK Overview • SmartStore Terminology • SmartSync Terminology • Walking through some code
  • 5. “I need this data, but my connection is awful!!!”
  • 6. Why offline? Go where your customers are.
  • 8. What we’ll build today https://github.com/tomgersic/dialer
  • 11. Polymer Hello World •https://github.com/tomgersic/polymer-helloworld •bower init •bower install --save Polymer/polymer •bower install --save Polymer/core-elements •bower install --save Polymer/paper-elements •python -m SimpleHTTPServer •http://localhost:8000/
  • 12. Salesforce.com Mobile SDK Customer Data
  • 13. Three Options: Which One Is Right For You? Web developer skills Access to native platform App store distribution Advanced UI interactions Fastest performance App store distribution Web developer skills Instant updates Unrestricted distribution
  • 15. 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 …
  • 16. REST API Returns a JSON Response /services/data/v29.0/query/?q=SELECT Id, Name FROM Contact
  • 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}
  • 23. SmartSync • Extends Backbone.js • Can be used with or without a SmartStore Cache • Queries returned as Backbone Model Collections
  • 24. 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
  • 25. 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
  • 26. Force.SObjectCollection • config: determines queries used to access data • cache: if using SmartStore • cacheForOriginals: backup data for conflict detection
  • 27. 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)

Notas del editor

  1. Success Services is in the Hilton
  2. Key Takeaway: We are a publicly traded company. Please make your buying decisions only on the products commercially available from Salesforce.com. Talk Track: Before I begin, just a quick note that when considering future developments, whether by us or with any other solution provider, you should always base your purchasing decisions on what is currently available.
  3. Better dev-oriented questions
  4. 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/
  5. Make better data driven decisions 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.
  6. Offline contacts. We’ll use it to illustrate SmartStore and SmartSync concepts
  7. Web Components
  8. https://github.com/tomgersic/polymer-helloworld /Users/tgersic/Development/DF14Demos/polymer_helloworld bower init bower install --save Polymer/polymer bower install --save Polymer/core-elements bower install --save Polymer/paper-elements python -m SimpleHTTPServer http://localhost:8000/
  9. forceios create
  10. 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
  11. SQLite, SQCipher, Smartstore http://agrippa.english.ucsb.edu/images/paratexts/machinecode/machinecode.jpg
  12. Soups hold JSON Docs
  13. Both API and SmartStore return JSON Docs
  14. BookedButton.js
  15. CODE!!!