Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Vue.jsとLambdaの導入

 Vue.jsとLambdaの導入

jaxx2104

March 05, 2017
Tweet

More Decks by jaxx2104

Other Decks in Programming

Transcript

  1. ςϯϓϨʔτػೳ <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ଆ΋ϩδοΫΛ࣋ͭͷͰՄಡੑ্͕͕Δ(ٕज़ͷ෼཭ -> ੹຿ͷ෼཭)
  2. 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ʹΑͬͯঢ়ଶΛอ࣋ࠩ͠෼͕૸͍ͬͯΔͷͰσʔλͷѻ͍͚ͩूதͰ͖Δ
  3. ίϯϙʔωϯτ <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> දࣔҎ֎ʹঢ়ଶͱΠϕϯτ͕ίϯϙʔωϯτΛߏ੒͍͍ͯͯ͠Δ ࠶ར༻΍ϝϯςφϯεੑΛߴΊΔͨΊͷઃܭࢥ૝
  4. ಋೖͯ͠Έͯ • ϝϦοτ • ෳ਺ਓͰͷ։ൃ • HTMLͷมߋͷ༰қ͞ • ϝϯςφϯεੑͷ޲্ •

    ϑϩϯτΤϯυͷػೳ޲্ • ՝୊ • ໾ׂ෼୲ʢΠϕϯτɾόϦσʔγϣϯɾϧʔςΟϯάɾXSSʣ • ίϯϙʔωϯτͷ֓೦ • αʔόʔϨε ΋͘͠͸ αʔόʔαΠυϨϯμϦϯά
  5. ࢿྉ ಋೖࣄྫ 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
  6. ݱߦͷߏ੒ਤ Amazon EC2 Amazon
 S3 client 6* τϦϛϯά ϦαΠζ όϦσʔγϣϯ

    Ξοϓϩʔυ ϑϩϯτΤϯυ +4 αʔόαΠυ 1)1 ϑΝΠϧαʔόʔ τΠμεαΠτ ࡞੒ɾճ౴ը໘
  7. ؆୯ʹઆ໌ ϑϩϯτΤϯυ +4 αʔόαΠυ 1)1 ϑΝΠϧαʔόʔ ॲཧ͕ଟ͍ ஗͍ 4%,࢖ͬͯͳ͍ 6*

    τϦϛϯά ϦαΠζ όϦσʔγϣϯ Ξοϓϩʔυ τΠμεαΠτ ࡞੒ɾճ౴ը໘
  8. 1.3ͷߏ੒ਤ Amazon EC2 Amazon
 S3 Amazon API Gateway client AWS

    Lambda ϦαΠζ Ξοϓϩʔυ Vue ϑϩϯτΤϯυ +4 αʔόαΠυ 1)1 ϑΝΠϧαʔόʔ "1* 6* όϦσʔγϣϯ τΠμεαΠτ ࡞੒ɾճ౴ը໘ τϦϛϯά
  9. ؆୯ʹઆ໌ AWS Lambda ϦαΠζ Ξοϓϩʔυ Vue ॲཧͷ࠷దԽ 69޲্ ඇಉظԽ 6*

    όϦσʔγϣϯ τΠμεαΠτ ࡞੒ɾճ౴ը໘ τϦϛϯά ҆શ
  10. কདྷతͳߏ੒ਤ Amazon
 S3 Amazon API Gateway client AWS Lambda ϦαΠζ

    Ξοϓϩʔυ ϑϩϯτΤϯυ +4 ϑΝΠϧαʔόʔ "1* τΠμεαΠτ τΠμε"1* 6* όϦσʔγϣϯ ࡞੒ɾճ౴ը໘ τϦϛϯά αʔόʔϨε 69޲্ ҆શ ҆Ձ Vue ଞαΠτͰ΋ڞ௨ͷϊ΢ϋ΢