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
1.9k
よりよいレビュー環境を求めて / A code review odyssey
masawada
0
2.8k
フロントエンドの秩序は保たれているか?
masawada
1
4k
Getting Started with ScratchX
masawada
0
650
GyaPC::Asia Tokyo 2015 LT
masawada
0
1.4k
Chikubeam
masawada
1
1.5k
Git講習 2014.04.15
masawada
1
300
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
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
340
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.7k
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
Synchronizationを支える技術
s_shimotori
1
150
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.7k
Java ジェネリクス入門 2024
nagise
0
610
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
280
offers_20241022_imakiire.pdf
imakurusu
2
370
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.4k
現場で役立つモデリング 超入門
masuda220
PRO
13
3k
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
4
1.6k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
50
7.2k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Practical Orchestrator
shlominoach
186
10k
Building Applications with DynamoDB
mza
90
6.1k
Why Our Code Smells
bkeepers
PRO
334
57k
The Invisible Side of Design
smashingmag
297
50k
Making Projects Easy
brettharned
115
5.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building an army of robots
kneath
302
42k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
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][ݕࡧ]
ͥͻ͓͍͍ͩ͘͞
͋Γ͕ͱ͏͍͟͝·ͨ͠