SlideShare a Scribd company logo
1 of 59
Download to read offline
Intro to jQuery Mobile
                          South Bay Mobile User Group - 26 February 2013




Monday, February 25, 13
Introduction



Monday, February 25, 13
Who Am I?

                    • Troy Miles
                    • Senior Software Engineer w/ 30+ years of
                          experience
                    • Mobile/Mobile Web
                    • iOS, Android, & Windows Phone 7

Monday, February 25, 13
Monday, February 25, 13
Intermediate PhoneGap
                    • Learn by doing
                    • JS best practices, iScroll, Maps, Ajax + more
                    • Saturday, May 18th - 9 AM to 6 PM
                    • $99 - lunch & materials included
                    • http://bit.ly/XlxzYp
                    • CraveLab - Los Angeles
Monday, February 25, 13
You May Get Mad At
                                  Me
                    • Sorry, in advance if I insult your favorite:
                          company, device, or personality
                    • I have nothing against any of these
                          companies
                    • I will gladly do a project for any of them,
                          for the right price



Monday, February 25, 13
Our Agenda
                    • The Mobile Space Today
                    • Getting Started with jQuery Mobile
                    • Understanding Page Architecture
                    • Creating jQuery Mobile Forms
                    • Working with Lists
                    • jQuery Mobile Events
Monday, February 25, 13
Our Agenda


                    • Version 1.3.0
                    • Packaging for Distribution


Monday, February 25, 13
The Mobile Space Today



Monday, February 25, 13
85% of all US adults
                          now own a mobile
                                phone


Monday, February 25, 13
56% of all mobile
                    phone owners in the
                   US access the internet.


Monday, February 25, 13
Did you know 80% of customers
                 abandon a mobile site if they
                  have a bad user experience?




Monday, February 25, 13
Web Apps               Native Apps

                Can migrate web skills       Longer learning curve
                      One source base         Many source bases
               Deploy when you want       Deployment needs approval
         You choose when to update       User chooses when to update
             No device memory used           Uses device memory
                  Difficult to monetize      Monetization is built-in
             Restricted device access    Full access to device hardware
                           Slower                   Faster

Monday, February 25, 13
What is a Web App?

                    • A web app is more than just a website
                    • It incorporates app-like behavior
                    • Think GMail or Google Maps


Monday, February 25, 13
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. 

    Requires jQuery.




Monday, February 25, 13
From Web to Mobile


                    • Your HTML/CSS skills are still valuable
                    • Good design is more important than ever


Monday, February 25, 13
JQM & HTML5

                    • JQM doesn’t require you know HTML5
                    • JQM uses HTML5 when available
                    • Prefers semantic markup: header, footer,
                          section




Monday, February 25, 13
Getting Started with
                            jQuery Mobile


Monday, February 25, 13
Downloading JQM

                    • jquerymobile.com/download
                    • Use the uncompressed version while
                          developing
                    • Use the minimized version for deployment
                    • Get the correct version of jQuery

Monday, February 25, 13
Loading JQM
  <!DOCTYPE html>
  <html>
  <head>
    <title>Page Title</title>
    <meta name="viewport"
      content="width=device-width, initial-scale=1">
    <link rel="stylesheet"
      href="http://code.jquery.com/mobile/1.3.0/ jquery.mobile-1.3.0.min.css"/>
    <script src="http://code.jquery.com/jquery-1.9.1.min.js">
    </script>
    <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js">
    </script>
  </head>




Monday, February 25, 13
Self-hosting vs. CDN

                    • CDN = Content Delivery Network
                    • Can speed up app load two ways:
                     • CDN’s use edge servers
                     • May be cached by other apps

Monday, February 25, 13
CDN Fallback Code
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js">
  </script>

  <script>
  window.jQuery || document.write('<script src="js/vendor/jquery-1.9.0.min.js"></
  script>');
  </script>




Monday, February 25, 13
Understanding Page
                            Architecture


Monday, February 25, 13
Best Practices

                    • Downloading is slow so,
                     • Download as few files as possible
                     • Download as little data as possible
                    • Use a JS minifier

Monday, February 25, 13
JQM Pages

                    • A single HTML page can contain many JQM
                          Pages
                    • This allows page transitions without server
                          contact




Monday, February 25, 13
JQM Pages
                    • Pages are denoted with data-role=”page”
                    • Multiple JQM pages can be on an HTML
                          page
                    • Only one page is active at a time
                    • $.mobile.activePage is the currently active
                          page


Monday, February 25, 13
Page Transitions

                    • Animate from one page to next
                    • Only work on platforms that support CSS
                          3D transforms
                    • Others will see only “fade”
                    • Android below version 4

Monday, February 25, 13
Page Transitions
                    • fade
                    • pop
                    • flip
                    • turn
                    • flow
                    • and more
Monday, February 25, 13
Toolbars

                    • Supports HTML5 header/footer tags
                    • Or via div tag with data-role
                    • data-role=”header”
                    • data-role=”footer”

Monday, February 25, 13
Positioning Toolbars

                    • Toolbars will normally flow with the page
                    • data-position=”fixed”
                    • data-fullscreen=”true”


Monday, February 25, 13
Navbars
                    • Denoted by data-role=”navbar”
                    • When a link is clicked, it gets the active
                          state (ui-btn-active)
                    • JQM automatically sizes button
                    • 5 or less buttons, single line
                    • More than 5, two across
Monday, February 25, 13
Navbars

                    • Can appear in headers
                    • Or footers
                    • Can be persisted
                    • Can have icons

Monday, February 25, 13
Creating jQuery Mobile
                        Forms


Monday, February 25, 13
Form Basics

                    • Buttons
                    • Sliders
                    • Range Slider
                    • Flip Switch
                    • Checkboxes

Monday, February 25, 13
Selects

                    • Select
                    • Mini select
                    • Custom select
                    • Multi-slect with optgroups+

Monday, February 25, 13
Text

                    • Text input
                    • Textarea
                    • Number, date, tel, search
                    • File
                    • Password

Monday, February 25, 13
Getting Data to the
                                Server




Monday, February 25, 13
Working with Lists



Monday, February 25, 13
Listviews
                    • Unordered (ul)
                    • Ordered (ol)
                    • Linked
                    • Inset
                    • Filter
                    • List dividers
Monday, February 25, 13
Listviews

                    • Autodividers
                    • Count bubbles
                    • Icons
                    • Thumbnails
                    • Formatted content

Monday, February 25, 13
Nested listviews have been
                deprecated in version 1.3 - they
                will be removed in version 1.4.



Monday, February 25, 13
jQuery Mobile Events



Monday, February 25, 13
Events

                    • Touch events
                    • Orientation events
                    • Scroll events
                    • Page events

Monday, February 25, 13
Touch Events

                    • swipe
                    • swipeleft
                    • swiperight
                    • tap
                    • taphold

Monday, February 25, 13
Orientation Change


                    • orientationchange
                    • Not supported natively universally


Monday, February 25, 13
Scroll Events


                    • scrollstart
                    • scrollstop


Monday, February 25, 13
Page Events

                    • pageinit - use this instead of DOM ready()
                    • pagehide
                    • pageshow


Monday, February 25, 13
Version 1.3.0



Monday, February 25, 13
New Features

                    • Panels
                    • Responsive tables
                    • Range sliders
                    • Responsive grids
                    • Deprecated: nested lists

Monday, February 25, 13
Packaging for
                          Distribution


Monday, February 25, 13
Hybrid Apps

                    • HTML5 web app
                    • Wrapped in a native app
                    • Usually adds a way to access native features
                    • Distributable in most app stores

Monday, February 25, 13
Hybrid Apps

                                Can migrate web skills
                                   One source base
                             Deployment needs approval
                            User chooses when to update
                                 Uses device memory
                               Monetization is possible
                           Access to some device hardware
                          Faster than web, slower than device

Monday, February 25, 13
Ways to Hybridize

                    • PhoneGap
                    • Icenium
                    • Others


Monday, February 25, 13
PhoneGap

                    • Created by Nitobi, acquired by Adobe
                    • Open sourced as Apache Cordova
                    • PhoneGap is a trademark of Adobe


Monday, February 25, 13
Icenium
                    • Also based on Apache Cordova
                    • Built by Telerik
                    • PhoneGap code runs unmodified
                    • Deploy directly to device
                    • Includes Kendo UI Mobile
                    • Free until May 1st
Monday, February 25, 13
Others

                    • Appcelerator Titanium
                    • Trigger.io
                    • CodeName One
                    • (and still more)

Monday, February 25, 13
Links

                    • jquerymobile.com
                    • jquerymobile.com/themeroller/
                    • phonegap.com
                    • www.icenium.com

Monday, February 25, 13
My Links

                    • @therockncoder
                    • rockncoder@gmail.com
                    • http://therockncoder.blogspot.com/
                    • http://www.youtube.com/user/rockncoder
                    • https://github.com/Rockncoder

Monday, February 25, 13
Questions?



Monday, February 25, 13

More Related Content

Viewers also liked

Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013Mark Traphagen
 
Google+ Authorship Publisher Webinar - Search Influence
Google+ Authorship Publisher Webinar - Search InfluenceGoogle+ Authorship Publisher Webinar - Search Influence
Google+ Authorship Publisher Webinar - Search InfluenceSearch Influence
 
SEO Strategy and The Hummingbird Effect
SEO Strategy and The Hummingbird EffectSEO Strategy and The Hummingbird Effect
SEO Strategy and The Hummingbird EffectRobin Leonard
 
The science of landing pages
The science of landing pagesThe science of landing pages
The science of landing pagesUnbounce
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSJussi Pohjolainen
 
26 Social Media Marketing Trends for 2013
26 Social Media Marketing Trends for 201326 Social Media Marketing Trends for 2013
26 Social Media Marketing Trends for 2013DreamGrow Digital
 
Introduction to Objective - C
Introduction to Objective - CIntroduction to Objective - C
Introduction to Objective - CJussi Pohjolainen
 
The Psychology of C# Analysis
The Psychology of C# AnalysisThe Psychology of C# Analysis
The Psychology of C# AnalysisCoverity
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!Nicholas Zakas
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
Android vs iPhone - Differences in UI Patterns and Design
Android vs iPhone - Differences in UI Patterns and DesignAndroid vs iPhone - Differences in UI Patterns and Design
Android vs iPhone - Differences in UI Patterns and DesignJeremy Johnson
 
SlideShare Zeitgeist 2013
SlideShare Zeitgeist 2013SlideShare Zeitgeist 2013
SlideShare Zeitgeist 2013SlideShare
 
User Experience Best Practices
User Experience Best PracticesUser Experience Best Practices
User Experience Best PracticesNick Finck
 

Viewers also liked (20)

Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
Google+ Profile PageRank: The Real AuthorRank? - SMX Advanced 2013
 
Google+ Authorship Publisher Webinar - Search Influence
Google+ Authorship Publisher Webinar - Search InfluenceGoogle+ Authorship Publisher Webinar - Search Influence
Google+ Authorship Publisher Webinar - Search Influence
 
SEO Strategy and The Hummingbird Effect
SEO Strategy and The Hummingbird EffectSEO Strategy and The Hummingbird Effect
SEO Strategy and The Hummingbird Effect
 
Css3
Css3Css3
Css3
 
The science of landing pages
The science of landing pagesThe science of landing pages
The science of landing pages
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
OpenGL 4.4 Reference Card
OpenGL 4.4 Reference CardOpenGL 4.4 Reference Card
OpenGL 4.4 Reference Card
 
Tables And SQL basics
Tables And SQL basicsTables And SQL basics
Tables And SQL basics
 
26 Social Media Marketing Trends for 2013
26 Social Media Marketing Trends for 201326 Social Media Marketing Trends for 2013
26 Social Media Marketing Trends for 2013
 
Introduction to Objective - C
Introduction to Objective - CIntroduction to Objective - C
Introduction to Objective - C
 
Copywriting
CopywritingCopywriting
Copywriting
 
The Psychology of C# Analysis
The Psychology of C# AnalysisThe Psychology of C# Analysis
The Psychology of C# Analysis
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!
 
Linux Introduction
Linux IntroductionLinux Introduction
Linux Introduction
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
Android vs iPhone - Differences in UI Patterns and Design
Android vs iPhone - Differences in UI Patterns and DesignAndroid vs iPhone - Differences in UI Patterns and Design
Android vs iPhone - Differences in UI Patterns and Design
 
SlideShare Zeitgeist 2013
SlideShare Zeitgeist 2013SlideShare Zeitgeist 2013
SlideShare Zeitgeist 2013
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 
User Experience Best Practices
User Experience Best PracticesUser Experience Best Practices
User Experience Best Practices
 

Similar to Introduction to jQuery Mobile

jQuery Mobile, Backbone.js, and ASP.NET MVC
jQuery Mobile, Backbone.js, and ASP.NET MVCjQuery Mobile, Backbone.js, and ASP.NET MVC
jQuery Mobile, Backbone.js, and ASP.NET MVCTroy Miles
 
Using Data to Drive User Experiences
Using Data to Drive User ExperiencesUsing Data to Drive User Experiences
Using Data to Drive User ExperiencesRam Parthasarathy
 
Get responsive in 30 minutes (WordCamp Sofia)
Get responsive in 30 minutes (WordCamp Sofia)Get responsive in 30 minutes (WordCamp Sofia)
Get responsive in 30 minutes (WordCamp Sofia)Nickolay Ninarski
 
jQuery Comes to XPages
jQuery Comes to XPagesjQuery Comes to XPages
jQuery Comes to XPagesTeamstudio
 
jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep DiveTroy Miles
 
PhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or LessPhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or LessTroy Miles
 
WebSphere User Group UK: Larger Applications with Worklight
WebSphere User Group UK: Larger Applications with WorklightWebSphere User Group UK: Larger Applications with Worklight
WebSphere User Group UK: Larger Applications with WorklightAndrew Ferrier
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesTeamstudio
 
jQuery Mobile Jump Start
jQuery Mobile Jump StartjQuery Mobile Jump Start
jQuery Mobile Jump StartTroy Miles
 
Groovy & Grails eXchange 2012 - Building an e-commerce business with gr8 tec...
Groovy & Grails eXchange 2012 - Building an  e-commerce business with gr8 tec...Groovy & Grails eXchange 2012 - Building an  e-commerce business with gr8 tec...
Groovy & Grails eXchange 2012 - Building an e-commerce business with gr8 tec...Domingo Suarez Torres
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalPromet Source
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalAndy Kucharski
 
Building Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBuilding Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBrian Lyttle
 
Drupal: Internet Lego - What Modules Do I Use?
Drupal: Internet Lego - What Modules Do I Use?Drupal: Internet Lego - What Modules Do I Use?
Drupal: Internet Lego - What Modules Do I Use?Eric Aitala
 
Stepping into Usable Web
Stepping into Usable WebStepping into Usable Web
Stepping into Usable WebShajed Evan
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamAndreas Grabner
 
HH.JS - State of the Automation
HH.JS - State of the AutomationHH.JS - State of the Automation
HH.JS - State of the AutomationAdam Christian
 
We4IT lcty 2013 - keynote - worst practices - the best of the worst
We4IT lcty 2013 - keynote - worst practices - the best of the worstWe4IT lcty 2013 - keynote - worst practices - the best of the worst
We4IT lcty 2013 - keynote - worst practices - the best of the worstWe4IT Group
 
Frontend Engineer Toolbox
Frontend Engineer ToolboxFrontend Engineer Toolbox
Frontend Engineer ToolboxYnon Perek
 
Riding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
Riding The N Train: How we dismantled Groupon's Ruby on Rails MonolithRiding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
Riding The N Train: How we dismantled Groupon's Ruby on Rails MonolithSean McCullough
 

Similar to Introduction to jQuery Mobile (20)

jQuery Mobile, Backbone.js, and ASP.NET MVC
jQuery Mobile, Backbone.js, and ASP.NET MVCjQuery Mobile, Backbone.js, and ASP.NET MVC
jQuery Mobile, Backbone.js, and ASP.NET MVC
 
Using Data to Drive User Experiences
Using Data to Drive User ExperiencesUsing Data to Drive User Experiences
Using Data to Drive User Experiences
 
Get responsive in 30 minutes (WordCamp Sofia)
Get responsive in 30 minutes (WordCamp Sofia)Get responsive in 30 minutes (WordCamp Sofia)
Get responsive in 30 minutes (WordCamp Sofia)
 
jQuery Comes to XPages
jQuery Comes to XPagesjQuery Comes to XPages
jQuery Comes to XPages
 
jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep Dive
 
PhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or LessPhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or Less
 
WebSphere User Group UK: Larger Applications with Worklight
WebSphere User Group UK: Larger Applications with WorklightWebSphere User Group UK: Larger Applications with Worklight
WebSphere User Group UK: Larger Applications with Worklight
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 
jQuery Mobile Jump Start
jQuery Mobile Jump StartjQuery Mobile Jump Start
jQuery Mobile Jump Start
 
Groovy & Grails eXchange 2012 - Building an e-commerce business with gr8 tec...
Groovy & Grails eXchange 2012 - Building an  e-commerce business with gr8 tec...Groovy & Grails eXchange 2012 - Building an  e-commerce business with gr8 tec...
Groovy & Grails eXchange 2012 - Building an e-commerce business with gr8 tec...
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for Drupal
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for Drupal
 
Building Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBuilding Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on Azure
 
Drupal: Internet Lego - What Modules Do I Use?
Drupal: Internet Lego - What Modules Do I Use?Drupal: Internet Lego - What Modules Do I Use?
Drupal: Internet Lego - What Modules Do I Use?
 
Stepping into Usable Web
Stepping into Usable WebStepping into Usable Web
Stepping into Usable Web
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
 
HH.JS - State of the Automation
HH.JS - State of the AutomationHH.JS - State of the Automation
HH.JS - State of the Automation
 
We4IT lcty 2013 - keynote - worst practices - the best of the worst
We4IT lcty 2013 - keynote - worst practices - the best of the worstWe4IT lcty 2013 - keynote - worst practices - the best of the worst
We4IT lcty 2013 - keynote - worst practices - the best of the worst
 
Frontend Engineer Toolbox
Frontend Engineer ToolboxFrontend Engineer Toolbox
Frontend Engineer Toolbox
 
Riding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
Riding The N Train: How we dismantled Groupon's Ruby on Rails MonolithRiding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
Riding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
 

More from Troy Miles

Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web ServersTroy Miles
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot CampTroy Miles
 
AWS Lambda Function with Kotlin
AWS Lambda Function with KotlinAWS Lambda Function with Kotlin
AWS Lambda Function with KotlinTroy Miles
 
React Native One Day
React Native One DayReact Native One Day
React Native One DayTroy Miles
 
React Native Evening
React Native EveningReact Native Evening
React Native EveningTroy Miles
 
Intro to React
Intro to ReactIntro to React
Intro to ReactTroy Miles
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN StackTroy Miles
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application TestingTroy Miles
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?Troy Miles
 
Angular Weekend
Angular WeekendAngular Weekend
Angular WeekendTroy Miles
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScriptTroy Miles
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in ClojureTroy Miles
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-upTroy Miles
 
The JavaScript You Wished You Knew
The JavaScript You Wished You KnewThe JavaScript You Wished You Knew
The JavaScript You Wished You KnewTroy Miles
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Troy Miles
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutesTroy Miles
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEANTroy Miles
 
A Quick Intro to ReactiveX
A Quick Intro to ReactiveXA Quick Intro to ReactiveX
A Quick Intro to ReactiveXTroy Miles
 

More from Troy Miles (20)

Fast C++ Web Servers
Fast C++ Web ServersFast C++ Web Servers
Fast C++ Web Servers
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
 
AWS Lambda Function with Kotlin
AWS Lambda Function with KotlinAWS Lambda Function with Kotlin
AWS Lambda Function with Kotlin
 
React Native One Day
React Native One DayReact Native One Day
React Native One Day
 
React Native Evening
React Native EveningReact Native Evening
React Native Evening
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN Stack
 
Angular Application Testing
Angular Application TestingAngular Application Testing
Angular Application Testing
 
ReactJS.NET
ReactJS.NETReactJS.NET
ReactJS.NET
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
 
Angular Weekend
Angular WeekendAngular Weekend
Angular Weekend
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-up
 
The JavaScript You Wished You Knew
The JavaScript You Wished You KnewThe JavaScript You Wished You Knew
The JavaScript You Wished You Knew
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutes
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEAN
 
A Quick Intro to ReactiveX
A Quick Intro to ReactiveXA Quick Intro to ReactiveX
A Quick Intro to ReactiveX
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Introduction to jQuery Mobile

  • 1. Intro to jQuery Mobile South Bay Mobile User Group - 26 February 2013 Monday, February 25, 13
  • 3. Who Am I? • Troy Miles • Senior Software Engineer w/ 30+ years of experience • Mobile/Mobile Web • iOS, Android, & Windows Phone 7 Monday, February 25, 13
  • 5. Intermediate PhoneGap • Learn by doing • JS best practices, iScroll, Maps, Ajax + more • Saturday, May 18th - 9 AM to 6 PM • $99 - lunch & materials included • http://bit.ly/XlxzYp • CraveLab - Los Angeles Monday, February 25, 13
  • 6. You May Get Mad At Me • Sorry, in advance if I insult your favorite: company, device, or personality • I have nothing against any of these companies • I will gladly do a project for any of them, for the right price Monday, February 25, 13
  • 7. Our Agenda • The Mobile Space Today • Getting Started with jQuery Mobile • Understanding Page Architecture • Creating jQuery Mobile Forms • Working with Lists • jQuery Mobile Events Monday, February 25, 13
  • 8. Our Agenda • Version 1.3.0 • Packaging for Distribution Monday, February 25, 13
  • 9. The Mobile Space Today Monday, February 25, 13
  • 10. 85% of all US adults now own a mobile phone Monday, February 25, 13
  • 11. 56% of all mobile phone owners in the US access the internet. Monday, February 25, 13
  • 12. Did you know 80% of customers abandon a mobile site if they have a bad user experience? Monday, February 25, 13
  • 13. Web Apps Native Apps Can migrate web skills Longer learning curve One source base Many source bases Deploy when you want Deployment needs approval You choose when to update User chooses when to update No device memory used Uses device memory Difficult to monetize Monetization is built-in Restricted device access Full access to device hardware Slower Faster Monday, February 25, 13
  • 14. What is a Web App? • A web app is more than just a website • It incorporates app-like behavior • Think GMail or Google Maps Monday, February 25, 13
  • 15. 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.  Requires jQuery. Monday, February 25, 13
  • 16. From Web to Mobile • Your HTML/CSS skills are still valuable • Good design is more important than ever Monday, February 25, 13
  • 17. JQM & HTML5 • JQM doesn’t require you know HTML5 • JQM uses HTML5 when available • Prefers semantic markup: header, footer, section Monday, February 25, 13
  • 18. Getting Started with jQuery Mobile Monday, February 25, 13
  • 19. Downloading JQM • jquerymobile.com/download • Use the uncompressed version while developing • Use the minimized version for deployment • Get the correct version of jQuery Monday, February 25, 13
  • 20. Loading JQM <!DOCTYPE html> <html> <head> <title>Page Title</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/ jquery.mobile-1.3.0.min.css"/> <script src="http://code.jquery.com/jquery-1.9.1.min.js"> </script> <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"> </script> </head> Monday, February 25, 13
  • 21. Self-hosting vs. CDN • CDN = Content Delivery Network • Can speed up app load two ways: • CDN’s use edge servers • May be cached by other apps Monday, February 25, 13
  • 22. CDN Fallback Code <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"> </script> <script> window.jQuery || document.write('<script src="js/vendor/jquery-1.9.0.min.js"></ script>'); </script> Monday, February 25, 13
  • 23. Understanding Page Architecture Monday, February 25, 13
  • 24. Best Practices • Downloading is slow so, • Download as few files as possible • Download as little data as possible • Use a JS minifier Monday, February 25, 13
  • 25. JQM Pages • A single HTML page can contain many JQM Pages • This allows page transitions without server contact Monday, February 25, 13
  • 26. JQM Pages • Pages are denoted with data-role=”page” • Multiple JQM pages can be on an HTML page • Only one page is active at a time • $.mobile.activePage is the currently active page Monday, February 25, 13
  • 27. Page Transitions • Animate from one page to next • Only work on platforms that support CSS 3D transforms • Others will see only “fade” • Android below version 4 Monday, February 25, 13
  • 28. Page Transitions • fade • pop • flip • turn • flow • and more Monday, February 25, 13
  • 29. Toolbars • Supports HTML5 header/footer tags • Or via div tag with data-role • data-role=”header” • data-role=”footer” Monday, February 25, 13
  • 30. Positioning Toolbars • Toolbars will normally flow with the page • data-position=”fixed” • data-fullscreen=”true” Monday, February 25, 13
  • 31. Navbars • Denoted by data-role=”navbar” • When a link is clicked, it gets the active state (ui-btn-active) • JQM automatically sizes button • 5 or less buttons, single line • More than 5, two across Monday, February 25, 13
  • 32. Navbars • Can appear in headers • Or footers • Can be persisted • Can have icons Monday, February 25, 13
  • 33. Creating jQuery Mobile Forms Monday, February 25, 13
  • 34. Form Basics • Buttons • Sliders • Range Slider • Flip Switch • Checkboxes Monday, February 25, 13
  • 35. Selects • Select • Mini select • Custom select • Multi-slect with optgroups+ Monday, February 25, 13
  • 36. Text • Text input • Textarea • Number, date, tel, search • File • Password Monday, February 25, 13
  • 37. Getting Data to the Server Monday, February 25, 13
  • 38. Working with Lists Monday, February 25, 13
  • 39. Listviews • Unordered (ul) • Ordered (ol) • Linked • Inset • Filter • List dividers Monday, February 25, 13
  • 40. Listviews • Autodividers • Count bubbles • Icons • Thumbnails • Formatted content Monday, February 25, 13
  • 41. Nested listviews have been deprecated in version 1.3 - they will be removed in version 1.4. Monday, February 25, 13
  • 42. jQuery Mobile Events Monday, February 25, 13
  • 43. Events • Touch events • Orientation events • Scroll events • Page events Monday, February 25, 13
  • 44. Touch Events • swipe • swipeleft • swiperight • tap • taphold Monday, February 25, 13
  • 45. Orientation Change • orientationchange • Not supported natively universally Monday, February 25, 13
  • 46. Scroll Events • scrollstart • scrollstop Monday, February 25, 13
  • 47. Page Events • pageinit - use this instead of DOM ready() • pagehide • pageshow Monday, February 25, 13
  • 49. New Features • Panels • Responsive tables • Range sliders • Responsive grids • Deprecated: nested lists Monday, February 25, 13
  • 50. Packaging for Distribution Monday, February 25, 13
  • 51. Hybrid Apps • HTML5 web app • Wrapped in a native app • Usually adds a way to access native features • Distributable in most app stores Monday, February 25, 13
  • 52. Hybrid Apps Can migrate web skills One source base Deployment needs approval User chooses when to update Uses device memory Monetization is possible Access to some device hardware Faster than web, slower than device Monday, February 25, 13
  • 53. Ways to Hybridize • PhoneGap • Icenium • Others Monday, February 25, 13
  • 54. PhoneGap • Created by Nitobi, acquired by Adobe • Open sourced as Apache Cordova • PhoneGap is a trademark of Adobe Monday, February 25, 13
  • 55. Icenium • Also based on Apache Cordova • Built by Telerik • PhoneGap code runs unmodified • Deploy directly to device • Includes Kendo UI Mobile • Free until May 1st Monday, February 25, 13
  • 56. Others • Appcelerator Titanium • Trigger.io • CodeName One • (and still more) Monday, February 25, 13
  • 57. Links • jquerymobile.com • jquerymobile.com/themeroller/ • phonegap.com • www.icenium.com Monday, February 25, 13
  • 58. My Links • @therockncoder • rockncoder@gmail.com • http://therockncoder.blogspot.com/ • http://www.youtube.com/user/rockncoder • https://github.com/Rockncoder Monday, February 25, 13