SlideShare a Scribd company logo
1 of 45
PhoneGap

Facebook Hack
Steve Gill
    PhoneGap Champ
facebook.com/stevengill97
       @SteveSGill
   steveng@adobe.com
What is PhoneGap?
PhoneGap
PhoneGap
      &
Apache Cordova
PhoneGap Pattern


1. Embed a chromeless browser in a native app
2. Create a “bridge” between the browser and the
   native code
3. Write a web app
4. Package the web app with the native code and deploy
   to devices!
Write once debug everywhere
Supported Platforms
•   iOS (iPad, iPod Touch, iPhone)
•   Android (Everything)
•   BlackBerry (Smartphones, PlayBook)
•   WebOS
•   Windows Phone
•   Symbian
•   Bada
Lay of the Land
iOS .............................. Objective C
Android ...................... Java ‘Harmony’ / C++
BlackBerry ................. Java J2ME / C++ (maybe?)
webOS ........................ HTML, CSS and JS
Windows Phone 7 ... .NET
Bada ............................. C++
How do you write
 PhoneGap apps?
Basics: HTML


<button>I’m native codes!</button>
Setup the Viewport


<meta name="viewport" content="width=dev
ice-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no;" />
Basics: CSS3

• Media queries come in handy for tablets
• Many folk using precompilers these days
• Opacity, rounded corners, gradients and
  fucking drop shadows fuck ya!
CSS3 Animations


-webkit-transform:
  translate3d(x,y,z) scale3D(1,1,1.0)
Media Query
Media Query
<link rel="stylesheet" media="all and (max-device-
width: 480px)" href="iphone.css">
Media Query
<link rel="stylesheet" media="all and (max-device-
width: 480px)" href="iphone.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:portrait)" href="ipad-portrait.css">
Media Query
<link rel="stylesheet" media="all and (max-device-
width: 480px)" href="iphone.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:portrait)" href="ipad-portrait.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:landscape)" href="ipad-
landscape.css">
Media Query
<link rel="stylesheet" media="all and (max-device-
width: 480px)" href="iphone.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:portrait)" href="ipad-portrait.css">
<link rel="stylesheet" media="all and (min-device-
width: 481px) and (max-device-width: 1024px) and
(orientation:landscape)" href="ipad-
landscape.css">
Basics: JavaScript

• Language of the web.
• Scheme with a C syntax.
• Some quirks: http://wtfjs.com
Startup

document.addEventListener(
  ‘deviceready’,
  function() {
     alert(‘WINNING!’);
  },
  false);
Performance

• Use those CSS transforms
• Don’t set style properties inside a loop
• Don’t do what you do on the web
Clear as Mud
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
  PACKAGED ON A PER PLATFORM BASIS
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
  PACKAGED ON A PER PLATFORM BASIS
• NO CROSS COMPILING MAGIC
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
  PACKAGED ON A PER PLATFORM BASIS
• NO CROSS COMPILING MAGIC
• NO FAIRY DUST / SPARKLES
Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
  PACKAGED ON A PER PLATFORM BASIS
• NO CROSS COMPILING MAGIC
• NO FAIRY DUST / SPARKLES
• NO UNICORNS GET HURT
Partners / Contributors
•   Adobe
•   IBM
•   Sony Ericsson
•   Symbian
•   HP/Palm
•   RIM
•   Microsoft
Power Users

• Alcatel Lucent
• Sabre
• Deutsche Telecom
• Ars Technica
• WikiMedia
PhoneGap APIs

• Sensors
• Data
• Events

        http://docs.phonegap.com
Sensors

• GPS
• Accelerometer
• Compass
• Network
• Camera
Data

• Contacts
• Media
• File system
• Notifications
Events

• onload (duh)
• ondeviceready (this is special)
• onnativeready
• onresume
• onpause
Tooling
• Use any IDE
• Use the platform emulators (at your peril)
• Use Ripple emulator
• Use Web Inspector Remote (Weinre)
• Srsly use Weinre
• Console.log and alert =(
Libraries

• DOM
• Testing
• Style / GUI
• Persistence
Plugins
Facebook PhoneGap
          Plugin
Take your mobile Facebook app and make it native
        Take advantage of PhoneGap APIs
       Distribute in app stores & go offline
How the Fb Plugin
           Works
Adds hooks into Facebook JS SDK to call the plugin
   Maps some FB JS calls to native FB iOS SDK
Demo
More Fb Plugin Info
                      Source Code:
github.com/davejohnson/phonegap-plugin-facebook-connect
                    iOS Install video:
                 youtube.com/phonegap
              Android Video Coming Soon!
project resources
                    phonegap.com
                    docs.phonegap.com
                    wiki.phonegap.com
                    git.apache.org
                    issues.apache.org/jira/browse/CB
                    groups.google.com/group/phonegap
                    twitter.com/phonegap
                    facebook.com/phonegap
                    #phonegap on freenode
                    youtube.com/phonegap
    thank you       github.com/davejohnson/phonegap-
                    plugin-facebook-connect

More Related Content

What's hot

Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
davyjones
 
Prebrowsing - Velocity NY 2013
Prebrowsing - Velocity NY 2013Prebrowsing - Velocity NY 2013
Prebrowsing - Velocity NY 2013
Steve Souders
 

What's hot (20)

Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
 
Android Wear Applications in C# with Xamarin
Android Wear Applications in C# with XamarinAndroid Wear Applications in C# with Xamarin
Android Wear Applications in C# with Xamarin
 
Getting Your Hooks into Cordova
Getting Your Hooks into CordovaGetting Your Hooks into Cordova
Getting Your Hooks into Cordova
 
Mobile Web High Performance
Mobile Web High PerformanceMobile Web High Performance
Mobile Web High Performance
 
Digpen 7: Building mobile apps with PhoneGap
Digpen 7: Building mobile apps with PhoneGapDigpen 7: Building mobile apps with PhoneGap
Digpen 7: Building mobile apps with PhoneGap
 
Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications? Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications?
 
Mobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance Optimization
 
The Mobile Web - Fronteers 2009
The Mobile Web - Fronteers 2009The Mobile Web - Fronteers 2009
The Mobile Web - Fronteers 2009
 
Why HTML5 is getting on my nerves…
Why HTML5 is getting on my nerves…Why HTML5 is getting on my nerves…
Why HTML5 is getting on my nerves…
 
PhoneGap mobile development
PhoneGap mobile developmentPhoneGap mobile development
PhoneGap mobile development
 
A New Hope – the web strikes back
A New Hope – the web strikes backA New Hope – the web strikes back
A New Hope – the web strikes back
 
How you can become an Accessibility Superhero
How you can become an Accessibility SuperheroHow you can become an Accessibility Superhero
How you can become an Accessibility Superhero
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016
 
Creating mobile apps with Cordova for iOS, Android and BlackBerry 10
Creating mobile apps with Cordova for iOS, Android and BlackBerry 10Creating mobile apps with Cordova for iOS, Android and BlackBerry 10
Creating mobile apps with Cordova for iOS, Android and BlackBerry 10
 
Best Practices For Delivering Quality Web Experiences In A Mobile, Multi-Brow...
Best Practices For Delivering Quality Web Experiences In A Mobile, Multi-Brow...Best Practices For Delivering Quality Web Experiences In A Mobile, Multi-Brow...
Best Practices For Delivering Quality Web Experiences In A Mobile, Multi-Brow...
 
Prebrowsing - Velocity NY 2013
Prebrowsing - Velocity NY 2013Prebrowsing - Velocity NY 2013
Prebrowsing - Velocity NY 2013
 
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web AppsDevoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
 
Progressive Web Apps – the return of the web?
Progressive Web Apps – the return of the web?Progressive Web Apps – the return of the web?
Progressive Web Apps – the return of the web?
 
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
 
Approaching the unknown - Windows Phone application security assessment guide
Approaching the unknown - Windows Phone application security assessment guideApproaching the unknown - Windows Phone application security assessment guide
Approaching the unknown - Windows Phone application security assessment guide
 

Similar to Phonegap facebook- plugin

HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
Mihai Corlan
 
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe CampPhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
Mihai Corlan
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
Droidcon Berlin
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 

Similar to Phonegap facebook- plugin (20)

HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
PhoneGap at Facebook Mobile Hack
PhoneGap at Facebook Mobile HackPhoneGap at Facebook Mobile Hack
PhoneGap at Facebook Mobile Hack
 
PhoneGap/Cordova
PhoneGap/CordovaPhoneGap/Cordova
PhoneGap/Cordova
 
Intro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap BuildIntro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap Build
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
 
Android development workshop
Android development workshopAndroid development workshop
Android development workshop
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Intro to-phone gap-techwed-14dec2011
Intro to-phone gap-techwed-14dec2011Intro to-phone gap-techwed-14dec2011
Intro to-phone gap-techwed-14dec2011
 
The Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java DeveloperThe Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java Developer
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 
Pro Mobile web Apps with Phonegap 3.X - Adobe Mobile Day
Pro Mobile web Apps with Phonegap 3.X - Adobe Mobile DayPro Mobile web Apps with Phonegap 3.X - Adobe Mobile Day
Pro Mobile web Apps with Phonegap 3.X - Adobe Mobile Day
 
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe CampPhoneGap/PhoneGap Build - Amsterdam Adobe Camp
PhoneGap/PhoneGap Build - Amsterdam Adobe Camp
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGap
 
Txjs
TxjsTxjs
Txjs
 
Future of Mobile
Future of MobileFuture of Mobile
Future of Mobile
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 
移动端Web app开发
移动端Web app开发移动端Web app开发
移动端Web app开发
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Phonegap facebook- plugin

Editor's Notes

  1. \n
  2. Always wanted to see how this picture looked on the big screen\n
  3. Who has heard of PhoneGap before? PhoneGap is a free and open source framework that enables developers to write cross platform mobile applications using html5, css3 and javascript.\n
  4. Only picture awesome enough to sum up PhoneGap\n
  5. \n
  6. HTML 5 is huge. All you hear now a days is html5 this and html 5 that. With PhoneGap you get to use HTML5, CSS3 and Javascript. The PhoneGap team is \n
  7. \n
  8. \n
  9. This approach lets you write once run anywhere\n
  10. \n
  11. \n
  12. We achieve cross platform development through neither magic nor the force, but through HTML, JavaScript and CSS.\n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. More includes means slower startup. Reduce your HTML, CSS and JS!\n
  24. Bring it all together\n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. SSO, Dialogs, etc\n
  41. \n
  42. \n
  43. \n