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
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
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.4k
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
260
Cloudflare is Agents
chimame
0
190
Go 1.27 における memory allocation の高速化
andpad
0
360
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
270
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
490
MySQLとPostgreSQLって何が違うの?
akagami
0
150
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
270
Flow は今どうなっているか
mizdra
PRO
0
800
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
410
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.1k
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Between Models and Reality
mayunak
4
430
Embracing the Ebb and Flow
colly
88
5.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
230
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
360
Everyday Curiosity
cassininazir
0
300
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