Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Vue.jsとLambdaの導入
Search
jaxx2104
March 05, 2017
Programming
430
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Vue.jsとLambdaの導入
jaxx2104
March 05, 2017
More Decks by jaxx2104
See All by jaxx2104
freeeにおけるファンクションを超えた一気通貫でのAI活用
jaxx2104
3
1.8k
Relative CI が気になっている話
jaxx2104
0
570
デザインファイルにおける継続的インテグレーション
jaxx2104
2
540
漸進的な変更を支えるフロントエンド設計
jaxx2104
5
2.4k
価値あるフロントエンドデザイン領域開拓
jaxx2104
0
490
Gatsby と Netlify で JAMstack なメディア開発
jaxx2104
0
830
サイレントヒーローを作らない取り組み
jaxx2104
1
230
開発組織のメンバーからリーダーになって
jaxx2104
0
160
Nikuman
jaxx2104
0
510
Other Decks in Programming
See All in Programming
すこし踏み込む CancellationToken
htkym
2
1.3k
iOSDC2026登壇資料.pdf
riofujimon
0
190
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
200
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
170
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
870
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
410
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
360
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
240
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
540
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
690
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
310
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
480
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
4 Signs Your Business is Dying
shpigford
187
23k
Odyssey Design
rkendrick25
PRO
2
820
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Mobile First: as difficult as doing things right
swwweet
225
10k
The Spectacular Lies of Maps
axbom
PRO
1
1k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
710
How to make the Groovebox
asonas
2
2.5k
ラッコキーワード サービス紹介資料
rakko
1
5M
Transcript
Vue.jsͱLambdaͷಋೖ JSϑϨʔϜϫʔΫͱαʔόʔϨε
v1.3࡞ը໘ͷվम • ࡞ը໘ͷػೳՃ • ࡞ը໘ͷUIݟ͠ • Vueͷಋೖ • AWS Lambdaͷಋೖ
ϦϦʔε࣌ͷٕज़తෛ࠴
Vueͷಋೖ • jQueryͰSPA։ൃͭΒ͍ • ߏจ͕ͳ͍ͷͰ͕Ͱ͖ͳ͍ • DOMૢ࡞ʹΑΔίʔυྔͷංେԽ • ڝ߹αΠτͰͷJSϑϨʔϜϫʔΫ࠾༻ࣄྫ
Vueͷػೳ • ςϯϓϨʔτػೳ (ͷ) • DOMૢ࡞ͷࣗಈԽ (։ൃͷޮԽͱදࣔͷߴԽ) • ίϯϙʔωϯτ (ઃܭɾ࠶ར༻ੑ)
Answers Λྫʹઆ໌͠·͢ HTMLଆϩδοΫΛ࣋ͨͳ͍ͷͰDOMૢ࡞͢ΔͱJSͱ݁߹ͯ͠͠·͏ HTMLଆϩδοΫΛ࣋ͭͷͰՄಡੑ্͕͕Δ(ٕज़ͷ -> ͷ)
ςϯϓϨʔτػೳ <button>બࢶՃ</button> <script> for (answer of answers) { $(“button”).html(‘<div class=“card”><input
name=“answer”></div>’); } </script> <button>બࢶՃ</button> <div class=“card” v-for=“answer in answers” > <input name=“answer”> </div> <script> </script> HTMLଆϩδοΫΛ࣋ͨͳ͍ͷͰDOMૢ࡞͢ΔͱJSͱ݁߹ͯ͠͠·͏ HTMLଆϩδοΫΛ࣋ͭͷͰՄಡੑ্͕͕Δ(ٕज़ͷ -> ͷ)
DOMૢ࡞ͷࣗಈԽ <p>બࢶͷ1</p> <button>બࢶՃ</button> <script> var text = $(“p”).text(); text =
text.replace(/\d/, 2); $(“p”).text(text); </script> <p>બࢶͷ{{length}}</p> <button>બࢶՃ</button> <script> data: length :1 data.length = 2 </script> HTMLଆͷঢ়ଶΛอ࣋Ͱ͖ͳ͍ͷͰऔಘͱग़ྗͷॲཧͰʹͳΓ͕ͪ ԾDOMʹΑͬͯঢ়ଶΛอ͕͍࣋ࠩͬͯ͠ΔͷͰσʔλͷѻ͍͚ͩूதͰ͖Δ
ίϯϙʔωϯτ <script> name: “answers” data: answers: [“a1”, “a2”, “a3”], max:
4, input: { max: 100, require: false }, isPhoto: true method: add () { answers.push(“a4”); } </script> ผͷίϯϙʔωϯτ͔Βར༻Ͱ͖Δ <answers max=“8”><answers> දࣔҎ֎ʹঢ়ଶͱΠϕϯτ͕ίϯϙʔωϯτΛߏ͍͍ͯͯ͠Δ ࠶ར༻ϝϯςφϯεੑΛߴΊΔͨΊͷઃܭࢥ
ಋೖͯ͠Έͯ • ϝϦοτ • ෳਓͰͷ։ൃ • HTMLͷมߋͷ༰қ͞ • ϝϯςφϯεੑͷ্ •
ϑϩϯτΤϯυͷػೳ্ • ՝ • ׂ୲ʢΠϕϯτɾόϦσʔγϣϯɾϧʔςΟϯάɾXSSʣ • ίϯϙʔωϯτͷ֓೦ • αʔόʔϨε ͘͠ αʔόʔαΠυϨϯμϦϯά
ࢿྉ ಋೖࣄྫ https://www.netflix.com/jp/ https://www.airbnb.jp/ https://bookingtable.jp/ τΠμεͱಉ͡Α͏ͳαΠτ http://www.playbuzz.com/ https://www.buzzfeed.com/ https://prottapp.com/ja/ https://www.typeform.com/
https://app.apester.com/ ͜Ε͔ΒࢀߟʹͳΓͦ͏ͳهࣄ ϦΫϧʔτςΫϊϩδʔζͷϑϩϯτΤϯυ։ൃ 2016 http://yosuke-furukawa.hatenablog.com/entry/2016/12/01/175446 ϦονͳWebΞϓϦέʔγϣϯͷͨΊͷ7ͭͷݪଇʲ༁ʳ http://yosuke-furukawa.hatenablog.com/entry/2014/11/14/141415
AWS Lambdaͷಋೖ • s3fs Ͱͳ͘AWS SDKͰΞοϓϩʔυ͍ͨ͠ • ϦαΠζ࣌ؒͷॖ • ଞαΠτͷAWSҠߦ࣌ͷ՝Λղܾ͍ͨ͠
AWS Lambdaͷػೳ • s3ͳͲ֤αʔϏεͰॲཧΛ݁Ͱ͖Δ • Node.jsͰ։ൃʢΠϕϯτۦಈɺඇಉظʣ • EC2ΛׂܰݮɺকདྷαʔόʔϨε
ݱߦͷߏਤ Amazon EC2 Amazon S3 client 6* τϦϛϯά ϦαΠζ όϦσʔγϣϯ
Ξοϓϩʔυ ϑϩϯτΤϯυ +4 αʔόαΠυ 1)1 ϑΝΠϧαʔόʔ τΠμεαΠτ ࡞ɾճը໘
؆୯ʹઆ໌ ϑϩϯτΤϯυ +4 αʔόαΠυ 1)1 ϑΝΠϧαʔόʔ ॲཧ͕ଟ͍ ͍ 4%,ͬͯͳ͍ 6*
τϦϛϯά ϦαΠζ όϦσʔγϣϯ Ξοϓϩʔυ τΠμεαΠτ ࡞ɾճը໘
1.3ͷߏਤ Amazon EC2 Amazon S3 Amazon API Gateway client AWS
Lambda ϦαΠζ Ξοϓϩʔυ Vue ϑϩϯτΤϯυ +4 αʔόαΠυ 1)1 ϑΝΠϧαʔόʔ "1* 6* όϦσʔγϣϯ τΠμεαΠτ ࡞ɾճը໘ τϦϛϯά
؆୯ʹઆ໌ AWS Lambda ϦαΠζ Ξοϓϩʔυ Vue ॲཧͷ࠷దԽ 69্ ඇಉظԽ 6*
όϦσʔγϣϯ τΠμεαΠτ ࡞ɾճը໘ τϦϛϯά ҆શ
কདྷతͳߏਤ Amazon S3 Amazon API Gateway client AWS Lambda ϦαΠζ
Ξοϓϩʔυ ϑϩϯτΤϯυ +4 ϑΝΠϧαʔόʔ "1* τΠμεαΠτ τΠμε"1* 6* όϦσʔγϣϯ ࡞ɾճը໘ τϦϛϯά αʔόʔϨε 69্ ҆શ ҆Ձ Vue ଞαΠτͰڞ௨ͷϊϋ
Thank you!