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
Search
Adam Lu
January 24, 2013
Technology
14
660
一步一步开发HTML5 Mobile Apps
Adam Lu
January 24, 2013
Tweet
Share
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
The Engineer with a Three-Year Cycle - 2
e99h2121
0
200
新規事業における「一部だけどコア」な AI精度改善の優先順位づけ
zerebom
0
400
MySQLのJSON機能の活用術
ikomachi226
0
100
Lambda Durable FunctionsでStep Functionsの代わりはできるのかを試してみた
smt7174
2
150
フロントエンド開発者のための「厄払い」
optim
0
180
Riverpod3.xで実現する実践的UI実装
fumiyasac0921
2
340
SMTP完全に理解した ✉️
yamatai1212
0
110
Claude Codeベストプラクティスまとめ
minorun365
50
29k
re:Inventで見つけた「運用を捨てる」技術。
ezaki
1
150
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
Oracle Cloud Infrastructure:2026年1月度サービス・アップデート
oracle4engineer
PRO
0
190
【NGK2026S】日本株のシステムトレードに入門してみた
kazuhitotakahashi
0
190
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
82
Building the Perfect Custom Keyboard
takai
2
680
Darren the Foodie - Storyboard
khoart
PRO
2
2.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
440
We Have a Design System, Now What?
morganepeng
54
8k
Docker and Python
trallard
47
3.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Practical Orchestrator
shlominoach
191
11k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
170
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