SlideShare una empresa de Scribd logo
1 de 18
Hybrid Mobile
App Development



          Prepared by: Tuan Abdeen
          Certified Salesforce.com Developer
Agenda
•   ABSI
•   SL Force.com Team
•   Introduction to Mobile Development
•   Hybrid Development Approaches
     • HTML5 Hybrid Development
     • VisualForce Hybrid Development
     • Mobile SDK Hybrid Development
•   Other Technologies Used
     • OAuth 2.0
     • Offline Data Storage
     • PIN Code Authentication
•   Ongoing Research Areas

                                         Prepared by: Tuan Abdeen
                                         Certified Salesforce.com Developer
•   First Salesforce.com partner in Belgium (from 2002)
•   Sri Lanka operations started from 2009




                                               Prepared by: Tuan Abdeen
                                               Certified Salesforce.com Developer
Sri Lanka Force.com Team
           Tuan Abdeen           SCJP
         Certified Salesforce Developer




           Malaka Silva          SCJP
     Certified Salesforce Advance Developer



       Dhanusha Mahatantila              SCJP
         Certified Salesforce Developer




           Vishanka Perera       SCJP
         Certified Salesforce Developer




          Inshar Anas      SCJP, SCWCD
         Certified Salesforce Developer




         Shermal Warnakula          SCJP




             Amila Pathirana




                                                Prepared by: Tuan Abdeen
                                                Certified Salesforce.com Developer
Intro to Mobile Development
1. Native
You can code native apps for each mobile platform (Android, iOS), taking advantage of each platform's
    native capabilities.

2. HTML5
You can build HTML5 apps using familiar technologies such as HTML5, CSS, and JavaScript. Same
    app can run on all platforms, but no access to native platform features.

3. Hybrid
You can create hybrid apps that use a JavaScript bridge in a native container to merge the portability of
    HTML5 with native device capabilities, such as the camera or address book.




                                                                   Prepared by: Tuan Abdeen
                                                                   Certified Salesforce.com Developer
Hybrid Development Approaches




                   Prepared by: Tuan Abdeen
                   Certified Salesforce.com Developer
PhoneGap
What PhoneGap does here is, it will convert the web based application
(developed with HTML5, CSS3 & JQueryMobile) into a native iOS, Android,
Blackberry, Windows Phone, Palm OS and Symbian kind of an application.

Therefore, the end-user will use the app not as a web based app (meaning, not
in a web browser), but as a native app.




                                                  Prepared by: Tuan Abdeen
                                                  Certified Salesforce.com Developer
HTML5 Hybrid Development




The system was developed using pure HTML5, CSS3 and JQueryMobile.

Because this application requires to get information from Salesforce, the only
possible approach was to use the Salesforce REST API.

The application communicates with Force.com REST API using the forcetk.js
JavaScript wrapper. Forcetk.js (Force.com JavaScript REST Toolkit) is an open
source wrapper to the REST API.

PhoneGap was used to convert the web base app to a native iOS app to install it
to the iPad.


                                                     Prepared by: Tuan Abdeen
                                                     Certified Salesforce.com Developer
Prepared by: Tuan Abdeen
Certified Salesforce.com Developer
VisualForce Hybrid Development

The solution was made using Visualforce, Apex Controller, SOQL with HTML5,
CSS3 and JQueryMobile.

Best Practices:
•Marking a VF page as HTML5. <apex:page docType="html-5.0“ … >

•Set standardStylesheets="false" on the apex:page for JQueryMobile CSS
to apply iPad styles on the VF page.

•Using the ‘viewport’ meta tag. <meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no;" />

PhoneGap was used to convert the web base app to a native iOS app to install it
to the iPad.




                                                   Prepared by: Tuan Abdeen
                                                   Certified Salesforce.com Developer
Prepared by: Tuan Abdeen
Certified Salesforce.com Developer
Mobile SDK Hybrid Development
          The Mobile SDK is an open-source suite of
          familiar technologies—like a REST API and
          OAuth 2.0 - that you can use to build great
          mobile apps.

          The Mobile SDK for iOS contains native
          Objective-C libraries, and an XCode template to
          enable developers to rapidly build iOS
          applications that securely connect to Force.com
          and Database.com.

          The Mobile SDK provides a container based on
          PhoneGap. The container enables HTML5-based
          applications to leverage the libraries such as
          OAuth and secure offline storage, effectively
          providing an enterprise-ready hybrid application
          container.


                              Prepared by: Tuan Abdeen
                              Certified Salesforce.com Developer
Prepared by: Tuan Abdeen
Certified Salesforce.com Developer
Other Technologies Used

1. OAuth 2.0
Salesforce OAuth 2 User-Agent authentication flow is used by iPad application.

                                               After the consumer has an access
                                               token, they can use the access
                                               token to access Salesforce data on
                                               the end user's behalf and a refresh
                                               token to get a new access token if it
                                               becomes invalid for any reason.




                                                   Prepared by: Tuan Abdeen
                                                   Certified Salesforce.com Developer
Other Technologies Used …

2. Offline Data Storage
Offline Date Storage was implemented with Apache Cordova’s Local Storage
   API.
This API was used within the PhoneGap context to use the iPad Device’s
   storage support.




SQLite is a software library that implements a self-contained,
server-less, zero-configuration, transactional SQL database engine.




                                                     Prepared by: Tuan Abdeen
                                                     Certified Salesforce.com Developer
Other Technologies Used …

3. PIN Code Authentication
•   The User’s does not want to enter SFDC credentials every time when they
    want to access the iPad Application. (OAuth 2.0 User Agent Flow with Access
    & Refresh token)
•   In subsequent logins, we use the access & refresh token that has been
    locally saved and do automatic login on behalf of the User.
•   Next issue was the security problem of not asking any credentials to access
    the iPad Application.
•   PIN Code Authentication built for that purpose. (4 digit)




                                                      Prepared by: Tuan Abdeen
                                                      Certified Salesforce.com Developer
Ongoing Research Areas
• Mobile SDK enhancements
   • Configure PIN timeout value
   • Replace SmartStore with SQLite (SmartStore in one or more ‘soups’. A
      soup, conceptually speaking, is a logical collection of data records -
      represented as JSON objects)
   • How to represent Relational DB structure in SQLite
   • Way of pushing offline stored data to SFDC when the device is
      connected (synching stale data)
   • Dynamically creating iPad screen, depend on SFDC metadata (Page
      Layout & Field-level security)
   • Synch device contacts with SFDC contacts (QRCODE Integration)


                                                    Prepared by: Tuan Abdeen
                                                    Certified Salesforce.com Developer
Prepared by: Tuan Abdeen
Certified Salesforce.com Developer

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Development of Mobile Application -PPT
Development of Mobile Application -PPTDevelopment of Mobile Application -PPT
Development of Mobile Application -PPT
 
Native, Hybrid, or Cross-platform Development? What Type of Mobile App is Bes...
Native, Hybrid, or Cross-platform Development? What Type of Mobile App is Bes...Native, Hybrid, or Cross-platform Development? What Type of Mobile App is Bes...
Native, Hybrid, or Cross-platform Development? What Type of Mobile App is Bes...
 
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
 
History Of The Development Of Mobile Applications
History Of The Development Of Mobile ApplicationsHistory Of The Development Of Mobile Applications
History Of The Development Of Mobile Applications
 
Flutter & Firebase BootCamp.pdf
Flutter & Firebase BootCamp.pdfFlutter & Firebase BootCamp.pdf
Flutter & Firebase BootCamp.pdf
 
What is Flutter
What is FlutterWhat is Flutter
What is Flutter
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Google flutter the easy and practical way
Google flutter the easy and practical wayGoogle flutter the easy and practical way
Google flutter the easy and practical way
 
Flutter presentation.pptx
Flutter presentation.pptxFlutter presentation.pptx
Flutter presentation.pptx
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Flutter: Future of App Development
Flutter: Future of App DevelopmentFlutter: Future of App Development
Flutter: Future of App Development
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Android app development
Android app developmentAndroid app development
Android app development
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
Introduction to Flutter
Introduction to FlutterIntroduction to Flutter
Introduction to Flutter
 
Android Security
Android SecurityAndroid Security
Android Security
 
Flutter Intro
Flutter IntroFlutter Intro
Flutter Intro
 
PPT on Android Applications
PPT on Android ApplicationsPPT on Android Applications
PPT on Android Applications
 
Android Operating System (Androrid OS)
Android Operating System (Androrid OS)Android Operating System (Androrid OS)
Android Operating System (Androrid OS)
 
Broadcast Receiver
Broadcast ReceiverBroadcast Receiver
Broadcast Receiver
 

Destacado

Destacado (20)

Unit testing in Force.com platform
Unit testing in Force.com platformUnit testing in Force.com platform
Unit testing in Force.com platform
 
Native, Web or Hybrid Mobile App Development?
Native, Web or Hybrid Mobile App Development?Native, Web or Hybrid Mobile App Development?
Native, Web or Hybrid Mobile App Development?
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic Framework
 
Building Hybrid Apps with AngularJS and Ionic
Building Hybrid Apps with AngularJS and IonicBuilding Hybrid Apps with AngularJS and Ionic
Building Hybrid Apps with AngularJS and Ionic
 
Hybrid mobile apps
Hybrid mobile appsHybrid mobile apps
Hybrid mobile apps
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and Ionic
 
Mobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web AppsMobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web Apps
 
Native vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application DevelopmentNative vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application Development
 
Top 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App DevelopmentTop 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App Development
 
Architecture Best Practices
Architecture Best PracticesArchitecture Best Practices
Architecture Best Practices
 
PPT from Webinar Create Hybrid Mobile Application in 1 hour
PPT from Webinar Create Hybrid Mobile Application in 1 hourPPT from Webinar Create Hybrid Mobile Application in 1 hour
PPT from Webinar Create Hybrid Mobile Application in 1 hour
 
building HTML hybrid app
 with ionic
building HTML hybrid app
 with ionicbuilding HTML hybrid app
 with ionic
building HTML hybrid app
 with ionic
 
Different types of mobile apps
Different types of mobile appsDifferent types of mobile apps
Different types of mobile apps
 
Hybrid vs Native Mobile App. Decide in 5 minutes!
Hybrid vs Native Mobile App. Decide in 5 minutes!Hybrid vs Native Mobile App. Decide in 5 minutes!
Hybrid vs Native Mobile App. Decide in 5 minutes!
 
Cross platform mobile development
Cross platform mobile developmentCross platform mobile development
Cross platform mobile development
 
Introduction to Firebase on Android
Introduction to Firebase on AndroidIntroduction to Firebase on Android
Introduction to Firebase on Android
 
Building single page applications
Building single page applicationsBuilding single page applications
Building single page applications
 
Native vs. Web vs. Hybrid: Mobile Development Choices
Native vs. Web vs. Hybrid: Mobile Development ChoicesNative vs. Web vs. Hybrid: Mobile Development Choices
Native vs. Web vs. Hybrid: Mobile Development Choices
 
Workshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkWorkshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic Framework
 
Developing a Modern Mobile App Strategy
Developing a Modern Mobile App StrategyDeveloping a Modern Mobile App Strategy
Developing a Modern Mobile App Strategy
 

Similar a Hybrid mobile app development

iOS-iPhone documentation
iOS-iPhone documentationiOS-iPhone documentation
iOS-iPhone documentation
Raj Dubey
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
Mizanur Sarker
 

Similar a Hybrid mobile app development (20)

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
 
Build Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic FrameworkBuild Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic Framework
 
Going Offline with Salesforce1 Mobile SDK
Going Offline with Salesforce1 Mobile SDKGoing Offline with Salesforce1 Mobile SDK
Going Offline with Salesforce1 Mobile SDK
 
Salesforce touch
Salesforce touchSalesforce touch
Salesforce touch
 
IBM MobileFirst - Hybrid Application Development with Worklight
IBM MobileFirst - Hybrid Application Development with WorklightIBM MobileFirst - Hybrid Application Development with Worklight
IBM MobileFirst - Hybrid Application Development with Worklight
 
Wise Men Oracle Mobility Webinar- 11-December-2014
Wise Men Oracle Mobility Webinar- 11-December-2014Wise Men Oracle Mobility Webinar- 11-December-2014
Wise Men Oracle Mobility Webinar- 11-December-2014
 
Innovate Faster with Salesforce Heroku and AWS - CMP303 - re:Invent 2017
Innovate Faster with Salesforce Heroku and AWS - CMP303 - re:Invent 2017Innovate Faster with Salesforce Heroku and AWS - CMP303 - re:Invent 2017
Innovate Faster with Salesforce Heroku and AWS - CMP303 - re:Invent 2017
 
Quickly Build a Native Mobile App for Your Community Using Salesforce Mobile SDK
Quickly Build a Native Mobile App for Your Community Using Salesforce Mobile SDKQuickly Build a Native Mobile App for Your Community Using Salesforce Mobile SDK
Quickly Build a Native Mobile App for Your Community Using Salesforce Mobile SDK
 
Mobile Apps Develpment - A Comparison
Mobile Apps Develpment - A ComparisonMobile Apps Develpment - A Comparison
Mobile Apps Develpment - A Comparison
 
Powering your Apps with Cloud Services
Powering your Apps with Cloud ServicesPowering your Apps with Cloud Services
Powering your Apps with Cloud Services
 
Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices
 
New Enterprisre Capabilities in Telerik Platform
New Enterprisre Capabilities in Telerik PlatformNew Enterprisre Capabilities in Telerik Platform
New Enterprisre Capabilities in Telerik Platform
 
Dreamforce 19 Global Gatherings Sevilla Salesforce Developer Group
Dreamforce 19 Global Gatherings Sevilla Salesforce Developer GroupDreamforce 19 Global Gatherings Sevilla Salesforce Developer Group
Dreamforce 19 Global Gatherings Sevilla Salesforce Developer Group
 
iOS-iPhone documentation
iOS-iPhone documentationiOS-iPhone documentation
iOS-iPhone documentation
 
Mobile application development platform
Mobile application development platformMobile application development platform
Mobile application development platform
 
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDKQuickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
 
Salesforce Spring 2020 New Developer Features
Salesforce Spring 2020 New Developer FeaturesSalesforce Spring 2020 New Developer Features
Salesforce Spring 2020 New Developer Features
 
Shankar
ShankarShankar
Shankar
 
19-03-22.pdf
19-03-22.pdf19-03-22.pdf
19-03-22.pdf
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Hybrid mobile app development

  • 1. Hybrid Mobile App Development Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 2. Agenda • ABSI • SL Force.com Team • Introduction to Mobile Development • Hybrid Development Approaches • HTML5 Hybrid Development • VisualForce Hybrid Development • Mobile SDK Hybrid Development • Other Technologies Used • OAuth 2.0 • Offline Data Storage • PIN Code Authentication • Ongoing Research Areas Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 3. First Salesforce.com partner in Belgium (from 2002) • Sri Lanka operations started from 2009 Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 4. Sri Lanka Force.com Team Tuan Abdeen SCJP Certified Salesforce Developer Malaka Silva SCJP Certified Salesforce Advance Developer Dhanusha Mahatantila SCJP Certified Salesforce Developer Vishanka Perera SCJP Certified Salesforce Developer Inshar Anas SCJP, SCWCD Certified Salesforce Developer Shermal Warnakula SCJP Amila Pathirana Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 5. Intro to Mobile Development 1. Native You can code native apps for each mobile platform (Android, iOS), taking advantage of each platform's native capabilities. 2. HTML5 You can build HTML5 apps using familiar technologies such as HTML5, CSS, and JavaScript. Same app can run on all platforms, but no access to native platform features. 3. Hybrid You can create hybrid apps that use a JavaScript bridge in a native container to merge the portability of HTML5 with native device capabilities, such as the camera or address book. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 6. Hybrid Development Approaches Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 7. PhoneGap What PhoneGap does here is, it will convert the web based application (developed with HTML5, CSS3 & JQueryMobile) into a native iOS, Android, Blackberry, Windows Phone, Palm OS and Symbian kind of an application. Therefore, the end-user will use the app not as a web based app (meaning, not in a web browser), but as a native app. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 8. HTML5 Hybrid Development The system was developed using pure HTML5, CSS3 and JQueryMobile. Because this application requires to get information from Salesforce, the only possible approach was to use the Salesforce REST API. The application communicates with Force.com REST API using the forcetk.js JavaScript wrapper. Forcetk.js (Force.com JavaScript REST Toolkit) is an open source wrapper to the REST API. PhoneGap was used to convert the web base app to a native iOS app to install it to the iPad. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 9. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 10. VisualForce Hybrid Development The solution was made using Visualforce, Apex Controller, SOQL with HTML5, CSS3 and JQueryMobile. Best Practices: •Marking a VF page as HTML5. <apex:page docType="html-5.0“ … > •Set standardStylesheets="false" on the apex:page for JQueryMobile CSS to apply iPad styles on the VF page. •Using the ‘viewport’ meta tag. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /> PhoneGap was used to convert the web base app to a native iOS app to install it to the iPad. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 11. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 12. Mobile SDK Hybrid Development The Mobile SDK is an open-source suite of familiar technologies—like a REST API and OAuth 2.0 - that you can use to build great mobile apps. The Mobile SDK for iOS contains native Objective-C libraries, and an XCode template to enable developers to rapidly build iOS applications that securely connect to Force.com and Database.com. The Mobile SDK provides a container based on PhoneGap. The container enables HTML5-based applications to leverage the libraries such as OAuth and secure offline storage, effectively providing an enterprise-ready hybrid application container. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 13. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 14. Other Technologies Used 1. OAuth 2.0 Salesforce OAuth 2 User-Agent authentication flow is used by iPad application. After the consumer has an access token, they can use the access token to access Salesforce data on the end user's behalf and a refresh token to get a new access token if it becomes invalid for any reason. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 15. Other Technologies Used … 2. Offline Data Storage Offline Date Storage was implemented with Apache Cordova’s Local Storage API. This API was used within the PhoneGap context to use the iPad Device’s storage support. SQLite is a software library that implements a self-contained, server-less, zero-configuration, transactional SQL database engine. Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 16. Other Technologies Used … 3. PIN Code Authentication • The User’s does not want to enter SFDC credentials every time when they want to access the iPad Application. (OAuth 2.0 User Agent Flow with Access & Refresh token) • In subsequent logins, we use the access & refresh token that has been locally saved and do automatic login on behalf of the User. • Next issue was the security problem of not asking any credentials to access the iPad Application. • PIN Code Authentication built for that purpose. (4 digit) Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 17. Ongoing Research Areas • Mobile SDK enhancements • Configure PIN timeout value • Replace SmartStore with SQLite (SmartStore in one or more ‘soups’. A soup, conceptually speaking, is a logical collection of data records - represented as JSON objects) • How to represent Relational DB structure in SQLite • Way of pushing offline stored data to SFDC when the device is connected (synching stale data) • Dynamically creating iPad screen, depend on SFDC metadata (Page Layout & Field-level security) • Synch device contacts with SFDC contacts (QRCODE Integration) Prepared by: Tuan Abdeen Certified Salesforce.com Developer
  • 18. Prepared by: Tuan Abdeen Certified Salesforce.com Developer

Notas del editor

  1. ABSI salesforce gold partner Certified Consultants from Belgium SL has done 14 big projects for the last 3.5 years Knowledge in - Customer Portal - Force.com Sites - Sales cloud &amp; Sales cycle (Opp, Product, PriceBook, Lead, Quote etc..) - we have people with Heroku Experience - Data Integration with Pervasive - Appexchahnge (all ready published Utility + report scheduler in due time)
  2. All developers from Java background (almost everybody SCJP certified) Except for the 2 new comers all are Force.com DEV 401 certified Malaka already 501 certified and Me and Dhanusha is waiting for 501 results
  3. Intro we were focusing on Force.com custom development and also Appexchange for last couple of years Because of the current trend and demand for iPad based mobile app development, we are now researching on SFDC mobile development
  4. In Hybrid development all front end development is based on HTML5. We use Phonegap to wrap the application to become a native app as well as to get native platform device features. In Hybrid development we have tried 3 alternative approaches. Every single approach has its pros and cons. Pure HTML5 based approach. In this approach the HTML files are store at PhoneGap container and works well in Online and offline mode. But to connect to SFDC the only option is the Force.com Rest API. Well known VF page, APEX controllers and SOQL approach. Less development time, but offline mode does not work. Salesforce Mobile SDK – recently released as a pilot after last Dreamforce. It uses VF, apex controllers, SOQL, JS remoting plus many more features.
  5. xCode =&gt; ABSI tuan@absi.be.ipad / isba1210 Pin =&gt; 1111
  6. xCode =&gt; defiproIpad absi@renault.be.test / isba1234
  7. Xcode =&gt; CT [email_address] 1qaz2wsx@