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
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
サーバーレスをどこまで使う? WebRTC対戦ゲームで選んだVPSとの共存設計
kaidouji85
0
400
「どのログを見ればいい?」 から始めた サーバーレス障害解析
y_waka1
1
140
時うどん〜Socket.getifaddrsで学ぶネットワーク編 / Tokiudon: The Socket.getifaddrs Edition
coe401_
4
260
AI感のないAWS構成図をAIエージェントに描かせたい!
sagochiko
1
240
メルカリにおけるAI時代の高速プロトタイピング基盤「Arca」
ryotarai
5
4.1k
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.6k
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
33
31k
高負荷プロダクション環境におけるAWS Lambdaのリアル 〜スケールとコストを左右する実行ライフサイクルの技術仕様〜
maimyyym
2
270
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
600
Mastering Agentic Development: Harness Engineering for Effective Coding Agents
konippi
3
470
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
130
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.6k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Rails Girls Zürich Keynote
gr2m
96
14k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
How to build a perfect <img>
jonoalderson
1
6k
BBQ
matthewcrist
89
10k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
480
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Optimizing for Happiness
mojombo
378
71k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Paper Plane
katiecoart
PRO
4
53k
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