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
2k
よりよいレビュー環境を求めて / A code review odyssey
masawada
0
2.8k
フロントエンドの秩序は保たれているか?
masawada
1
4.1k
Getting Started with ScratchX
masawada
0
660
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.2k
Other Decks in Programming
See All in Programming
Arm移行タイムアタック
qnighy
0
300
Realtime API 入門
riofujimon
0
150
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
Contemporary Test Cases
maaretp
0
130
subpath importsで始めるモック生活
10tera
0
300
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
距離関数を極める! / SESSIONS 2024
gam0022
0
280
Better Code Design in PHP
afilina
PRO
0
120
みんなでプロポーザルを書いてみた
yuriko1211
0
260
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
CSC509 Lecture 12
javiergs
PRO
0
160
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.8k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Done Done
chrislema
181
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
RailsConf 2023
tenderlove
29
900
Art, The Web, and Tiny UX
lynnandtonic
297
20k
What's in a price? How to price your products and services
michaelherold
243
12k
Navigating Team Friction
lara
183
14k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
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][ݕࡧ]
ͥͻ͓͍͍ͩ͘͞
͋Γ͕ͱ͏͍͟͝·ͨ͠