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
Firefox OS勉強会 4th Untitled
Search
masawada
October 16, 2013
Technology
0
1.3k
Firefox OS勉強会 4th Untitled
masawada
October 16, 2013
Tweet
Share
More Decks by masawada
See All by masawada
10年続くサービスのデータを1日未満のメンテナンスウィンドウで安全に移管する
masawada
5
2.2k
よりよいレビュー環境を求めて / A code review odyssey
masawada
0
2.9k
フロントエンドの秩序は保たれているか?
masawada
1
4.1k
Getting Started with ScratchX
masawada
0
680
GyaPC::Asia Tokyo 2015 LT
masawada
0
1.4k
Privileged Apps with Vue.js
masawada
0
160
Chikubeam
masawada
1
1.5k
Git講習 2014.04.15
masawada
1
320
Hack U at UEC 2014.03.27
masawada
0
1.5k
Other Decks in Technology
See All in Technology
Qiita Organizationを導入したら、アウトプッターが爆増して会社がちょっと有名になった件
minorun365
PRO
1
200
ウォンテッドリーのデータパイプラインを支える ETL のための analytics, rds-exporter / analytics, rds-exporter for ETL to support Wantedly's data pipeline
unblee
0
140
Potential EM 制度を始めた理由、そして2年後にやめた理由 - EMConf JP 2025
hoyo
2
2.9k
Amazon Q Developerの無料利用枠を使い倒してHello worldを表示させよう!
nrinetcom
PRO
2
120
事業を差別化する技術を生み出す技術
pyama86
2
440
AWS Well-Architected Frameworkで学ぶAmazon ECSのセキュリティ対策
umekou
2
150
IoTシステム開発の複雑さを低減するための統合的アーキテクチャ
kentaro
1
120
EDRの検知の仕組みと検知回避について
chayakonanaika
12
5.2k
エンジニアリング価値を黒字化する バリューベース戦略を用いた 技術戦略策定の道のり
kzkmaeda
7
3.2k
2/18 Making Security Scale: メルカリが考えるセキュリティ戦略 - Coincheck x LayerX x Mercari
jsonf
0
240
DevinでAI AWSエンジニア製造計画 序章 〜CDKを添えて〜/devin-load-to-aws-engineer
tomoki10
0
190
アジャイルな開発チームでテスト戦略の話は誰がする? / Who Talks About Test Strategy?
ak1210
1
660
Featured
See All Featured
Facilitating Awesome Meetings
lara
53
6.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Site-Speed That Sticks
csswizardry
4
410
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
440
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Transcript
໊শະઃఆ 2013.10.16 Firefox OSษڧձ 4th @masawada
Έͳ͞Μ
͜ΜΜ
masawada
None
ࣗݾհ • ిؾ௨৴େֶ ใཧֶ෦ ใɾ௨৴ֶՊ 2 • ΤϦΞϫϯηάͱ͔ • Rubyͱ͔JavaScriptͱ͔
masawada.me
FxOS & Win8 ϋοΧιϯ
αΠίʔ αΠίʔ
ຊ
໊শະઃఆ 2013.10.16 Firefox OSษڧձ 4th @masawada
None
None
ؒʹ߹Θͳ͔ͬͨ
Twitter
ΈΜͳ
͍͖ͩ͢
Twitter
None
2013/10/16 17:43
ϋογϡλά
#FxOS
͝ҙݟɾ࣭
#FxOS
Twitter
TwitterΫϥΠΞϯτ Λ࡞Ζ͏
TwitterΫϥΠΞϯτ ࣍ੈͷHello, world
Hello, world TwitterΫϥΠΞϯτ ςΩετೖྗ × ˕ ςΩετग़ྗ ˕ ˕ ը૾දࣔ
˚ ◦ Ϧετදࣔ ˚ ◦ ωοτϫʔΩϯά × ˕
ి௨େੜࡏֶதʹ1 TwitterΫϥΠΞϯτΛ࡞Δ
None
None
TwitterΫϥΠΞϯτ Λ࡞Ζ͏
Twitter Libraries
None
None
Node.js͚ͬΆ͍
Cross Origin੍ݶ͕ ݪҼʁ
→࡞Ζ͏
Ͱ͖·ͨ͠
Firefox OS͚ Twitter APIϥΠϒϥϦ
Violet.js
۩ମతʹԿ͕ Firefox OS͚ʁ
// XHR var xhr = new XMLHttpRequest({mozSystem: true}); // manifest.webapp
"type": "privileged", "permissions": { “systemXHR”: {} }
violet.js • ΄ͱΜͲͷAPIΤϯυϙΠϯτʹରԠ → (ະςετ…) • Firefox OSΞϓϦͱͯ͠͏ʹ systemXHRͷݖݶΛཁٻ͢Δඞཁ͕͋Δ
͜͜·Ͱ͕ ࠓ7݄ͷͰ͖͝ͱ
FxOS & Win8 ϋοΧιϯ
8/10
FoxBird
σϞ
FoxBird • OAuth: PIN Only • Tweet (statuses/update) • Favorite
• Retweet • Streaming API (GET user)
ॏࢹͨ͜͠ͱ
Streaming APIରԠ
Streaming APIपΓΛ ղઆ
Streaming API ԿΛ͍ͬͯΔͷ͔
REST
None
Streaming API
None
ίωΫγϣϯΛ அ͠ͳ͍
src/streaming.js
var con = Violet.HTTPClient({ method: method, uri: uri }); con.onloading
= function(xhr){ ... };
src/http.js
var xhr = new XMLHttpRequest({mozSystem: true}); // தུ xhr.onreadystatechange =
function(){ if(xhr.readyState === 3){ this.onloading(xhr); }else if(xhr.readyState === 4){ if(xhr.status === 200){ this.onsuccess(xhr); }else{ this.onerror(xhr); } } }.bind(this);
SFBEZ4UBUFͷͷϦετҎԼͷΑ͏ʹͳΓ·͢ɻ ɾ ॳظԽ͞Ε͍ͯ·ͤΜ ɾ ಡΈࠐΈதͰ͢ ɾ ಡΈࠐΈྃ͠·ͨ͠ ɾ ํʹѻ͑·͢ ɾ
ͯྃ͢͠·ͨ͠
SFBEZ4UBUFͷͷϦετҎԼͷΑ͏ʹͳΓ·͢ɻ ɾ ॳظԽ͞Ε͍ͯ·ͤΜ ɾ ಡΈࠐΈதͰ͢ ɾ ಡΈࠐΈྃ͠·ͨ͠ ɾ ํʹѻ͑·͢ ɾ
ͯྃ͢͠·ͨ͠
readyState === 3ͷͱ͖ ߋ৽ΞϦ
var con = Violet.HTTPClient({ method: method, uri: uri }); con.onloading
= function(xhr){ var lines = xhr.responseText.split('\r\n'); if(!lines[lines.length-2]){ return false; } callback(JSON.parse(lines[lines.length-2])); };
Streaming APIରԠ
violet.jsΛͬͯΈΔ
ΫϥΠΞϯτΛ ࡞ͬͯΈΔ
ΫϥΠΞϯτΛ࡞Δ • πΠʔτػೳ • Streaming APIͰλΠϜϥΠϯಡΉ • UIBuilding BlocksΛ͏
σϞ
؆୯ʹ࡞ΕΔ
ߴ։ൃͰ͖Δ
[ߴ։ൃ][Google ݕࡧ]
ੋඇ ͬͯΈ͍ͯͩ͘͞
࠷ޙʹ
v0.2.0
v0.2.0ͷ৽ػೳ • POST statuses/filterʹରԠ • ͬͯstreamingdeprecated • userstreamʹͳΓ·ͨ͠ • v0.3.0Ͱফ͑·͢
• POST statuses/update_with_mediaʹରԠ
͏͙͢ϦϦʔε
͋Γ͕ͱ͏͍͟͝·ͨ͠