SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
Developing Hybrid Apps with the
Salesforce Mobile SDK
Sandeep Bhanot, Salesforce.com, Senior Developer Evangelist
@cloudysan
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 intellectual property and other litigation, risks associated
 with 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-Q for the most recent fiscal quarter ended July 31, 2012. This
 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.
We’re Living in the Post-PC Era




                              >
    iPhone Revenue – Q1 ’12       TOTAL Microsoft Revenue – Q2 ’12
     $24.42 billion                        $20.89 billion
Three Options: Which One Is Right For You?


Advanced UI interactions                Web developer skills
Fastest performance                     Access to native platform
App store distribution                  App store distribution




                                       Web developer skills
                                       Instant updates
                                       Unrestricted distribution
Hybrid Mobile Apps – Best Of Both Worlds


                                           Native
   HTML5
Why Hybrid?




              Your App
Why Hybrid?

•   Write once, run anywhere

•   Reuse existing web development skills
    •   Visualforce, HTML5, JavaScript, CSS3 etc.

•   Access native device functionality

•   App Store distribution (unlike web apps)
Why not Hybrid?



• May not be as fast as native apps

• Limited support for multi-touch gestures

• Cannot do advanced graphics like WebGL
Salesforce Hybrid Mobile SDK


                          Container
                                                                           Containe
                  OAuth 2.0
                                                                           r
                  Authentication and secure token
                  management

           </>   Visualforce / REST API                          100% Open Source
           { }   Direct Salesforce REST APIs directly from       Developed on Github
                 JavaScript

                 Secure Offline Database
                 Store business data on a device with
                 enterprise-class security



                  Push Notifications
                  Dispatch real-time alerts directly to mobile
                  devices
Lets build a Hybrid Mobile App
Cloud Hunter : The Dreamforce Scavenger App
Cloud Hunter ERD
Recap : Creating a Hybrid Mobile App using Visualforce

  • Make your Visualforce mobile friendly
     •   docType="html-5.0"

     •   Standard HTML5/CSS/JavaScript markup

     •   JQuery Mobile + JS Remoting for data binding

  • Download and install Salesforce Mobile SDK (Android or iOS)

  • Create new Hybrid project using the SDK

  • Update project with OAuth creds and Visualforce page URL
PhoneGap – How It Works




                                                          …
                                          Custom WebView
     The JavaScript   Native ‘Bridge’ =   Call JS from native code
                                          Call native code from JS
Device Access Using PhoneGap




                 http://docs.phonegap.com
PhoneGap or Cordova?

• Cordova is an Apache Open Source project

• PhoneGap is a distribution of Cordova distributed by Adobe

• Currently, PhoneGap and Cordova are one and the same
What Libraries are Available?
                     Any JS/CSS library/framework of your choice

    DOM                      GUI                        Testing
•   XUI                  •    jQuery Mobile         •   QUnit

•   Zepto                •    Sencha Touch          •   Jasmine

•   jQuery               •    Dojo Mobile           •   DominatorJS

•   Dojo                 •    GloveBox              •   ThumbsJs

                         •    Ekiben


            © http://www.slideshare.net/davyjones/html5-is-the-future-of-mobile-phonegap-takes-you-there-today
Take a Picture
Geolocation
Signature Capture
PhoneGap plugins : Bar code scanning
Additional Resources
 Mobile SDK Home Page
     http://wiki.developerforce.com/MobileSDK
 Code shown during this session
     <<>>
 PhoneGap
     http://www.phonegap.com
 HTML5 resources
     http://diveintohtml5.info/
     http://www.html5rocks.com
     https://developers.facebook.com/html5/
Sandeep Bhanot
Senior Developer Evangelist,
        @cloudysan
Developing Hybrid Apps with the Salesforce Mobile SDK

Más contenido relacionado

Más de Salesforce 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
 
Modern App Dev: Modular Development Strategies
Modern App Dev: Modular Development StrategiesModern App Dev: Modular Development Strategies
Modern App Dev: Modular Development StrategiesSalesforce Developers
 
Manage Massive Datasets with Big Objects & Async SOQL
Manage Massive Datasets with  Big Objects & Async SOQLManage Massive Datasets with  Big Objects & Async SOQL
Manage Massive Datasets with Big Objects & Async SOQLSalesforce Developers
 

Más de Salesforce Developers (20)

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
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
 
Modern App Dev: Modular Development Strategies
Modern App Dev: Modular Development StrategiesModern App Dev: Modular Development Strategies
Modern App Dev: Modular Development Strategies
 
Dreamforce Developer Recap
Dreamforce Developer RecapDreamforce Developer Recap
Dreamforce Developer Recap
 
Vs Code for Salesforce Developers
Vs Code for Salesforce DevelopersVs Code for Salesforce Developers
Vs Code for Salesforce Developers
 
Vs Code for Salesforce Developers
Vs Code for Salesforce DevelopersVs Code for Salesforce Developers
Vs Code for Salesforce Developers
 
Manage Massive Datasets with Big Objects & Async SOQL
Manage Massive Datasets with  Big Objects & Async SOQLManage Massive Datasets with  Big Objects & Async SOQL
Manage Massive Datasets with Big Objects & Async SOQL
 
Introduction to Einstein Bots
Introduction to Einstein Bots Introduction to Einstein Bots
Introduction to Einstein Bots
 

Developing Hybrid Apps with the Salesforce Mobile SDK

  • 1. Developing Hybrid Apps with the Salesforce Mobile SDK Sandeep Bhanot, Salesforce.com, Senior Developer Evangelist @cloudysan
  • 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 intellectual property and other litigation, risks associated with 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-Q for the most recent fiscal quarter ended July 31, 2012. This 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. We’re Living in the Post-PC Era > iPhone Revenue – Q1 ’12 TOTAL Microsoft Revenue – Q2 ’12 $24.42 billion $20.89 billion
  • 4. Three Options: Which One Is Right For You? Advanced UI interactions Web developer skills Fastest performance Access to native platform App store distribution App store distribution Web developer skills Instant updates Unrestricted distribution
  • 5. Hybrid Mobile Apps – Best Of Both Worlds Native HTML5
  • 6. Why Hybrid? Your App
  • 7. Why Hybrid? • Write once, run anywhere • Reuse existing web development skills • Visualforce, HTML5, JavaScript, CSS3 etc. • Access native device functionality • App Store distribution (unlike web apps)
  • 8. Why not Hybrid? • May not be as fast as native apps • Limited support for multi-touch gestures • Cannot do advanced graphics like WebGL
  • 9. Salesforce Hybrid Mobile SDK Container Containe OAuth 2.0 r Authentication and secure token management </> Visualforce / REST API 100% Open Source { } Direct Salesforce REST APIs directly from Developed on Github JavaScript Secure Offline Database Store business data on a device with enterprise-class security Push Notifications Dispatch real-time alerts directly to mobile devices
  • 10. Lets build a Hybrid Mobile App
  • 11. Cloud Hunter : The Dreamforce Scavenger App
  • 13. Recap : Creating a Hybrid Mobile App using Visualforce • Make your Visualforce mobile friendly • docType="html-5.0" • Standard HTML5/CSS/JavaScript markup • JQuery Mobile + JS Remoting for data binding • Download and install Salesforce Mobile SDK (Android or iOS) • Create new Hybrid project using the SDK • Update project with OAuth creds and Visualforce page URL
  • 14. PhoneGap – How It Works … Custom WebView The JavaScript Native ‘Bridge’ = Call JS from native code Call native code from JS
  • 15. Device Access Using PhoneGap http://docs.phonegap.com
  • 16. PhoneGap or Cordova? • Cordova is an Apache Open Source project • PhoneGap is a distribution of Cordova distributed by Adobe • Currently, PhoneGap and Cordova are one and the same
  • 17. What Libraries are Available? Any JS/CSS library/framework of your choice DOM GUI Testing • XUI • jQuery Mobile • QUnit • Zepto • Sencha Touch • Jasmine • jQuery • Dojo Mobile • DominatorJS • Dojo • GloveBox • ThumbsJs • Ekiben © http://www.slideshare.net/davyjones/html5-is-the-future-of-mobile-phonegap-takes-you-there-today
  • 21. PhoneGap plugins : Bar code scanning
  • 22. Additional Resources  Mobile SDK Home Page http://wiki.developerforce.com/MobileSDK  Code shown during this session <<>>  PhoneGap http://www.phonegap.com  HTML5 resources http://diveintohtml5.info/ http://www.html5rocks.com https://developers.facebook.com/html5/
  • 23. Sandeep Bhanot Senior Developer Evangelist, @cloudysan