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
650
一步一步开发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
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
190
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
150
Terraform Stacks入門 #HashiTalks
msato
0
360
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
330
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
2
230
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
240
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
930
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
130
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
SSMRunbook作成の勘所_20241120
koichiotomo
3
170
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
The Invisible Side of Design
smashingmag
298
50k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Music & Morning Musume
bryan
46
6.2k
We Have a Design System, Now What?
morganepeng
50
7.2k
It's Worth the Effort
3n
183
27k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Navigating Team Friction
lara
183
14k
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