Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
jquery mobile
Search
Andreas Bjärlestam
May 25, 2011
Technology
78
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jquery mobile
Andreas Bjärlestam
May 25, 2011
Transcript
35 slides
Andreas Bjärlestam! 2011-05-25!
Web vs Apps • Referral traffic is lost with
Apps • Google does not index Apps • Customers are already going to the website • Cross device • Apps are in the hands of pla>orm vendors
Frameworks Frameworks Frameworks
For building mobile applicaAons with web technology For
building mobile friendly websites
Features • HTML5 based • Progressive enhancement
– Works in less capable browsers but with limited features • Accessibility – Designed to work with screen readers – WAI-‐ARIA
jQuery means JavaScript right?
Well… not in this case jQuery-‐mobile development is mostly
about markup
Pages
None
Simple page example <div data-role="page" id="home"> <div data-role="header"> <h1>Page
header</h1> </div> <div data-role="content"> <h3>Hi!</h3> <p>This is a simple page made with jquery mobile</p> </div> <div data-role="footer"> <h4>Page Footer</h4> </div> </div>
Page navigaAon
UI elements List views BuSons Dialogs
Popup menus Sliders Checkboxes
<form action="form.php" method="post"> <label for="slider">Slider: </label> <input type="number" data-type="range” name="slider"
id="slider" min="40" max="80" value="50"/> <label for="q">Search: </label> <input data-type="search" name="q" id="q"/> <fieldset data-role="controlgroup"> <legend>Choose many:</legend> <input type="checkbox" name="checkbox-1" id="checkbox-1" /> <label for="checkbox-1">Option 1</label> <input type="checkbox" name="checkbox-2" id="checkbox-2" /> <label for="checkbox-2">Option 2</label> <input type="checkbox" name="checkbox-3" id="checkbox-3" /> <label for="checkbox-3">Option 3</label> </fieldset> <label for=”switch">Flip switch:</label> <select name=”switch" id=”switch" data-role="slider"> <option value="off">Off</option> <option value="on">On</option> </select> </form>
Page transiAons Slide Flip Pop Fade
Slide up Slide down
How are these nice effects done?
CSS transforms • GPU accelerated • Compact code
= efficient • Currently only implemented for webkit
.flip { -webkit-animation-name: flipinfromleft; -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 2s; } @-webkit-keyframes
flipinfromleft { from { -webkit-transform: rotateY(180deg); } to { -webkit-transform: rotateY(0); } }
How can we handle all these phones?
Progressive Enhancement
None
Performance in the mobile environment
Bandwidth vs Latency
Bandwidth Latency source: hSp://www.belshe.com/2010/05/24/more-‐bandwidth-‐doesnt-‐maSer-‐much/
Latency is bad for wireless
Reduce roundtrips to fight latency
How does jQuery Mobile handle this?
How jQuery fights Latency • Gradients and shadows with
CSS3 – No background-‐images to load • Image icons in css-‐sprite • And…
Remember WAP and WML? The Card Deck
jQuery mobile supports mulAple pages in a single html
document
JavaScript Event-‐listeners tap taphold swipe swipelea
swiperight orientaAonchange scrollstart scrollstop
Events -‐ examples $('#tapMe').tap(function(e) { alert('tap!' ); }); $('#home').swipeleft(function(e)
{ alert('swipe left!' ); });
Theming • Object oriented CSS • Similar to
jQuery-‐UI • CSS3 to minify footprint – Rounded corners – Shadows – Gradients • Color “swatches” – A theme includes several color schemes that can be applied on different content
data-‐theme=“b” data-‐theme=“a” data-‐theme=“e”
Andreas Bjärlestam mailto:
[email protected]
hSp://twiSer.com/bjarlestam
ASribuAon • hSp://www.flickr.com/photos/brdavids/2699221787 • hSp://www.slideshare.net/bryanrieger/rethinking-‐the-‐mobile-‐web-‐by-‐yiibu • hSp://www.belshe.com/2010/05/24/more-‐bandwidth-‐doesnt-‐maSer-‐much
More Decks by Andreas Bjärlestam
See All by Andreas Bjärlestam
Climate compensate with a pull request
bjarlestam
0
64
Agile performance testing
bjarlestam
0
130
SPDY and HTTP2
bjarlestam
1
1.4k
SPDY or maybe HTTP2.0
bjarlestam
4
71
Devise - taking care of your users
bjarlestam
0
81
REST with JAX-RS
bjarlestam
1
100
REST
bjarlestam
2
180
Other Decks in Technology
See All in Technology
NutanixへのSSHアクセスの今後について
shadowhat
0
180
業務の傍らで進める改善ループエンジニアリング
bengo4com
1
250
デザインシステムのフィードバックループをほぼ自動化した話
tongari07
0
610
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
2
320
Dark Web - Como o Cibercrime Opera na Internet
nicholsjasper
0
120
Is the Website Dying?
miriamschwab
0
220
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
4
1.3k
IVRy における AI 時代のデータプロダクトと事業開発
ivry_presentationmaterials
0
120
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.2k
「個社」ではなく「業界」の課題を解く AI 対話開発 ー 価値を広げる設計と、価値を守るエンジニアリング ー
ivry_presentationmaterials
4
900
ポケモンバトルのAIエージェント
koji_kawamura
0
260
目を覚ませ!僕らの認証情報が何者かに侵略されてるぞ
tkito
2
490
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.3k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
760
Are puppies a ranking factor?
jonoalderson
2
4.2k
KATA
mclloyd
PRO
35
16k
How to build a perfect <img>
jonoalderson
1
6.3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Product Roadmaps are Hard
iamctodd
55
13k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
590