SlideShare uma empresa Scribd logo
1 de 89
Baixar para ler offline
jQuery Mobile
Jump Start
Troy Miles aka @therockncoder
Saturday, June 15, 13
Want more? Follow me for more tutorials
and source code.
@therockncoder
Saturday, June 15, 13
Check out my videos:
www.youtube.com/rockncoder
Saturday, June 15, 13
Source code for my tutorials hosted on
GitHub @
https://github.com/Rockncoder
Saturday, June 15, 13
Before We Begin
• This class will move fast
• Don’t worry if you don’t complete an
exercise
• The exercises and solutions are available
for download
• All slides are available for download
Saturday, June 15, 13
What Are Going To
Do?
We are going to learn about jQuery Mobile by examining a
working application.We aren’t going to decompose each
line of code, instead we will examine each major area of
functionality.
Saturday, June 15, 13
Coffee+Coffee
• Listview
• Location/Maps
• Ajax
• Templates
Saturday, June 15, 13
Today’s Agenda
• 0830-0900 Setup
• 0900-0930 HTML Overview
• 0930-1000 JavaScript Overview
• 1015-1030 Morning Break
• 1000-1030 Ajax pt. 1
• 1045-1115 Ajax pt. 2
Saturday, June 15, 13
Today’s Agenda
• 1115-1145 Listviews
• 1145-1215 Templates
• 1215-1245 Lunch
• 1245-1345 Location & Maps
• 1400-1445 Responsive Design
• 1445-1515 Media & Charts
Saturday, June 15, 13
“You have to learn to fake
the funk before you can
begin to make the funk.”
Saturday, June 15, 13
HTML5 Overview
• Fast Facts
• Best Practices
• Exercise - Creating a semantic SPA
• Summary
Saturday, June 15, 13
Fast Facts
• HTML5 not official but in wide use
• Well supported by smart phones: iPhone,
Android, Blackberry, and WP8
• W3C analyzed millions of web pages to
decide on new semantic tags
• SPA - single page application
Saturday, June 15, 13
Best Practices
• Use semantic tags for clarity
• Place multiple pages together for speed
• Use page transitions for a better UX
Saturday, June 15, 13
Exercise #1
Semantic SPA
• Start with the exercise folder
• Add a second JQM page
• Use transitions to smooth page change
Saturday, June 15, 13
Summary
• The new semantic tags in HTML5 increase
clarity
• jQuery Mobile includes attributes to
improve app look and feel
Saturday, June 15, 13
“Java is to JavaScript as
Car is to Carpet.”
Saturday, June 15, 13
JavaScript Overview
• Fast Facts
• The Power Trio
• Events
• Best Practices
• Exercise - Create page code
• Summary
Saturday, June 15, 13
Fast Facts
• Created by Brendan Eich of Netscape
• Originally named LiveScript, but renamed
for marketing purposes
• Based on Self and Scheme languages, but
not C
Saturday, June 15, 13
The Power Trio
• Objects
• Functions
• Closures
Saturday, June 15, 13
Objects
• Are associative arrays or dictionaries
consisting of key/value pairs
• The key can be ANY string
• Can be modified at run-time
• No difference between dot and bracket
notations
Saturday, June 15, 13
Functions
• Are first-class entities
• They are objects themselves and can have
properties and methods
• The provide the primary method of
information hiding
• Can be nested and passed as parameters
Saturday, June 15, 13
Closures
• A very tough concept to grasp
• A closure is a special kind of object that
combines two things: a function, and the
environment in which that function was
created.
Saturday, June 15, 13
Events
• A loosely couple way of component
communication
• Receive or handle events
• Transmit or trigger events
• In jQuery .on() and .off() are preferred
Saturday, June 15, 13
Best Practices
• Minimize the use of global memory
• Wrap code in functions to protect it
• Load JS files last for speed*
• Use events to avoid tight coupling
Saturday, June 15, 13
Exercise #2
Create Page Code
• Start from the exercise #2 code
• Create code to hook events for both page
1 and 2
Saturday, June 15, 13
Summary
• JavaScript in the browser is a very dirty
environment
• Apps must be pro-active in order to
function well
• Always write your code in a structured way
Saturday, June 15, 13
Why not jQuery 2.0?
• jQuery 2.0 is available and is smaller and
faster since it no longer supports IE
versions 6, 7, and 8. Yet we use version 1.91
in the app, why? The jQuery Mobile team
has not yet upgraded JQM to support it.
Saturday, June 15, 13
Ajax pt. 1
• Fast Facts
• jQuery ajax()
• Promise
• Data Formats
• Exercise - Getting data from the server
• Summary
Saturday, June 15, 13
Fast Facts
• The web designed to load complete HTML
pages
• Microsoft created XMLHTTP object in 1998
• Mozilla based their XMLHttpRequest object
on it in 2000
• The XMLHttpRequest object became a
defacto standard
Saturday, June 15, 13
.ajax()
• Before the introduction of Prototype &
jQuery in 2006 communication with the
server was browser specic
• Performs an async HTTP request
• .ajax(url, [settings])
Saturday, June 15, 13
.promise()
• Returns a Promise object that is resolved
once all actions complete
• Considered easier to ready than callbacks
Saturday, June 15, 13
Data Formats
• There two standard data formats:
• JSON - JavaScript Object Notation
• XML - eXtensible Markup Language
• JSON is the lighter of the two
Saturday, June 15, 13
JSON
• Created by Douglas Crockford in 2001
• JSON.stringify to serialize
• JSON.parse to deserialize
• Officially only double quotes supported
Saturday, June 15, 13
Best Practices
• Always be prepared for failure
• Prefer chunky over chatty
• Prefer JSON over XML
• Use double quotes in JSON
Saturday, June 15, 13
Exercise #3
Getting Data
• Starting from exercise #3
• Make a call toYP API
• Use an alert or console.log to display
results
Saturday, June 15, 13
Summary
• Its ability to do cross-browser Ajax is one
of jQuery’s most popular features
• Ajax data to/from RESTful web services is
very popular
Saturday, June 15, 13
Ajax pt. 2
• HTTP Traffic Watching
• Chrome & Fiddler
• Exercise - Paging, Getting more data
• Summary
Saturday, June 15, 13
HTTP Trafc Watching
• Issues with Ajax often cause bugs
• Their async nature makes can make fixing
these bugs challenging
• There are tools to help
Saturday, June 15, 13
Chrome & Fiddler
• Chrome includes tools to watch network
trafc (lightweight)
• Fiddler a free tool from Telerik is also
available (super)
• Fiddler is only available for the PC
Saturday, June 15, 13
Exercise #4
Getting more data
• Starting from exercise #4
• Make more calls to theYP API which
request more data
• Again use alert or console.log to display
results
Saturday, June 15, 13
Summary
• Debugging Ajax issues can be tough but
there are tools to help
• Often the amount of data available exceeds
that which can be easily handled
Saturday, June 15, 13
Listviews
• Fast Facts
• Best Practices
• Vertical Scrolling
• Exercise - Creating list from data
• Summary
Saturday, June 15, 13
Fast Facts
• Listviews are coded as either HTML
unordered (ul) or ordered (ol) lists
• Can be used as menus, settings or simply
display a list of items
Saturday, June 15, 13
Vertical Scrolling
• JQM supports vertical scrolling as does any
other web site
• Can also fix the position of the header and
footer
Saturday, June 15, 13
Exercise #5
Creating a Listview
• Start with exercise #5
• Finish the listview generation code
• Remember to call the refresh method
Saturday, June 15, 13
Summary
• JQM out of the box supports vertical
scrolling
• The end result is less than app-like however
Saturday, June 15, 13
iScroll
• Fast Facts
• Best Practices
• Exercise - Implement pull to refresh
• Summary
Saturday, June 15, 13
Fast Facts
• iScroll4 created by Matteo Spinelli
• Source code is MIT Licensed
• Works by using CSS3 transformation
• Number of scroll regions only limited by
memory
Saturday, June 15, 13
Best Practices
• Release no longer needed iScrolls with the
destroy() method
Saturday, June 15, 13
Exercise #6
Smooth Scrolling
• Start with exercise #6
• Finished the smooth scrolling method
• If you have trouble, look at the working
“cc” app
Saturday, June 15, 13
Summary
• Smooth scrolling improves both UI and UX
• It is relatively easy to replace traditional
HTML scrolling
Saturday, June 15, 13
Templates
• Fast Facts
• Handlebars
• Best Practices
• Exercise - Rewrite the code to use
templates
• Summary
Saturday, June 15, 13
Fast Facts
• Mixing HTML with JavaScript violates
separation of concerns
• Templating engines allow for the inclusion
of HTML which can be modied easily
• HTML by definition does not operate on
unknown tags
Saturday, June 15, 13
Handlebars.js
• There are many of templating engines
• Handlebars.js works on both the client and
the server
• The project is maintain by the same team
as Ember.js
Saturday, June 15, 13
Best Practices
• HTML is content
• CSS is presentation
• JavaScript is behavior
• Separation of Concerns (SOC) states not
to mix any of the three
Saturday, June 15, 13
Exercise #7
Using Templates
• Start from exercise #7
• Replace the use of JS strings with a
template
Saturday, June 15, 13
Summary
• Using templates keeps us from violating
separation of concerns
• The handlebars templates are easy for both
engineers and designers to work with
Saturday, June 15, 13
Geolocation
• Fast Facts
• The Geolocation Object
• Best Practices
• Exercise - Get location
• Summary
Saturday, June 15, 13
Fast Facts
• Not actually part of HTML5
• User must grant web site access to the
geolocation data
• Can be a significant drain on batteries
• Can take a significant amount of time
before location async return
Saturday, June 15, 13
The Geolocation Object
• Part of the navigator object, which has no
ofcial standard
• Three methods: getCurrentPosition(),
watchPosition(), clearWatch()
Saturday, June 15, 13
Best Practices
• People have just concerns about location
privacy
• Provide an alternative if possible
• Gracefully fail it not able to continue
• Remember to clear unneeded
watchPositions
Saturday, June 15, 13
Exercise #8
Getting Location
• Starting with exercise #8
• Use a console.log to display the current
latitude and longitude
Saturday, June 15, 13
Summary
• Geolocation is support by most current
browsers, mobile and desktop
• Power used Geolocation can drain power
and tax CPU
Saturday, June 15, 13
Maps
• Maps (Google Maps)
• Exercise - Display our current location
• Annotating Maps
• Exercise - Displaying cafe location
• Summary
Saturday, June 15, 13
Google Maps
• There are many publicly available map
providers
• Google was chosen because of its
accuracy, simplicity, and cost (free)
• To use simply include a file, specify a div,
and call the draw map code
Saturday, June 15, 13
Exercise #9
Displaying a Map
• Start with exercise #9
• The Maps include file is present
• The map div is displayed on the page
• Write the code to make the map appear
Saturday, June 15, 13
Map Annotation
• Markers identify locations on the map
• You can use Google’s markers or your own
• Markers can have click events
Saturday, June 15, 13
Exercise #10
Annotating a Map
• Start with exercise #10
• Place a maker on the map at:
• latitude = 33.8226203918457
• longitude= -118.331848144531
Saturday, June 15, 13
Summary
• Most users expect to see a map wherever
location information is displayed
• Google Maps is the most popular map
provider (75% of web sites)
Saturday, June 15, 13
Responsive Design
• Fast Facts
• Phone vs Tablet
• Grids, Divs, and Tables
• Exercise - Make display responsive
• Summary
Saturday, June 15, 13
Fast Facts
• Responsive design means supporting
multiple device resolutions from a single
application
• JQM added the Grid object to support
responsive design
• JQM 1.3.0 added tables
Saturday, June 15, 13
Best Practices
• Be careful of one size fits all solutions
• The needs of your mobile user maybe
different than those on desktop
• Always keep bandwidth restrictions in mind
Saturday, June 15, 13
Exercise #11
Making a Responsive Design
• Start with exercise #11
• Adjust the values of the media queries to
see how the app adjust
Saturday, June 15, 13
Summary
• Responsive Design is difficult and must be
thoroughly planned
• A solution for one web site will not
necessarily work for another
Saturday, June 15, 13
Media
• Fast Facts
• Taking a picture (yes, from a mobile
browser)
• Exercise - Upload a picture to a server
• Summary
Saturday, June 15, 13
Fast Facts
• Modern smart phones treat the input
type=”file” as the camera
• Can take picture or video or choose from
photo album
• The real work is done on the server
Saturday, June 15, 13
Taking and Uploading a
Picture
• Must turn off JQM’s Ajax with data-
ajax=”false”
• Use a input type=file with form post with
enctype=”multipart/form-data”
Saturday, June 15, 13
Exercise #12
Uploading a Picture
• Start with exercise #12
• Complete form tag for upload
• You will not actually be able to submit the
photo since that requires a server
Saturday, June 15, 13
Summary
• Many mobile browser support photo
upload, but not all
• Can upload photo and video but keep in
mind how much memory is required
• Can also choose from photos in the user’s
album
Saturday, June 15, 13
Charts
• Fast Facts
• jqPlots
• Exercise - Create a chart from hours of
operation
• Summary
Saturday, June 15, 13
Fast Facts
• Humans understand visual faster than
written
• Charts are a standard way to render
numeric data
• There are lots of charting solutions for the
web
Saturday, June 15, 13
jqPlot
• An open source project by Chris Leonello
• A jQuery widget
• Supports its own plug-in
• Rendered completely on the client
Saturday, June 15, 13
Best Practices
• Charts are computationally expensive to
render
• It is possible to render charts dynamically,
but not recommended
Saturday, June 15, 13
Exercise #13
Charting Data
• Start from exercise #13
• Implement bar chart to display hours of
operation of coffee shops
Saturday, June 15, 13
Summary
• jqPlot is free and easy use charting solution
Saturday, June 15, 13
Links
• jquerymobile.com
• jquery.com
• cubiq.org/iscroll-4
• jqplot.com
• http://handlebarsjs.com/
• callbackhell.com
• garann.github.io/template-chooser/
Saturday, June 15, 13
My Links
• @therockncoder
• https://github.com/Rockncoder
• http://youtube.com/rockncoder
• http://slideshare.net/rockncoder
Saturday, June 15, 13
Course Summary
• When in doubt follow best practices
• Build a Coffee+Coffee app of your own
• Still lots we haven’t covered
Saturday, June 15, 13
jQuery Mobile Advance
• MV* Frameworks
• Responsive Design
• Deep Templating
• Memory Management
• Unit Testing
• Nag Phillip until he schedules it!
Saturday, June 15, 13

Mais conteĂşdo relacionado

Mais procurados

jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep DiveTroy Miles
 
Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Christian Heilmann
 
Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015Christian Heilmann
 
The ES6 Conundrum - All Things Open 2015
The ES6 Conundrum - All Things Open 2015The ES6 Conundrum - All Things Open 2015
The ES6 Conundrum - All Things Open 2015Christian Heilmann
 
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105 Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105 Christian Heilmann
 
Making ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCoreMaking ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCoreChristian Heilmann
 
Treating Infrastructure as Garbage
Treating Infrastructure as GarbageTreating Infrastructure as Garbage
Treating Infrastructure as GarbageDatadog
 
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcutUpgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcutChristian Heilmann
 
SBTUG 29 September 2010 Agenda
SBTUG 29 September 2010 AgendaSBTUG 29 September 2010 Agenda
SBTUG 29 September 2010 AgendaCraig Bailey
 
How to: Reporting Issues
How to: Reporting IssuesHow to: Reporting Issues
How to: Reporting IssuesJohn Havlik
 
All the small things… - Awwwards 2016
All the small things… - Awwwards 2016All the small things… - Awwwards 2016
All the small things… - Awwwards 2016Christian Heilmann
 
5 Quick JavaScript Performance Improvement Tips
5 Quick JavaScript Performance Improvement Tips5 Quick JavaScript Performance Improvement Tips
5 Quick JavaScript Performance Improvement TipsTroy Miles
 
High performance java script why everything youve been taught is wrong
High performance java script why everything youve been taught is wrongHigh performance java script why everything youve been taught is wrong
High performance java script why everything youve been taught is wrongTao Gao
 

Mais procurados (13)

jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep Dive
 
Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date.
 
Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015
 
The ES6 Conundrum - All Things Open 2015
The ES6 Conundrum - All Things Open 2015The ES6 Conundrum - All Things Open 2015
The ES6 Conundrum - All Things Open 2015
 
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105 Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
 
Making ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCoreMaking ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCore
 
Treating Infrastructure as Garbage
Treating Infrastructure as GarbageTreating Infrastructure as Garbage
Treating Infrastructure as Garbage
 
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcutUpgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
 
SBTUG 29 September 2010 Agenda
SBTUG 29 September 2010 AgendaSBTUG 29 September 2010 Agenda
SBTUG 29 September 2010 Agenda
 
How to: Reporting Issues
How to: Reporting IssuesHow to: Reporting Issues
How to: Reporting Issues
 
All the small things… - Awwwards 2016
All the small things… - Awwwards 2016All the small things… - Awwwards 2016
All the small things… - Awwwards 2016
 
5 Quick JavaScript Performance Improvement Tips
5 Quick JavaScript Performance Improvement Tips5 Quick JavaScript Performance Improvement Tips
5 Quick JavaScript Performance Improvement Tips
 
High performance java script why everything youve been taught is wrong
High performance java script why everything youve been taught is wrongHigh performance java script why everything youve been taught is wrong
High performance java script why everything youve been taught is wrong
 

Destaque

Introduction to Mobile Game Programming with Cocos2d-JS
Introduction to Mobile Game Programming with Cocos2d-JSIntroduction to Mobile Game Programming with Cocos2d-JS
Introduction to Mobile Game Programming with Cocos2d-JSTroy Miles
 
Intro to Game Development and the Game Industry (She Codes TLV)
Intro to Game Development and the Game Industry (She Codes TLV)Intro to Game Development and the Game Industry (She Codes TLV)
Intro to Game Development and the Game Industry (She Codes TLV)Nataly Eliyahu
 
The World of Social Objects
The World of Social ObjectsThe World of Social Objects
The World of Social ObjectsJESS3
 
End of year review/preview
End of year review/previewEnd of year review/preview
End of year review/previewNigelG
 
Frameworks
FrameworksFrameworks
FrameworksRyan Levick
 
Building jQuery Mobile Web Apps
Building jQuery Mobile Web AppsBuilding jQuery Mobile Web Apps
Building jQuery Mobile Web AppsOperation Mobile
 
Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and RenderingStoyan Stefanov
 
JavaScript is everywhere
JavaScript is everywhereJavaScript is everywhere
JavaScript is everywhereStoyan Stefanov
 
Mapping History on Open Street Map
Mapping History on Open Street MapMapping History on Open Street Map
Mapping History on Open Street Mapfrankieroberto
 
5 Mistakes of Massive CSS
5 Mistakes of Massive CSS5 Mistakes of Massive CSS
5 Mistakes of Massive CSSNicole Sullivan
 
Menoovr
Menoovr Menoovr
Menoovr menoovr
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynotedmethvin
 
Hoppala at O'Reilly Where 2.0 Conference
Hoppala at O'Reilly Where 2.0 ConferenceHoppala at O'Reilly Where 2.0 Conference
Hoppala at O'Reilly Where 2.0 ConferenceMarc RenĂŠ Gardeya
 
Open Standards in the Walled Garden
Open Standards in the Walled GardenOpen Standards in the Walled Garden
Open Standards in the Walled Gardendigitalbindery
 
Demand Media
Demand MediaDemand Media
Demand MediaWeb 2.0 Expo
 

Destaque (20)

Game Development: an Unexpected Journey
Game Development: an Unexpected JourneyGame Development: an Unexpected Journey
Game Development: an Unexpected Journey
 
Introduction to Mobile Game Programming with Cocos2d-JS
Introduction to Mobile Game Programming with Cocos2d-JSIntroduction to Mobile Game Programming with Cocos2d-JS
Introduction to Mobile Game Programming with Cocos2d-JS
 
Intro to Game Development and the Game Industry (She Codes TLV)
Intro to Game Development and the Game Industry (She Codes TLV)Intro to Game Development and the Game Industry (She Codes TLV)
Intro to Game Development and the Game Industry (She Codes TLV)
 
Game Balancing & Its Automation
Game Balancing & Its AutomationGame Balancing & Its Automation
Game Balancing & Its Automation
 
The World of Social Objects
The World of Social ObjectsThe World of Social Objects
The World of Social Objects
 
End of year review/preview
End of year review/previewEnd of year review/preview
End of year review/preview
 
Frameworks
FrameworksFrameworks
Frameworks
 
Building jQuery Mobile Web Apps
Building jQuery Mobile Web AppsBuilding jQuery Mobile Web Apps
Building jQuery Mobile Web Apps
 
The jQuery Divide
The jQuery DivideThe jQuery Divide
The jQuery Divide
 
Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and Rendering
 
JavaScript is everywhere
JavaScript is everywhereJavaScript is everywhere
JavaScript is everywhere
 
Mapping History on Open Street Map
Mapping History on Open Street MapMapping History on Open Street Map
Mapping History on Open Street Map
 
Unit testing
Unit testingUnit testing
Unit testing
 
Impact of Open Source
Impact of Open SourceImpact of Open Source
Impact of Open Source
 
5 Mistakes of Massive CSS
5 Mistakes of Massive CSS5 Mistakes of Massive CSS
5 Mistakes of Massive CSS
 
Menoovr
Menoovr Menoovr
Menoovr
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynote
 
Hoppala at O'Reilly Where 2.0 Conference
Hoppala at O'Reilly Where 2.0 ConferenceHoppala at O'Reilly Where 2.0 Conference
Hoppala at O'Reilly Where 2.0 Conference
 
Open Standards in the Walled Garden
Open Standards in the Walled GardenOpen Standards in the Walled Garden
Open Standards in the Walled Garden
 
Demand Media
Demand MediaDemand Media
Demand Media
 

Semelhante a jQuery Mobile Jump Start

PhoneGap in a Day
PhoneGap in a DayPhoneGap in a Day
PhoneGap in a DayTroy Miles
 
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
 
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
 
Frontend Engineer Toolbox
Frontend Engineer ToolboxFrontend Engineer Toolbox
Frontend Engineer ToolboxYnon Perek
 
jQuery Comes to XPages
jQuery Comes to XPagesjQuery Comes to XPages
jQuery Comes to XPagesTeamstudio
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSPablo Godel
 
AppEngine Performance Tuning
AppEngine Performance TuningAppEngine Performance Tuning
AppEngine Performance TuningDavid Chen
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptTroy Miles
 
Writing SaltStack Modules - OpenWest 2013
Writing SaltStack Modules - OpenWest 2013Writing SaltStack Modules - OpenWest 2013
Writing SaltStack Modules - OpenWest 2013SaltStack
 
Selling Faster: Mobile Performance Tips for E-Commerce Websites
Selling Faster: Mobile Performance Tips for E-Commerce WebsitesSelling Faster: Mobile Performance Tips for E-Commerce Websites
Selling Faster: Mobile Performance Tips for E-Commerce WebsitesMobify
 
Sencha Touch in Action
Sencha Touch in Action Sencha Touch in Action
Sencha Touch in Action Patrick Sheridan
 
PhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or LessPhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or LessTroy Miles
 
XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013Tim Clark
 
Action controller
Action controllerAction controller
Action controllerStephen Nguyen
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design PatternsYnon Perek
 
Proud to be polyglot!
Proud to be polyglot!Proud to be polyglot!
Proud to be polyglot!NLJUG
 
App Engine Meetup
App Engine MeetupApp Engine Meetup
App Engine MeetupJohn Woodell
 
Digibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalableDigibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalableLizzie Hodgson
 
Ab(Using) the MetaCPAN API for Fun and Profit v2013
Ab(Using) the MetaCPAN API for Fun and Profit v2013Ab(Using) the MetaCPAN API for Fun and Profit v2013
Ab(Using) the MetaCPAN API for Fun and Profit v2013Olaf Alders
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby ConferenceJohn Woodell
 

Semelhante a jQuery Mobile Jump Start (20)

PhoneGap in a Day
PhoneGap in a DayPhoneGap in a Day
PhoneGap in a Day
 
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
 
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...
 
Frontend Engineer Toolbox
Frontend Engineer ToolboxFrontend Engineer Toolbox
Frontend Engineer Toolbox
 
jQuery Comes to XPages
jQuery Comes to XPagesjQuery Comes to XPages
jQuery Comes to XPages
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
 
AppEngine Performance Tuning
AppEngine Performance TuningAppEngine Performance Tuning
AppEngine Performance Tuning
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Writing SaltStack Modules - OpenWest 2013
Writing SaltStack Modules - OpenWest 2013Writing SaltStack Modules - OpenWest 2013
Writing SaltStack Modules - OpenWest 2013
 
Selling Faster: Mobile Performance Tips for E-Commerce Websites
Selling Faster: Mobile Performance Tips for E-Commerce WebsitesSelling Faster: Mobile Performance Tips for E-Commerce Websites
Selling Faster: Mobile Performance Tips for E-Commerce Websites
 
Sencha Touch in Action
Sencha Touch in Action Sencha Touch in Action
Sencha Touch in Action
 
PhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or LessPhoneGap in 60 Minutes or Less
PhoneGap in 60 Minutes or Less
 
XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013XPages Blast - Lotusphere 2013
XPages Blast - Lotusphere 2013
 
Action controller
Action controllerAction controller
Action controller
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design Patterns
 
Proud to be polyglot!
Proud to be polyglot!Proud to be polyglot!
Proud to be polyglot!
 
App Engine Meetup
App Engine MeetupApp Engine Meetup
App Engine Meetup
 
Digibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalableDigibury: SciVisum - Making your website fast - and scalable
Digibury: SciVisum - Making your website fast - and scalable
 
Ab(Using) the MetaCPAN API for Fun and Profit v2013
Ab(Using) the MetaCPAN API for Fun and Profit v2013Ab(Using) the MetaCPAN API for Fun and Profit v2013
Ab(Using) the MetaCPAN API for Fun and Profit v2013
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
 

Mais de 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
 
ReactJS.NET
ReactJS.NETReactJS.NET
ReactJS.NETTroy 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
 

Mais de 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
 

Último

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
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
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 

Último (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
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
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 

jQuery Mobile Jump Start

  • 1. jQuery Mobile Jump Start Troy Miles aka @therockncoder Saturday, June 15, 13
  • 2. Want more? Follow me for more tutorials and source code. @therockncoder Saturday, June 15, 13
  • 3. Check out my videos: www.youtube.com/rockncoder Saturday, June 15, 13
  • 4. Source code for my tutorials hosted on GitHub @ https://github.com/Rockncoder Saturday, June 15, 13
  • 5. Before We Begin • This class will move fast • Don’t worry if you don’t complete an exercise • The exercises and solutions are available for download • All slides are available for download Saturday, June 15, 13
  • 6. What Are Going To Do? We are going to learn about jQuery Mobile by examining a working application.We aren’t going to decompose each line of code, instead we will examine each major area of functionality. Saturday, June 15, 13
  • 7. Coffee+Coffee • Listview • Location/Maps • Ajax • Templates Saturday, June 15, 13
  • 8. Today’s Agenda • 0830-0900 Setup • 0900-0930 HTML Overview • 0930-1000 JavaScript Overview • 1015-1030 Morning Break • 1000-1030 Ajax pt. 1 • 1045-1115 Ajax pt. 2 Saturday, June 15, 13
  • 9. Today’s Agenda • 1115-1145 Listviews • 1145-1215 Templates • 1215-1245 Lunch • 1245-1345 Location & Maps • 1400-1445 Responsive Design • 1445-1515 Media & Charts Saturday, June 15, 13
  • 10. “You have to learn to fake the funk before you can begin to make the funk.” Saturday, June 15, 13
  • 11. HTML5 Overview • Fast Facts • Best Practices • Exercise - Creating a semantic SPA • Summary Saturday, June 15, 13
  • 12. Fast Facts • HTML5 not ofcial but in wide use • Well supported by smart phones: iPhone, Android, Blackberry, and WP8 • W3C analyzed millions of web pages to decide on new semantic tags • SPA - single page application Saturday, June 15, 13
  • 13. Best Practices • Use semantic tags for clarity • Place multiple pages together for speed • Use page transitions for a better UX Saturday, June 15, 13
  • 14. Exercise #1 Semantic SPA • Start with the exercise folder • Add a second JQM page • Use transitions to smooth page change Saturday, June 15, 13
  • 15. Summary • The new semantic tags in HTML5 increase clarity • jQuery Mobile includes attributes to improve app look and feel Saturday, June 15, 13
  • 16. “Java is to JavaScript as Car is to Carpet.” Saturday, June 15, 13
  • 17. JavaScript Overview • Fast Facts • The Power Trio • Events • Best Practices • Exercise - Create page code • Summary Saturday, June 15, 13
  • 18. Fast Facts • Created by Brendan Eich of Netscape • Originally named LiveScript, but renamed for marketing purposes • Based on Self and Scheme languages, but not C Saturday, June 15, 13
  • 19. The Power Trio • Objects • Functions • Closures Saturday, June 15, 13
  • 20. Objects • Are associative arrays or dictionaries consisting of key/value pairs • The key can be ANY string • Can be modied at run-time • No difference between dot and bracket notations Saturday, June 15, 13
  • 21. Functions • Are rst-class entities • They are objects themselves and can have properties and methods • The provide the primary method of information hiding • Can be nested and passed as parameters Saturday, June 15, 13
  • 22. Closures • A very tough concept to grasp • A closure is a special kind of object that combines two things: a function, and the environment in which that function was created. Saturday, June 15, 13
  • 23. Events • A loosely couple way of component communication • Receive or handle events • Transmit or trigger events • In jQuery .on() and .off() are preferred Saturday, June 15, 13
  • 24. Best Practices • Minimize the use of global memory • Wrap code in functions to protect it • Load JS les last for speed* • Use events to avoid tight coupling Saturday, June 15, 13
  • 25. Exercise #2 Create Page Code • Start from the exercise #2 code • Create code to hook events for both page 1 and 2 Saturday, June 15, 13
  • 26. Summary • JavaScript in the browser is a very dirty environment • Apps must be pro-active in order to function well • Always write your code in a structured way Saturday, June 15, 13
  • 27. Why not jQuery 2.0? • jQuery 2.0 is available and is smaller and faster since it no longer supports IE versions 6, 7, and 8. Yet we use version 1.91 in the app, why? The jQuery Mobile team has not yet upgraded JQM to support it. Saturday, June 15, 13
  • 28. Ajax pt. 1 • Fast Facts • jQuery ajax() • Promise • Data Formats • Exercise - Getting data from the server • Summary Saturday, June 15, 13
  • 29. Fast Facts • The web designed to load complete HTML pages • Microsoft created XMLHTTP object in 1998 • Mozilla based their XMLHttpRequest object on it in 2000 • The XMLHttpRequest object became a defacto standard Saturday, June 15, 13
  • 30. .ajax() • Before the introduction of Prototype & jQuery in 2006 communication with the server was browser specic • Performs an async HTTP request • .ajax(url, [settings]) Saturday, June 15, 13
  • 31. .promise() • Returns a Promise object that is resolved once all actions complete • Considered easier to ready than callbacks Saturday, June 15, 13
  • 32. Data Formats • There two standard data formats: • JSON - JavaScript Object Notation • XML - eXtensible Markup Language • JSON is the lighter of the two Saturday, June 15, 13
  • 33. JSON • Created by Douglas Crockford in 2001 • JSON.stringify to serialize • JSON.parse to deserialize • Ofcially only double quotes supported Saturday, June 15, 13
  • 34. Best Practices • Always be prepared for failure • Prefer chunky over chatty • Prefer JSON over XML • Use double quotes in JSON Saturday, June 15, 13
  • 35. Exercise #3 Getting Data • Starting from exercise #3 • Make a call toYP API • Use an alert or console.log to display results Saturday, June 15, 13
  • 36. Summary • Its ability to do cross-browser Ajax is one of jQuery’s most popular features • Ajax data to/from RESTful web services is very popular Saturday, June 15, 13
  • 37. Ajax pt. 2 • HTTP Trafc Watching • Chrome & Fiddler • Exercise - Paging, Getting more data • Summary Saturday, June 15, 13
  • 38. HTTP Trafc Watching • Issues with Ajax often cause bugs • Their async nature makes can make xing these bugs challenging • There are tools to help Saturday, June 15, 13
  • 39. Chrome & Fiddler • Chrome includes tools to watch network trafc (lightweight) • Fiddler a free tool from Telerik is also available (super) • Fiddler is only available for the PC Saturday, June 15, 13
  • 40. Exercise #4 Getting more data • Starting from exercise #4 • Make more calls to theYP API which request more data • Again use alert or console.log to display results Saturday, June 15, 13
  • 41. Summary • Debugging Ajax issues can be tough but there are tools to help • Often the amount of data available exceeds that which can be easily handled Saturday, June 15, 13
  • 42. Listviews • Fast Facts • Best Practices • Vertical Scrolling • Exercise - Creating list from data • Summary Saturday, June 15, 13
  • 43. Fast Facts • Listviews are coded as either HTML unordered (ul) or ordered (ol) lists • Can be used as menus, settings or simply display a list of items Saturday, June 15, 13
  • 44. Vertical Scrolling • JQM supports vertical scrolling as does any other web site • Can also x the position of the header and footer Saturday, June 15, 13
  • 45. Exercise #5 Creating a Listview • Start with exercise #5 • Finish the listview generation code • Remember to call the refresh method Saturday, June 15, 13
  • 46. Summary • JQM out of the box supports vertical scrolling • The end result is less than app-like however Saturday, June 15, 13
  • 47. iScroll • Fast Facts • Best Practices • Exercise - Implement pull to refresh • Summary Saturday, June 15, 13
  • 48. Fast Facts • iScroll4 created by Matteo Spinelli • Source code is MIT Licensed • Works by using CSS3 transformation • Number of scroll regions only limited by memory Saturday, June 15, 13
  • 49. Best Practices • Release no longer needed iScrolls with the destroy() method Saturday, June 15, 13
  • 50. Exercise #6 Smooth Scrolling • Start with exercise #6 • Finished the smooth scrolling method • If you have trouble, look at the working “cc” app Saturday, June 15, 13
  • 51. Summary • Smooth scrolling improves both UI and UX • It is relatively easy to replace traditional HTML scrolling Saturday, June 15, 13
  • 52. Templates • Fast Facts • Handlebars • Best Practices • Exercise - Rewrite the code to use templates • Summary Saturday, June 15, 13
  • 53. Fast Facts • Mixing HTML with JavaScript violates separation of concerns • Templating engines allow for the inclusion of HTML which can be modied easily • HTML by denition does not operate on unknown tags Saturday, June 15, 13
  • 54. Handlebars.js • There are many of templating engines • Handlebars.js works on both the client and the server • The project is maintain by the same team as Ember.js Saturday, June 15, 13
  • 55. Best Practices • HTML is content • CSS is presentation • JavaScript is behavior • Separation of Concerns (SOC) states not to mix any of the three Saturday, June 15, 13
  • 56. Exercise #7 Using Templates • Start from exercise #7 • Replace the use of JS strings with a template Saturday, June 15, 13
  • 57. Summary • Using templates keeps us from violating separation of concerns • The handlebars templates are easy for both engineers and designers to work with Saturday, June 15, 13
  • 58. Geolocation • Fast Facts • The Geolocation Object • Best Practices • Exercise - Get location • Summary Saturday, June 15, 13
  • 59. Fast Facts • Not actually part of HTML5 • User must grant web site access to the geolocation data • Can be a signicant drain on batteries • Can take a signicant amount of time before location async return Saturday, June 15, 13
  • 60. The Geolocation Object • Part of the navigator object, which has no ofcial standard • Three methods: getCurrentPosition(), watchPosition(), clearWatch() Saturday, June 15, 13
  • 61. Best Practices • People have just concerns about location privacy • Provide an alternative if possible • Gracefully fail it not able to continue • Remember to clear unneeded watchPositions Saturday, June 15, 13
  • 62. Exercise #8 Getting Location • Starting with exercise #8 • Use a console.log to display the current latitude and longitude Saturday, June 15, 13
  • 63. Summary • Geolocation is support by most current browsers, mobile and desktop • Power used Geolocation can drain power and tax CPU Saturday, June 15, 13
  • 64. Maps • Maps (Google Maps) • Exercise - Display our current location • Annotating Maps • Exercise - Displaying cafe location • Summary Saturday, June 15, 13
  • 65. Google Maps • There are many publicly available map providers • Google was chosen because of its accuracy, simplicity, and cost (free) • To use simply include a le, specify a div, and call the draw map code Saturday, June 15, 13
  • 66. Exercise #9 Displaying a Map • Start with exercise #9 • The Maps include le is present • The map div is displayed on the page • Write the code to make the map appear Saturday, June 15, 13
  • 67. Map Annotation • Markers identify locations on the map • You can use Google’s markers or your own • Markers can have click events Saturday, June 15, 13
  • 68. Exercise #10 Annotating a Map • Start with exercise #10 • Place a maker on the map at: • latitude = 33.8226203918457 • longitude= -118.331848144531 Saturday, June 15, 13
  • 69. Summary • Most users expect to see a map wherever location information is displayed • Google Maps is the most popular map provider (75% of web sites) Saturday, June 15, 13
  • 70. Responsive Design • Fast Facts • Phone vs Tablet • Grids, Divs, and Tables • Exercise - Make display responsive • Summary Saturday, June 15, 13
  • 71. Fast Facts • Responsive design means supporting multiple device resolutions from a single application • JQM added the Grid object to support responsive design • JQM 1.3.0 added tables Saturday, June 15, 13
  • 72. Best Practices • Be careful of one size ts all solutions • The needs of your mobile user maybe different than those on desktop • Always keep bandwidth restrictions in mind Saturday, June 15, 13
  • 73. Exercise #11 Making a Responsive Design • Start with exercise #11 • Adjust the values of the media queries to see how the app adjust Saturday, June 15, 13
  • 74. Summary • Responsive Design is difcult and must be thoroughly planned • A solution for one web site will not necessarily work for another Saturday, June 15, 13
  • 75. Media • Fast Facts • Taking a picture (yes, from a mobile browser) • Exercise - Upload a picture to a server • Summary Saturday, June 15, 13
  • 76. Fast Facts • Modern smart phones treat the input type=”file” as the camera • Can take picture or video or choose from photo album • The real work is done on the server Saturday, June 15, 13
  • 77. Taking and Uploading a Picture • Must turn off JQM’s Ajax with data- ajax=”false” • Use a input type=le with form post with enctype=”multipart/form-data” Saturday, June 15, 13
  • 78. Exercise #12 Uploading a Picture • Start with exercise #12 • Complete form tag for upload • You will not actually be able to submit the photo since that requires a server Saturday, June 15, 13
  • 79. Summary • Many mobile browser support photo upload, but not all • Can upload photo and video but keep in mind how much memory is required • Can also choose from photos in the user’s album Saturday, June 15, 13
  • 80. Charts • Fast Facts • jqPlots • Exercise - Create a chart from hours of operation • Summary Saturday, June 15, 13
  • 81. Fast Facts • Humans understand visual faster than written • Charts are a standard way to render numeric data • There are lots of charting solutions for the web Saturday, June 15, 13
  • 82. jqPlot • An open source project by Chris Leonello • A jQuery widget • Supports its own plug-in • Rendered completely on the client Saturday, June 15, 13
  • 83. Best Practices • Charts are computationally expensive to render • It is possible to render charts dynamically, but not recommended Saturday, June 15, 13
  • 84. Exercise #13 Charting Data • Start from exercise #13 • Implement bar chart to display hours of operation of coffee shops Saturday, June 15, 13
  • 85. Summary • jqPlot is free and easy use charting solution Saturday, June 15, 13
  • 86. Links • jquerymobile.com • jquery.com • cubiq.org/iscroll-4 • jqplot.com • http://handlebarsjs.com/ • callbackhell.com • garann.github.io/template-chooser/ Saturday, June 15, 13
  • 87. My Links • @therockncoder • https://github.com/Rockncoder • http://youtube.com/rockncoder • http://slideshare.net/rockncoder Saturday, June 15, 13
  • 88. Course Summary • When in doubt follow best practices • Build a Coffee+Coffee app of your own • Still lots we haven’t covered Saturday, June 15, 13
  • 89. jQuery Mobile Advance • MV* Frameworks • Responsive Design • Deep Templating • Memory Management • Unit Testing • Nag Phillip until he schedules it! Saturday, June 15, 13