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
Privileged Apps with Vue.js
Search
masawada
November 15, 2014
Programming
0
160
Privileged Apps with Vue.js
masawada
November 15, 2014
Tweet
Share
More Decks by masawada
See All by masawada
10年続くサービスのデータを1日未満のメンテナンスウィンドウで安全に移管する
masawada
5
2.1k
よりよいレビュー環境を求めて / A code review odyssey
masawada
0
2.9k
フロントエンドの秩序は保たれているか?
masawada
1
4.1k
Getting Started with ScratchX
masawada
0
670
GyaPC::Asia Tokyo 2015 LT
masawada
0
1.4k
Chikubeam
masawada
1
1.5k
Git講習 2014.04.15
masawada
1
310
Hack U at UEC 2014.03.27
masawada
0
1.5k
Firefox OS勉強会 4th Untitled
masawada
0
1.3k
Other Decks in Programming
See All in Programming
선언형 UI에서의 상태관리
l2hyunwoo
0
140
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
layerx_20241129.pdf
kyoheig3
2
290
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
Symfony Mapper Component
soyuka
2
730
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
335
57k
Done Done
chrislema
181
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
We Have a Design System, Now What?
morganepeng
51
7.3k
Making the Leap to Tech Lead
cromwellryan
133
9k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
4 Signs Your Business is Dying
shpigford
181
21k
Statistics for Hackers
jakevdp
796
220k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
160
Transcript
Privileged Apps with Vue.js Firefox OS ίʔυϦʔσΟϯάϛʔτΞοϓ #11 (2014/11/15) @masawada
͜ΜΜ
@masawada
None
FxOSϋοΧιϯͱ͔ओ࠵
http://masawada.me
εϥΠυ50ຕͳͷͰ ඈ͠·͢
Privileged Apps with Vue.js
Vue.js
MVVMϑϨʔϜϫʔΫ
MVCͷѥछΈ͍ͨͳͷ
ৄࡉׂѪ
(͜Θ͍͓͡͞Μ͜Θ͍)
Model View ViewModel
Model var model = { hello: “” };
View <body> <div id=“app”> <p v-text=“hello”></p> <input type=“text” v-model=“hello”> </div>
</body>
ViewModel var app = new Vue({ el: "#app", data: model
});
ViewͱModelΛ ViewModel͕όΠϯυ
None
Privileged Apps (ಛݖΞϓϦ)
Privileged Apps ɾHosted AppsͰ͑ͳ͍API͕͑Δ ɾmanifest.webappʹࢦఆΛॻ͘ ɾ੍͍͔ͭ͘ݶ͕͋Δ ɾΞϓϦΛެ։͢Δͱ͖ʹ৹͕ࠪ͋Δ
੍͍͔ͭ͘ݶ͕͋Δ
CSP
Content Security Policy
Content Security Policy ɾؔίϯετϥΫλͷېࢭ ɾeval ͷېࢭ ͳͲͳͲ… https://developer.mozilla.org/ja/Apps/CSP ΛݟͯͶ
Vue.js
ؔίϯετϥΫλଟ༻ͯͨ͠
None
ͬͨͥ
Ͳ͏࣮ͬͯݱ͍ͯ͠Δ͔
mmckegg/notevil
mmckegg/notevil ɾNode.jsͷϞδϡʔϧ ɾVue.jsͰ͜ΕΛforkͯ͠ґଘϥΠϒϥϦΛ݁߹ ɾariya/esprimaͰparseͯ͠Δ ɾάϩʔόϧΦϒδΣΫτʹΞΫηε͠ͳ͍
mmckegg/notevil case 'BinaryExpression': var l = walk(node.left) var r =
walk(node.right) switch(node.operator) { case '==': return l === r case '===': return l === r
.oO(not evil …?)
ศརͳͷͰ͍·͠ΐ͏
ݱ͔ΒҎ্Ͱ͢
༨ஊ
ίʔυϦʔσΟϯάͷ ͓ͱʹ
git find ίϚϯυ
git find ɾgit subcommand ɾPATHͷ௨Δॴʹgit-findϑΝΠϧΛஔ͘ → git findͰ࣮ߦͰ͖Δ ɾpeco͕ඞཁ
pecoͷΠϯετʔϧ (mac) $ brew tap peco/peco $ brew install peco
None
None
None
None
࠷ߴ
git find DST_PATH=$(git grep -n $1 | grep -v "[0-9]:\s*//"
| peco | awk -F ":" '{print "-c "$2" "$1}'); if [ ${#DST_PATH} -ne 0 ]; then vim $DST_PATH; fi
[git find peco][ݕࡧ]
ͥͻ͓͍͍ͩ͘͞
͋Γ͕ͱ͏͍͟͝·ͨ͠