Beginning jQuery Mobile
- 1. Beginning jQuery
Mobile
or Enough to Get You Started,
but not Enough to Make You Dangerous
- 2. Who Am I?
I am a Microsoft Certified Solution Developer
and I’ve been developing software since 1979.
Since 2009, I have been focused on developing
mobile applications, for iPhone, Android,
Windows Phone 7, and the mobile web.
- 3. What We Won’t Cover
• The Server Side
• HTML5 in Depth
• Validation
• Device Apps
- 4. What We Will Cover
• jQuery Mobile Intro.
• How it Works
• Form Elements
• List Magic
• Multi-Page Apps
• Events
- 5. What We Will Cover
• The Kernel
• The ThemeRoller
• Debugging
• Performance Tips
• Summary
• Links
- 6. Quick Intro to jQuery
Mobile
A unified, HTML5-based user interface system
for all popular mobile device platforms, built on
the rock-solid jQuery and jQuery UI
foundation. Its lightweight code is built with
progressive enhancement, and has a flexible,
easily theme-able design.
- 12. How It Works
• Dynamic DOM Manipulation
• HTML5 Pseudo-Attributes
• There is no free lunch
- 13. Dynamic DOM
Manipulation
• Show the Original Markup
• Show the “Annotated” Markup
- 14. HTML5 Pseudo-
Attributes
• JQM Uses Pseudo-Attributes (data-)
• Standard Browser Behavior - Ignore
Unknown Attributes
• Allows for Some Functionality on low-end
browsers
- 15. Form Elements
(aka widgets)
• buttons
• sliders
• radio buttons
• checkboxes
• select menus
• etc.
- 20. Page
• Page Load
• Page Change
• Page Transitions
• Page Initialization
• Page Remove
• Layout
- 27. Debugging
• What’s the Problem?
• Analogues
• WEINRE & Adobe Shadow
• iWebInspector
• Opera Mobile Emulator
- 28. Analogues
In biochemistry, an analog is a substance that
is similar, but not identical, to another.
For us, it is a browser that is similar, but not
identical, to the one we wish to test.
- 29. Analogues
• iPhone - Safari
• Android - Chrome
• Windows Phone 7 - IE
• Blackberry - Safari/Chrome
- 31. WEINRE
• Created by Patrick Mueller in JavaScript
• WEb INspector REmote (pronounced like
winery)
• WebKit Only! (It uses built in hooks)
• Allows for inspection of HTML/CSS
• Remote console.log
• NOT A DEBUGGER
- 32. Adobe Shadow
• Chrome Extension + iOS app & Android
app
• WEINRE with a better UI
• Inspection of HTML/CSS
• Remote console.log
• NOT A DEBUGGER
- 34. Opera Mobile Emulator
• Runs using desktop Opera & Opera Mobile
or Opera Mobile Emulator
• Inspection of HTML/CSS
• Remote console.log
• True Remote Debugger
- 36. Sencha Touch 2.0
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
<script src="lib/touch/sencha-touch.js" type="text/
javascript"></script>
<script src="app/app.js" type="text/javascript"></
script>
<link href="lib/touch/resources/css/sencha-touch.css"
rel="stylesheet" type="text/css" />
</head>
<body></body>
</html>
- 37. Sencha Touch 2.0
new Ext.Application({
launch: function() {
new Ext.Panel({
fullscreen: true,
dockedItems: [{xtype:'toolbar', title:'My First App'}],
layout: 'fit',
styleHtmlContent: true,
html: '<h2>Hello World!</h2>I did it!'
});
}
});
- 41. Books
• jQuery Mobile
Jon Reid
Sebastopol, CA: O’Reilly Media Inc., 2011
• Master Mobile Web Apps with jQuery
Mobile 2nd ed.
Matt Doyle
Brighton, UK: Elated Communications Ltd,
2011
Editor's Notes
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- Yes - blackberry use webkit too. Microsoft is the lone hold out\nImportant to note that webkit is not an open source browser, \nbut an open source browser engine kit. \nSafari and Chrome are not identical.\n
- Test, test, test.\nAnalogs are a convenience tool but not a substitute for device testing. \n(turn phone side ways)\n
- JavaScript is important to note because it explains a lot of its shortcomings.\nAll of these tools are free!\n
- Very similar to WEINRE in function. I thought it was WEINRE version 2.0 or something at first\n
- This is a must have if you are supporting the iPhone!\n\n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n