今年參加 Google 的 開發者聚會(#devfest), 把筆記先簡單整理出來, 做個紀錄.
- 議程、簡報 可見: Sessions - devfestapac
Google #devfest 筆記
開場
- 在網路開發軟體
- 不注意device, 注意的是服務,都在瀏覽器上
- Netbook: Chrome os
- Mobile: Android
- Browser: Chrome
- Chrome web store
- Taiwan 可以上載 android software
- 付費android software
- GAE 5m pv/month free
Introduction to android & key froyo features - Fred
- 圖表搜尋: Android dashboard
- Referral tracking
- C2dm can send 1mb
- Layout 不要用 pixels , 要用 dip, dip=虛擬的pixel單位
- android intro
- chrome2phone apps
- C2DM - Send Message
- HTTP POST https://android.apis.google.com/c2dm/send/
- registration_id
- collapse_key
- clientLogin Auth token
- data.1, data.2, ...
HTML5 in Chrome - Arne Roomann-Kurrik
- 簡報: http://kurrik-slides.appspot.com/html5-techtalk/
- Where have we been?
- 1990 First web page
- 1994 HTML2
- 1995 JavaScript
- 1996 CSS1
- 1997 HTML4
- 1998 CSS2
- 1999 XMLHTTP - MS
- 2002 XmlHttpRequest
- 2005 AJAX
- 2009 HTML5
- Draw in canvas
- Canvas 3D(WebGL)
- Inline SVG
- Multimedia
- Audio
- Video
- Data
- Storing Data on the Client
- Other Storage Options
- Working Hard with Worker Threads
- main.js:
var worker = new Worker('extra_work.js');
worker.onmessage = function (event) { alert(event.data); }; - extra_work.js:
postMessage(some_data); - WebSockets: http://bit.ly/websocket-raytrace
- main.js:
- Deep Integrations - Interacting with the client Operating System
- Dragging & Dropping
- www.chromabrush.com
- chrome brush
- Look Who's Calling - Notifications
- Device Orientation - 超酷, 可以讀取裝置的水平位置
- CSS3
- New Style Options
- Transforms & Transitions: -webkit-transform
- Animations
- Beautiful Fonts with @font-face
- Flexible Box Model: Css supports 100% height and vertical centering!
- More HTML5 Goodies to Consider
- Application Cache - offline experience
- Geolocation - tag location information for darwings or users
- Resources
- http://html5rocks.com
- http://twitter.com/ChromiumDev
- http://github.com/kurrik/html-samples
- http://goo.gl/WQOV
The New Social Web: It's about Open Standards - Timothy Jordan
- twitter: @timothyjordan
- Open Standards
- Google Buzz
- oAuth
- ATOM
- http://code.google.com/p/pubsubhubbub - The Source pushes the comment to all subscripbers.
- salmon-protocol.org
- activitystrea.ms
Google App Engine Selected Design Patterns - Ping Yen #devfest
- 簡報: http://goto.ext.google.com/sykdj
- Scalability means flexibility
- 30秒會自動把那 process 砍掉.
- DataStore - Reading / writing data
- Data layout in DataStore - queries, keys, indexes do make sense.
- Characteristics of Big Table
- com.cnn.tech
- com.cnn.www
- com.cnn.www/a
- Characteristics of Big Table
- Entity table and kind index
- Entity Table: Key, Serialized entity
- Key: "Class+id, ex: Message/2487", Serialized entity: "se(Message 1)
- Key: "Class+id, ex: Message/3941", Serialized entity: "se(Message 2)
- Key: "Class+id, ex: User/20", Serialized entity: "se(User 1)
- Key: "Class+id, ex: User/937", Serialized entity: "se(User 2)
- Entity Table: Key, Serialized entity
- Kind Index Table: Kind, Key
- Kind: Message, Key: Message/2487
- Kind: Message, Key: Message/3941
- Kind: User, Key: User/xxx ...
- Single property index
- SELECT * FROM Message WHERE sender = "alba" AND receiver = "dev"
- 建立 Index, GAE 會分析程式, 自動去建立所需要得 Index. (建立 sender, receiver 得 Index)
- DataStore query = BigTable scan
- Pattern: Relational entity - Don't deserialize entities if you don't have to.
- Parent 得關係來解決 600萬筆得 List (撈出 key, 然後在 db.get(key))
- Task Queues: Getting work done in the background.
- Pattern: Do it later - so you can get back to your user sooner.
- update statistics - 數數字在裡面是很難的, 這個很昂貴.
- 在 update data 就把該加得加好, 不用當場算. (Materialized View)
- Queue Mediator runs and runs - 把工作平行化得方式(Materialized View)
- 做1, 把2,3,4送出去, 做完1前, 可能 2,3,4 都做完了. (ex: 寄 Email)
- 加入
Task: task = Task(url="/send_a_mail", params ...)
task.add("mail_queue") - Idempotent: Request 有可能會沒被做到, 所以 Task 要保正式 idempotent(多做無妨)
- 因為可能會重複做, Task 要注意是要多做一次也沒關係得 task.
- Pattern: Continuation Tasks: 化整為零
- Too many tasks, not enough time!
- Time limit: 每個 request 30秒.
- Divide tasks, 幫 task 紀錄, 先把工作切一切, 先作30秒, 然後下一個 Task 在繼續接著做30秒. ... 等等.
- Failures happen: 可能會 retried.
- 送 Task 得時候, 幫 Task 取個名字, 當這個名字在 7 天內, 不能出第二次, 就不會遇到一直重複 retry 爆炸得問題.
- Fork-Join
- App Engine for Business
- SSL and SQL: 支援 https 和 SQL (Scalable 沒那麼大, 所以可以用 SQL)
- Technical support
- Formal SLA: 99.9%
- Centralized admin console
- Enterprise pricing
- Resources
- http://code.google.com/appengine
- [email protected]
- Taipei GTUG
運用 Google Apps Marketplace 整合您得應用服務 - Kevin Huang
- 設定
- 設定 Google App 可以透過 Google 允許 SSO
- 更多 -> 尋找更多.
- Developer
- 建立 Web 應用程式
- 任何您想要得開發工具及佈署環境
- 整合您得應用程式
- OpenID 單一遷入身份認證 (必要)
- http://mazinger-z.appspot.com/openid?domain=abc.com.tw
- PHP OpenID library: php-openid, php-openid-apps-discovery
- OAuth 授權存取 Docs, Calendar 等資料 (選擇)
- OpenID 單一遷入身份認證 (必要)
- 產品上架
- 步驟
- 成為廠商
- 建立 Manifest.xml
- 登錄
- 測試
- 送審
- Buzz-bingo Google code
- OACurl Cookbook - http://code.google.com/intl/zh-TW/apis/buzz/v1/oacurl.html
- 建立 Web 應用程式
Layout 不要用 pixels , 要用 dip, dip=虛擬的pixel單位
CSS有支援這個單位了嗎?
呃, 應該還不支援...