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
一步一步开发HTML5 Mobile Apps
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Adam Lu
January 24, 2013
Technology
670
14
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
一步一步开发HTML5 Mobile Apps
Adam Lu
January 24, 2013
More Decks by Adam Lu
See All by Adam Lu
YUI Rocks!
adamlu
3
3.1k
YUI介绍和使用YUI构建web应用
adamlu
2
3.7k
HTML5概览
adamlu
13
3.7k
Other Decks in Technology
See All in Technology
Browser Spec: Testing Hotwire with Ruby
takahashim
1
120
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1k
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.7k
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
150
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
250
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
340
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
160
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
230
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
170
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
130
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
520
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Why Our Code Smells
bkeepers
PRO
340
58k
Become a Pro
speakerdeck
PRO
31
6.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
What's in a price? How to price your products and services
michaelherold
247
13k
Crafting Experiences
bethany
1
380
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Transcript
一步一步开发 HTML5 移动应用 鲁超伍 Adam Lu @adamlu
HTML5 还是 Native
Fastbook
移动应用的博弈 • 特性丰富度 • 性能 • 开发者经验 • • 感官
• 可发现性 • 货币化
为什么要开发 HTML5 Web Apps • 跨系统 / 平台 / 浏览器
• 易扩展 • 跨设备开发减少成本
支持 HTML5 的移动浏览器
基于 HTML5 应用之服务器端架构 • 可以和传统的 Web 架构类似 ( 浏览器不关心 )
• 可以考虑使用 REST 设计, JavaScript 加载和 管理状态 管理状态
基于 HTML5 应用之前端架构 Data Application HTML5 UI Elements Template
BOILERPLATE 开发第一步
Boilerplate 核心之 HTML • Mobile viewport – <meta name="viewport" content="width=device-
width"> • Home screen icon set • Home screen icon set • iOS web app – <meta name="apple-mobile-web-app-capable" content="yes"> • HTML5 新标签
Boilerplate 核心之 CSS • Reset CSS – normalize.css/YUI Reset CSS/HTML5
Reset • CSS Font
Boilerplate 核心之 JavaScript • 选择基础类库 – Zepto/YUI/jQuery/Underscore/ • 选择功能类库 –
Hammer.js/YUI/iScroll/ – Hammer.js/YUI/iScroll/
USER INTERACTION 开发第二步
HTML5 移动开发框架 • PhoneGap • Trigger.io • AppMobi • App
Accelerator • App Accelerator
客户端的 MVC • Backbones • YUI App Framework • KnockoutJs
Backbone.js
Backbone with REST • Sync 处理器对应 REST 的 CRUD 操作
– Create = HTTP POST – Read = HTTP GET – Update = HTTP PUT – Update = HTTP PUT – Delete = HTTP Delete URL Verb Description /entities GET fetch entities /entities POST create entity /entities/id PUT modify entity /entities/id DELETE delete entity
YUI App Framework • Model+View+Router • Pjax = pushState +
Ajax
客户端模板系统 • Handlebar • Mustache
UI 框架 • jQuery Mobile • Sencha Touch • Kendo
UI
Kendo UI http://demos.kendoui.com/mobile/overview/index.html
PERFORMANCE, USER EXPERIENCE 开发第三步
性能 • Manifest • LocalStorage • SessionStorage • CSS3 Animation
• CSS3 Animation • Cache
使用模块组织你的代码 • AMD (异步模块定义) – RequireJS – SeaJS – YUI
Module – YUI Module
RequireJs: YUI Module
响应 Mobile
媒体查询 • @media all and (min-width:500px) { … } •
@media screen and (min-width: 400px) and (max-width: 700px) { … } (max-width: 700px) { … }
MediaQueri.es
DEBUG 开发第四步
移动调试 • Chrome 开发者工具 • 远程调试 – Edge Inspect –
Edge Inspect – Weinre – iWebInspector • 多设备 / 多浏览器测试
书籍推荐
THANKS! @adamlu