Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Html5 Mobile Apps: Tips & Tricks
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Elijah Glover
March 28, 2013
Programming
620
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Html5 Mobile Apps: Tips & Tricks
Elijah Glover
March 28, 2013
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
570
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
110
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
460
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
490
Go 1.27 における memory allocation の高速化
andpad
0
160
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
230
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
130
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
4.3k
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
320
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
250
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
640
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
10k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
330
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
240
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
240
First, design no harm
axbom
PRO
2
1.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Odyssey Design
rkendrick25
PRO
2
750
Practical Orchestrator
shlominoach
191
12k
Transcript
HTML5 MOBILE APPS Tips & Tricks Elijah Glover
[email protected]
@elijahglover
What We Are Building HTML5 Mobile app used by ~
3.5m iPhone, Android, Blackberry & Windows Phone No Mobile Frameworks - ie. jQuery Mobile
HOW MODERN ARE PHONE BROWSERS? iOS 4, Android 2.2 runs
the equivalent webkit version of Google Chrome 5 (Q2 2010) iOS 6, Android 4.2 runs the equivalent webkit version of Google Chrome 26 (Q1 2013 ~ Current) Most mobile browsers are based off the webkit project
FRAMEWORKS knockout.js MVVM Framework require.js AMD Loader, IoC/DI sammy.js Routing
Framework modernizr Browser Feature Detection
SINGLE PAGE APPS (SPA)
UNDER THE HOOD define("vm/login", ! ["ko", "jQuery"], ! function(ko, $)
{ ! ! var self = this; ! ! self.userName = ko.observable(); ! ! self.password = ko.observable(); ! ! ko.applyBindings(self, $("#login")[0]); ! ! return self; ! })); var app = Sammy('#app', function() { ! this.get('#/login', function() { ! ! require(["vm/login"], function(viewModel) { ! ! ! $("#login").show(); ! ! }); ! }); }); app.run('#/login');
//Use Modernizr To Detect Prefixed Event Name var animationEndName =
(Modernizr.prefixed('animation') + "End") .replace(/^ms/, "MS") .replace(/^Webkit/, "webkit") .replace(/^Moz.*/, "animationend"); //Bind Once & Wait For AnimationEnd To Be Called $("#view1").one(animationEndName, function() { ! //Animation Complete }).addClass("view-transition"); ANIMATION & TRANSITIONS iOS 3.2+ Android 2.1+ Blackberry 6.0+ Windows Phone 8+ Native CSS3 Support
ANIMATION & TRANSITIONS Windows Phone 7 //Detect Support For CSS3
Animations if (!Modernizr.cssanimations) { ! $("#view1").animate({ left: 200 }, { ! ! complete: function() { ! ! ! //Animation Complete ! ! } ! }); } DOM Animation via jQuery
VIEWPORT <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes" /> The viewport
you specify is important! It tells the browser how to render your page Android ignores CSS3 properties when user-scalable is set to yes.
CSS GOTCHA’S position: fixed; iOS 5+, Android 2.2+, BlackBerry 7+,
Windows Phone 8 overflow: scroll; iOS 5+, Android 2.2+, BlackBerry 7+, Windows Phone 8 overflow-x: scroll; -webkit-overflow-scrolling: touch; //Adds Smooth Scrolling overthrow.js - http://filamentgroup.github.com/Overthrow/ iOS4, Android 2.1, Blackberry 6
EMULATORS & SIMULATORS TOOLKIT Xcode iOS Simulator (OSX) Android SDK
Emulator (Windows, OSX, Linux) Windows Phone Emulator (Windows) Blackberry Simulator (Windows)
WEb INspector REmote WEINRE “winery” <script src="http://localhost:8080/target/target-script-min.js"></script>
HTML5 Feature Matrix http://mobilehtml5.org/ Mobile Emulators & Simulators: The Ultimate
Guide http://www.mobilexweb.com/emulators