7. 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!
11. 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++
15. 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!
19. 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">
20. 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">
21. 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">
28. Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
PACKAGED ON A PER PLATFORM BASIS
29. Clear as Mud
• WRITE IN HTML, JAVASCRIPT AND CSS
• PRODUCE A NATIVE APP PACKAGED
PACKAGED ON A PER PLATFORM BASIS
• NO CROSS COMPILING MAGIC
30. 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
31. 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
38. 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 =(
44. More Fb Plugin Info
Source Code:
github.com/davejohnson/phonegap-plugin-facebook-connect
iOS Install video:
youtube.com/phonegap
Android Video Coming Soon!
45. 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
Editor's Notes
\n
Always wanted to see how this picture looked on the big screen\n
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
Only picture awesome enough to sum up PhoneGap\n
\n
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
\n
\n
This approach lets you write once run anywhere\n
\n
\n
We achieve cross platform development through neither magic nor the force, but through HTML, JavaScript and CSS.\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
More includes means slower startup. Reduce your HTML, CSS and JS!\n