Web標準でつくるガラケーサイト
by
Mariko Kosaka
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
͜ͷεϥΠυྩݩ5 ݄18ʹ౦ژͰ։࠵͞Εͨ Inside Frontend #3Ͱൃදͨ͠ࢿྉʹ ؆୯ͳઆ໌ΛՃͨ͠ͷͰ͢ɻ ͳʹ͔࣭͕͋ΕTwitterͰ@kosamri·ͰͲ͏ͧɻ
Slide 2
Slide 2 text
͜Μʹͪʂ͜͞·ΓͰ͢ɻ Chrome ͷweb developer ecosystem νʔϜͰಇ͍͍ͯ·͢ɻ
Slide 3
Slide 3 text
ࠓջ͔͍͠ΨϥέʔͷΛ͠ʹ͖·ͨ͠ɻ Ψϥέʔͱ͍ͬͯੲͷέʔλΠͰͳͯ͘ɺࠓɺੈք֤ࠃͰ࣮ࡍʹചΒΕ͍ͯΔʮε ϚʔτϑΟʔνϟʔϑΥϯʯͷͰ͢ɻ
Slide 4
Slide 4 text
࠷ۙKaiOSͱ͍͏Σϒٕज़ϕʔεͰ࡞ΒΕͨOSΛࡌ͍ͨ͠ΘΏΔʮΨϥέʔʯ͕ੈք ֤ࠃͰൃച͞Ε͍ͯ·͢ɻ ϒϥβͪΐͬͱݹ͍όʔγϣϯͰ͕͢Ϟμϯͳͷ͕ࡌ͞Ε͓ͯΓɺAppετΞ ࡌ͍ͯ͠·͋͢ɻ
Slide 5
Slide 5 text
ͪͳΈʹcounterpoint researchࠓޙ3ؒͰ3ԯ7ઍສͷεϚʔτϑΟʔνϟʔϑΥϯ͕ ൃച͞ΕΔͱ༧͍ͯ͠·͢ɻ
Slide 6
Slide 6 text
ιϑτΣΞ·͘͞͠εϚʔτϑΥϯͷΑ͏Ͱ͕͢ɺϋʔυΣΞͬͺΓΨϥέʔ ͱಉ͡Ͱ͢ɻ
Slide 7
Slide 7 text
͜ͷεϚʔτϑΟʔνϟʔϑΥϯͰΣϒϒϥδϯάΛ͢ΔͱͲ͏ݟ͑ΔͰ͠ΐ͏͔ʁ
Slide 8
Slide 8 text
Inside Frontend ͷαΠτଟminimum width͕240pxΑΓେ͖͍ͷ͔ɺϩΰ͕ը໘͔Β ᷓΕ͍ͯ·͢ɻ
Slide 9
Slide 9 text
SquooshڈࢲͷνʔϜͰ࡞ͬͨΞϓϦͰɺʮҰ൪ྑ͘Ͱ͖ͨΣϒΞϓϦΛʯࢦ͠ ͯ৭ʑͳσόΠεͰςετΛ͠ɺϩʔσΟϯάվળ͠·͕ͨ͠ɺqvgaͷεΫϦʔϯαΠ ζߟ͍͑ͯͳ͔ͬͨͷͰɺCSS่Ε͕͓͖͍ͯ·͢ɻ
Slide 10
Slide 10 text
εϚʔτϑΟʔνϟʔϑΥϯͰϒϥδϯά͢Δͱ͍ʹ͍͘ΣαΠτ͔ΓͰ͕͢ɺ ͖ͪΜͱ͑ΔαΠτ͋Γ·͢ʂ Twitter͕ྑ͍ྫͰɺmobile.twitter.comͰ͑Δػೳͯ͢εϚʔτϑΟʔνϟʔϑΥϯ Ͱ͑·͢ɻ
Slide 11
Slide 11 text
KaiOSʹಛԽͨ͠ΞϓϦΛ࡞Εྑ͍ͱࢥ͏͔͠Ε·ͤΜ͕ɺΠϯυͳͲͰܞଳΩϟ ϦΞ͕AppετΞΛѲ͍ͬͯͯɺ͔ͭಠࣗͷಈըECαʔϏεΛ͓࣋ͬͯΓɺڝ߹͢Δ αʔϏεͩͱAppετΞʹΕͳ͍Մೳੑ͕͋Γ·͢ɻͱ͍͏͜ͱɺҰ෦ͷαʔϏεɾ ϏδωεͰࠓޙΣϒαΠτͱͯ͠ఏڙ͢Δ͜ͱ͕ॏཁʹͳΔ͔͠Ε·ͤΜɻ
Slide 12
Slide 12 text
ͱ͜ΖͰઌఔChrome ͷweb developer ecosystem νʔϜͰಇ͍͍ͯΔͱݴ͍·͕ͨ͠ɺ ͦͷதͰʮ࣮ࡍʹΣϒΞϓϦΛ࡞ͬͯΈΔʯαϒνʔϜʹॴଐ͍ͯ͠·͢ɻ
Slide 13
Slide 13 text
͜ͷνʔϜͰͷ࠷ॳͷϓϩδΣΫτڈ࡞ͬͨSquooshͱ͍͏ΞϓϦͰ͢ɻWasmΛ ͬͯϒϥβͰը૾ѹॖϑΥʔϚοτมΛߦ͍·͢ɻ
Slide 14
Slide 14 text
νʔϜͰ࣍ͷϓϩδΣΫτΛߟ͑ͨ࣌ʹʮήʔϜ࡞Ζ͏Αʂʯͱ͍͏ʹͳΓ·ͨ͠ɻ
Slide 15
Slide 15 text
৭ʑͳਓʹʮwebͬͯԿ͕ಘҙͰ͔͢ʁʯͱฉ͘ͱ͍͍ͨͯʮυΩϡϝϯτʯͱ͍͏͑ ͕ฦͬͯ͘ΔͷͰਅٯͷ՝ʹτϥΠͯ͠Έ͔ͨͬͨͷͱɺήʔϜΛ࡞Δ͜ͱͰΣϒα ΠτͰྑ͘໘͢Δ՝ࢼͤΔͱࢥ͔ͬͨΒͰ͢ɻ
Slide 16
Slide 16 text
ྫ͑Ϣʔβʔ͔Βinput͕͍ͬͺ͍དྷͨΒͲ͏ͬͯॲཧ͢Ε͍͍ͩΖ͏…ͱ͔
Slide 17
Slide 17 text
ΣϒαΠτͰΞχϝʔγϣϯΛΰϦΰϦಈ͔͢͜ͱͬͯग़དྷΔ͔ͳ…ͱ͔Ͱ͢ɻ
Slide 18
Slide 18 text
ߋʹεϚʔτϑΟʔνϟʔϑΥϯ͕ࠓޙདྷΔ(͔)ͱ͍͏্͕͕͍ͬͯͨͷͰɺσεΫ τοϓ͔ΒϑΟʔνϟʔϑΥϯ·Ͱͯ͢ͷσόΠεʹରԠ͢Δ͜ͱʹ͠·ͨ͠ɻ
Slide 19
Slide 19 text
࡞ͬͨΞϓϦPROXXͱ͍͏ΞχϝʔγϣϯΛଟ༻ͨ͠ϚΠϯεΠʔύʔͷΫϩʔϯͰ ͢ɻཕͷΘΓʹʮӉͰϒϥοΫϗʔϧΛආ͚Δʯͱ͍͏ήʔϜઃఆʹ͍ͯ͠·͢ɻ
Slide 20
Slide 20 text
Ͱɺ࣮ࢪʹͲ͏ͬͯ࡞ͬͨݟ͍͖ͯ·͠ΐ͏ɻ
Slide 21
Slide 21 text
νʔϜͷεϖοΫͱͯ͜͠Μͳײ͡Ͱ͢ɻ ΞΫηγϏϦςΟͱϑΟʔνϟʔϑΥϯ୲ɺWebGL୲ɺϕʔεͷΣϒΞϓϦ୲ͱ ͍ͬͨͬ͘͟Γׂͨ͠୲Λ͠·ͨ͠ɻ
Slide 22
Slide 22 text
·ͨɺϓϩδΣΫτΛߦ͏ʹ͋ͨͬͯϝϯόʔͰԿΛେࣄʹ͢Δͷ͔Λ֬ೝ͠·ͨ͠ɻ
Slide 23
Slide 23 text
ϕʔεͷߏΛݟ͍͖ͯ·͢ɻ
Slide 24
Slide 24 text
ίʔυϕʔεͬ͘͟Γͱ͜Μͳײ͡ͰผΕ͍ͯ·͢ɻήʔϜϩδοΫήʔϜͷαΠζ ϒϥοΫϗʔϧͷҐஔܭࢉͳͲUIϨΠϠʔͱશʹͯ͋͠Γɺ͜ͷήʔϜϩδο ΫʹStateαʔϏεͱ͍͏؆୯ͳϥούʔΛט·ͤͯUIͱ࿈ܞ͍ͤͯ͞·͢ɻޙ΄Ͳ৮Ε· ͕͢ඳըॲཧͷͱ͜Ζ͚ͯ͋Γ·͢ɻ
Slide 25
Slide 25 text
͜ΕΒΛશ෦ϝΠϯεϨουͰӡ༻ͯ͠ྑ͍ͷͰ͕͢ɺ͡Ί͔ΒΞχϝʔγϣϯΛΰ ϦΰϦಈ͔͍ͨ͠ͱߟ͍͑ͯͯɺશ෦ϝΠϯεϨουͰಈ͔͢ͷਏ͍ͱߟ͑ͯ…
Slide 26
Slide 26 text
ήʔϜϩδοΫͱstateαʔϏεWebWorkerΘ͚·ͨ͠ɻ
Slide 27
Slide 27 text
Web WorkerJavaScriptΛϒϥβͷϝΠϯεϨουͱผͷεϨουͰಈ͔͢͜ͱ͕Ͱ ͖ΔΈͰɺpost messageΛͬͯεϨουؒͷΓऔΓΛ͠·͕͢ɺਖ਼͍ʹ͍͘ Ͱ͢ɻ
Slide 28
Slide 28 text
ϥοΩʔͳ͜ͱʹνʔϜϝϯόʔͷSurma͕Comlinkͱ͍͏post message ΛநԽͨ͠ϥ ΠϒϥϦΛ࡞͍ͬͯΔͷͰ࠾༻͠·ͨ͠ɻWeb Worker͕͍͍ײ͡ʹ͔ͭ͑ͯ࠷ߴͰ͢ɻ
Slide 29
Slide 29 text
ͥͻͬͯΈ͍ͯͩ͘͞ɻ
Slide 30
Slide 30 text
UIʹ͍ͭͯPreactͰ࡞͍ͬͯ·͢ɻνʔϜͰͬͨܦݧ͕͋ͬͨͷͱɺτʔλϧͷαΠ ζ͕ଞʹൺͯখ͍͔͞ΒͰ͢ɻ
Slide 31
Slide 31 text
͍ΘΏΔdivʹશ෦render()ͯ͠ɺbodyʹappend͢Δͱ͍͏γϯάϧϖʔδΞϓϦέʔ γϣϯߏͰ͕͢ɺͦͷ··ΫϥΠΞϯτʹૹΔͷͰͳ͘ɺϏϧυ͢Δͱ͖ʹ PuppeteerΛͬͯpre-renderΛߦ͍ͬͯ·͢ɻ
Slide 32
Slide 32 text
Puppeteerheadless chromeΛεΫϦϓτͰಈ͔͢ϥΠϒϥϦͰ͢ɻ PuppeteerͰΞΫηεͯ͠ϨϯμϦϯά͞ΕͨHTMLͷ݁ՌΛindex.htmlʹॻ͖ࠐΜͰ͍· ͢ɻ
Slide 33
Slide 33 text
͓ͦΒ͘ύϑΥʔϚϯε໘ͰҰ൪ޮՌ͕͋ͬͨͷΞϓϦͰඳըॲཧΛͨ͜͠ͱͰ͢ɻ
Slide 34
Slide 34 text
࠷ॳTableʹϘλϯΛฒͯɺGPUΛ͏CSSΞχϝʔγϣϯͰ࣮͠Α͏ͱߟ͍͑ͯͨ ͷͰ͕͢…
Slide 35
Slide 35 text
͕ͯ͢1ϨΠϠʔʹ͋ΔͱɺϘλϯͻͱͭΛผͷ৭ʹม͑Δ͚ͩͰtableશମ͕paint͞Ε Δͱ͍͏Chromeͷόάʹૺ۰͠·ͨ͠
Slide 36
Slide 36 text
͜͏͍ͬͨ߹ͷղܾࡦͱͯ͠ϨΠϠʔΛ͚Δͱ͍͏ॲཧ͕͋Γ·͢ɻ
Slide 37
Slide 37 text
ϒϥβͷϨϯμϦϯάCompositͱ͍ΞΠσΞΛ࠾༻͓ͯ͠Γɺޙʑಈ͍ͨΓopacity ͕มΘͬͨΓ͢ΔཁૉϨΠϠʔʹผ͚͓ͯ͘ͱϨϯμϦϯά͕ૣ͘ͳΓ·͢ɻ
Slide 38
Slide 38 text
DevToolsͰLayerύωϧͰͲͷཁૉ͕ϨΠϠʔʹผΕ͍ͯΔ͔֬ೝ͢Δ͜ͱ͕Ͱ͖·͢ɻ
Slide 39
Slide 39 text
ϨΠϠʔʹ͚ΕPaintͷόάճආͰ͖ΔͷͰ͕͢ɺࠓճϘλϯͻͱͭͻͱͭʹϨΠ ϠʔΛ͚ͭΔͱϨΠϠʔ͕૿͑͗ͯ͢ٯʹϝϞϦͷํͰʹͳΔͷͰɺ͜ͷํ๏ݟૹ Γ·ͨ͠ɻ
Slide 40
Slide 40 text
ϒϥβʹඳըΛ͓·͔͔ͤͨͬͨ͠ͷͰ͕͢ɺύϑΥʔϚϯε໘Ͱ͜͠ͱ͕Θ͔ͬͨ ͋ͷͰɺࣗͨͪͰCanvasʹඳը͢Δ͜ͱʹ͠·ͨ͠ɻ
Slide 41
Slide 41 text
࣮ࡍόοΫάϥϯυͷCanvasͱάϦουͷCanvasͱ͍͏2ͭͷCanvasΛॏͶ͍ͯ· ͢ɻ(͜Εࠓޙ1ͭʹϚʔδ͢Δ༧ఆͰ͢)
Slide 42
Slide 42 text
͜ΕΒΛrequestAanimationFrameΛͬͯΞχϝʔγϣϯ͍ͤͯ͞·͢ɻ
Slide 43
Slide 43 text
requestAnimationFrameϒϥβ͕֤ϑϨʔϜΛߋ৽͢ΔλΠϛϯάͰcall backͰ͠ ͨεΫϦϓτΛ࣮ߦͯ͘͠ΕΔAPIͰ͢ɻ Ξχϝʔγϣϯͷ߹࠶ىతʹͰݺͼग़͢͜ͱͰຖϑϨʔϜ͝ͱʹඳըίϚϯυΛ࣮ߦ ͠·͢ɻ
Slide 44
Slide 44 text
͜ͷลʹ͍ͭͯͬͱΓ͍ͨਓɺϒϥβͲ͏ͬͯಈ͍͍ͯΔͷ͔ௐͨهࣄΛ ॻ͍ͨͷͰͥͻࢀߟʹ͍ͯͩ͘͠͞ɻ
Slide 45
Slide 45 text
ඳըͰͦͷଞʹ͍͔ͭ͘ରࡦΛ͠·ͨ͠ɻ
Slide 46
Slide 46 text
όοΫάϥϯυͷΞχϝʔγϣϯݩʑϘέͨσβΠϯͩͬͨͷͰ1/5ͷαΠζͰ࡞͠ Ҿ͖ͷͯ͠(ͦΕͰશવOK)͍·͢ɻ ֤ηϧͷΞχϝʔγϣϯεϓϥΠτΛ࡞͓ͯ͠ΓɺΫϥΠΞϯταΠυͰੜͨ͠ ͷΛindexed DBʹอଘ͍ͯ͠·͢ɻʢը૾Ұαʔόʔ͔ΒૹΓ·ͤΜʣ
Slide 47
Slide 47 text
ΞΫηγϏϦςΟʹ͍ͭͯؤுͬͯରԠ͠·ͨ͠ɻ
Slide 48
Slide 48 text
ϏδϡΞϧ͚ͩߟ͑ΕɺCanvasͰήʔϜΛ࡞Δ͜ͱग़དྷΔͷͰ͕͢ɺ͜ΕͩͱεΫ ϦʔϯϦʔμʔରԠ͕େมͰ͢ɻ
Slide 49
Slide 49 text
ͦͷͨΊɺ࣮tableͱbuttonͷHTMLཁૉϨΠϠʔΛಁ໌ͰॏͶ͍ͯ·͢ɻ
Slide 50
Slide 50 text
HTMLཁૉΛͤΔ͜ͱͰɺཁૉʹϑΥʔΧεͨ͠Γ֤Ϙλϯʹevent listnersΛ͚ͭͨΓ ͢Δ͜ͱ͕Ͱ͖ͯศརͰ͢ɻ
Slide 51
Slide 51 text
ϒϥβHTMLͷཁૉʹͨ͘͞ΜͷΞΫηγϏϦςΟػೳ͕ೖ͍ͬͯΔͷͰͦͷԸܙʹ ༬͔͍ͬͯ·͢ɻ
Slide 52
Slide 52 text
εΫϦʔϯϦʔμʔͰΞΫηε͢Δͱ”hidden”ͷ෦͚͕ͩࢲୡͷίʔυͰ͚ͭͨlabel ͰɺͦͷଞͷҐஔใશ෦ϒϥβ͕ఏڙͯ͘͠Ε·ͨ͠ɻ
Slide 53
Slide 53 text
TableཁૉΛ͍ͬͯΔͷͰrole=gridΛઃఆ͢Δ͜ͱͰࠓfocusͷ͋ΔηϧͷҐஔΛಡΈ্ ͛ͯ͘ΕΔΑ͏ʹͳΓ·͢ɻ
Slide 54
Slide 54 text
…ຊrole=gridΛೖΕΔ͚ͩͰରԠͯ͘͠ΕΔͣͳͷͰ͕͢ɺϒϥβ͕͏·͘ೝࣝ ͯ͘͠Εͳ͔ͬͨͷͰrole=rowͱrole=gridcellarrtibuteʹॻ͖ࠐΜͰ͍·͢ɻ
Slide 55
Slide 55 text
ήʔϜͷάϦουʹroving tabindexͱ͍͏ख๏Λ࠾༻͠·ͨ͠ɻ
Slide 56
Slide 56 text
Ϙλϯ͕ͨ͘͞ΜฒΜͰ͍ΔͷͰɺͦͷ··ͩͱΩʔϘʔυૢ࡞Ͱͯ͢ͷϘλϯʹ ϑΥʔΧε͔ͯ͠ΒͰͳ͍ͱάϦου֎ͷϘλϯϦϯΫʹ౸ୡͰ͖·ͤΜɻ
Slide 57
Slide 57 text
ͦ͜ͰάϦουͷதͰϑΥʔΧεͰ͖ΔϘλϯ(tablindex=0)Ұ͚ͭͩͰͦͷଞϑΥʔ ΧεͰ͖ͳ͍Α͏ʹͯ͠ҹΩʔͰૢ࡞ͨ࣌͠ʹ0ͱ-1ͷҐஔΛͣΒ͍ͯ͠·͢ɻ
Slide 58
Slide 58 text
͜͏͢Δ͜ͱͰTabΛҰճԡͤϑΥʔΧεΛάϦου֎ʹग़͢͜ͱ͕ग़དྷΔΑ͏ʹͳΓ ·͢ɻ
Slide 59
Slide 59 text
ϑΥʔΧεϦϯάʹ͍ͭͯʮϚεૢ࡞ͷਓʹݟͤͨ͘ͳ͍ɺͰΩʔϘʔυૢ࡞ͷ ਓʹग़͍ͨ͠ʯͱ͍͏෦ͷ࣮ʹɺfocus-visibleͷpolyfilΛ͍ͬͯ·͢ɻ
Slide 60
Slide 60 text
ΞΫηγϏϦςΟʹ͍ͭͯweb.devʹνϡʔτϦΞϧ͕͋ΔͷͰݟͯΈ͍ͯͩ͘͞ɻ
Slide 61
Slide 61 text
ϓϩδΣΫτͰσεΫτοϓͱKaiOSͰςετ͓ͯ͠Γ͏·͘ಈ͍͍ͯͨͷͰ͕͢ ϩʔεϖοΫͳAndroidεϚϗͰಈ͔ͳ͍ͱ͍͏ࣄଶʹ໘͠·ͨ͠ɻ
Slide 62
Slide 62 text
ͦͦϑΟʔνϟʔϑΥϯඇྗͳϋʔυΣΞͰಈ͔͢ϐΫηϧͷ͕ݶΒΕ͍ͯ ΔͷͰ͋Δఔಈ͖·͢ɻ ͜Ε͕εϚʔτϑΥϯʹͳΔͱɺͪΐͬͱྑ͍ϋʔυͰಈ͔͢ϐΫηϧ͕ഒʹͳ ΓɺΪϒΞοϓͯ͠͠·͍·͢ɻ
Slide 63
Slide 63 text
ݩʑΞΫηγϏϦςΟͰprefers reduced motionରԠͷͨΊΞχϝʔγϣϯແ͠ͷόʔ δϣϯ࡞Δඞཁ͕͋ͬͨͷͰɺͦΕΛͬͯඇྗͳσόΠεʹ࠷ॳ͔ΒΞχϝʔγϣ ϯແ͠Ͱग़͢Α͏ʹ͠·ͨ͠ɻhighp fragment shader͕͑Δ͔Ͱஅ͍ͯ͠·͢ɻ
Slide 64
Slide 64 text
Inputʹ͍ͭͯσόΠεʹΑ༷ͬͯʑͳͷʹରԠ͍ͯ͠·͢ɻ
Slide 65
Slide 65 text
ʮΫϦοΫͯ͠ηϧΛ։͚ΔʯͱʮηϧʹϑϥάΛཱͯΔʯͱ͍͏2ͭͷίΞૢ࡞ΛσόΠ εʹΑͬͯ৭ʑͳํ๏Ͱఏڙ͍ͯ͠·͢ɻ
Slide 66
Slide 66 text
ͨͩ͠ύϑΥʔϚϯεΛߟ͑ͨ࣌ʹݟૹͬͨUX༗Γ·͢ɻPinch Zoomϒϥβඪ४ ͷεΫϩʔϧΛ࠾༻͢ΔͨΊʹݟૹΓ(εΫϩʔϧʹ͘Ԡ͢Δ͜ͱΛ༏ઌ)ɺμϒϧλο ϓͨͱ͑γϯάϧλοϓͰμϒϧλοϓ͔Ͳ͏͔ͷ֬ೝͷͨΊʹͨͳ͍͚ͯ͘ͳ ͍ͷͰݟૹΓ·ͨ͠ɻ
Slide 67
Slide 67 text
͞ΒʹɺϑΟʔνϟʔϑΥϯͰ͜ΕΒͷૢ࡞͕͑ͳ͍ͷͰ…
Slide 68
Slide 68 text
ࣈΩʔʹΞΫγϣϯΛׂΓͯΔ͜ͱͰରԠ͠·ͨ͠ɻ ͦͷଞʹϑΟʔνϟʔϑΥϯ͚ͷσβΠϯΛ͍͔ͭ͘ఏڙ͍ͯ͠·͢ɻ
Slide 69
Slide 69 text
Ϛε͋ΔͷͰ͕͢ɺը໘͕খ͘͞ήʔϜதʹͲͷηϧ͕ࠓબ͞Ε͍ͯΔͷ͔ݟͮΒ ͍ͷͰɺখ͍͞ը໘ͷ߹ϑΥʔΧεΛݟ͑ΔΑ͏ʹ͍ͯ͠·͢ɻΞΫηγϏϦςΟͰ ΩʔϘʔυૢ࡞ରԠͰ࡞ͬͨΛqvgaαΠζͷը໘ʹσϑΥϧτͰग़͢Α͏ʹͳ͍ͬͯ ·͢ɻ
Slide 70
Slide 70 text
աڈͷΨϥέʔαΠτΛࢀߟʹͯ͠ɺΩʔૢ࡞ͷΨΠυදࣔͤ͞·ͨ͠ɻ
Slide 71
Slide 71 text
Ϣʔβʔ͕සൟʹ͏ػೳʹ͍ͭͯγϣʔτΧοτΛ͚͍ͭͯ·͢ɻ(ʮμΠΞϩάΛด ͡ΔʯͳͲ)
Slide 72
Slide 72 text
͜ͷγϣʔτΧοτ͕ແ͍ͱɺ͍μΠΞϩάΛಡΜͰ͍Δ࣌ʹɺด͡Δʹʮͣʔͬͱ ্·ͰεΫϩʔϧ͔ͯ͠ΒॳΊͯ✗ϘλϯΛΫϦοΫͰ͖Δɻʯͱ͍ͬͨΠέ͍ͯͳ͍UX ʹͳͬͯ͠·͍·͢ɻ
Slide 73
Slide 73 text
PWAͳͷͰServiceWorkerΛ͔ͭͬͯΦϑϥΠϯΞΫηεʹରԠ͍ͯ͠·͢ɻ
Slide 74
Slide 74 text
Ξοϓσʔτ͕͋ͬͨ࣌ʹʮϦϩʔυ͍ͯͩ͘͠͞ʯͱ͍ΞφϯεΛग़͢͜ͱ͕ଟ͍Ͱ ͕͢ɺࠓճήʔϜͳͷͰɺͰ͖Δ͚ͩϢʔβʔͷʮήʔϜΛ͍ͨ͠ʯॠؒΛःΒͳ͍Α ͏ʹ…
Slide 75
Slide 75 text
ελʔτϘλϯͷதʹΞοϓσʔτͷϩδοΫΛຒΊࠐΈ·ͨ͠ɻ
Slide 76
Slide 76 text
ελʔτͨ࣌͠ʹ৽͍͠όʔδϣϯ͕͋Εऔ͖ͬͯͯΠϯετʔϧ͠ɺྃͨ͠Β ήʔϜը໘ͷදࣔΛ͠·͢ɻͭ·ΓɺϢʔβʔ͕͜ͷήʔϜը໘ʹߦ͖ண͘ͱ͖ʹ͢Ͱ ʹ৽͍͠όʔγϣϯ͕දࣔ͞ΕΔΈͰ͢ɻ
Slide 77
Slide 77 text
ϩʔσΟϯάʹ͍ͭͯ݁ߏ৻ॏʹରԠ͠·ͨ͠ɻ
Slide 78
Slide 78 text
·ͣ࠷ॳʹૹΒΕΔindex.html20kbɺ͜ΕҰ൪࠷ॳʹϢʔβʔ͕͢Δͷશ෦͕ ೖ͍ͬͯ·͢ɻ
Slide 79
Slide 79 text
ͭ·Γ͜ͷը໘…
Slide 80
Slide 80 text
…͍ɺΞχϝʔγϣϯlazy load͢ΔͷͰ͜ͷը໘Ͱ͢ɻ ΣϒϑΥϯτΛ͍ͬͯ·͕͢ɺ͍ͬͯΔΞϧϑΝϕοτ͚ͩαϒηοτͯ͠ɺΠϯ ϥΠϯͰindex.htmlʹຒΊࠐΜͩΓ͍ͯ͠·͢ɻ
Slide 81
Slide 81 text
ͦͷଞඞཁʹͳΔίʔυͯ͢ޙ͔Β͚ͯૹΓ·͢ɻ
Slide 82
Slide 82 text
ࠓճRollupΛ࠾༻͠·ͨ͠ɻ
Slide 83
Slide 83 text
ͱ͍͏ͷɺComlink͕ڞ௨dependencyͱͯ͋͠ΔͷͰ͕͢…
Slide 84
Slide 84 text
webpackͩͱಉ͡ίʔυͳͷʹ2ͭͷchunkͱͯ͠ѻΘΕͯ͠·͍·͢ɻ
Slide 85
Slide 85 text
͋ͱ, webpackνʔϜͰ͍·͍ͪ௫Ίͳͯ͘ɺӡ༻͕ਏ͔ͬͨܦݧ͕͋ΔͷͰࠓճ ύε͠·ͨ͠ɻ
Slide 86
Slide 86 text
RollupͰ࠷ॳ͔Β1ͭͷchunkͱͯ͠ѻͬͯ͘ΕΔͷͰσʔλͷݮ͕Ͱ͖Δͷͱɺ
Slide 87
Slide 87 text
ϓϥάΠϯͷγεςϜ͕Θ͔Γ͘͢ɺϓϩδΣΫτʹ߹ͬͨߏʹͳΔΑ͏ʹࣗ৴Λ ͬͯΧελϚΠζ͕Ͱ͖·ͨ͠ɻ
Slide 88
Slide 88 text
ͪͳΈʹworkerͰJSϞδϡʔϧ͕·ͩ͑ͳ͍ͷͰɺRollupͷΞτϓοτʹ͋Θͤͨ AMDϩʔμʔͷΑ͏ͳͷΛ͍ͬͯ·͢ɻ͜ΕϓϥάΠϯͱͯ͠࡞Γ·ͨ͠ɻ
Slide 89
Slide 89 text
πʔϧ͚ͩͰͯ͢ղܾͰ͖ΔͰͳ͘ɺ݁ߏ৻ॏʹϩʔσΟϯάվળʹऔΓΈ· ͨ͠ɻ
Slide 90
Slide 90 text
ྑ͚Ε͜ͷϓϧϦΫΛݟͯΈ͍ͯͩ͘͞ɻ
Slide 91
Slide 91 text
ྫ͑ήʔϜͷ্ʹ͋ΔτοϓόʔͰ͕͢ɺ
Slide 92
Slide 92 text
λΠϚʔͳͲϞϦϞϦͷػೳ͕ೖ͍ͬͯΔͷʹɺτοϓϖʔδͰͦ͏͍ͬͨػೳҰ ඞཁͳ͍ͨͩͷϩΰόφʔͰ͢ɻ
Slide 93
Slide 93 text
ͦ͜Ͱશ෦Γͷίϯϙʔωϯτͱόφʔ͚ͩͷγϯϓϧίϯϙʔωϯτʹ͚ͯɺ࠷ॳ ʹૹΔϑΝΠϧαΠζͷݮΛ͠·ͨ͠ɻ
Slide 94
Slide 94 text
ͪͳΈʹϓϧϦΫΛૹΔ͝ͱʹTravisͰαΠζϨϙʔτͷεΫϦϓτΛಈ͔ͯ͠ɺϑΝΠϧ ໊αΠζมߋͷ֬ೝΛߦ͍ͬͯ·͢ɻ
Slide 95
Slide 95 text
࠷ޙʹɺࠓճͷܦݧͯ͠ษڧʹͳͬͨ͜ͱҎ্ͷ3Ͱ͢ɻϓϩδΣΫτͰԿΛ༏ઌ͢Δ ͷ͔ܾΊͨ͜ͱͰɺσβΠϯͷΞΠσΞ(μϒϧλοϓͱ͔)͕ग़ͯͲͪΒ͕ྑ͍͔ݴ͍߹ ͏͜ͱͳ͙͘͢ʹҙࢥܾఆ͕Ͱ͖·ͨ͠ɻ·ͨweb workerແ͠ͰεϖοΫͳϩʔΤϯ υσόΠεͰಈ͘ήʔϜΛͭ͘Δ͜ͱ͔ͬͨ͠ͱײ͍ͯ͡·͢ɻ
Slide 96
Slide 96 text
ͨͩྑ͘πΠολʔͰʮ͜ΜͳΞϓϦ͕࡞ΕΔͷϒϥβϕϯμʔʹॴଐ͍ͯ͠Δνʔ Ϝ͚ͩͩʯͱݴΘΕΔͷͰ͕͢ɺผʹͳʹ͔ಛผͳ͜ͱΛ͍ͯ͠ΔΘ͚ͰϒϥβΤϯ δχΞ͕ಛผͳຐ๏Λ͔͚ͯ͘ΕͨΘ͚Ͱ͋Γ·ͤΜɻ
Slide 97
Slide 97 text
ڧ͍ͯݴ͏ͳΒɺνʔϜͷҙࣝͱͯ͠ʮΤϯδχΞ͕࡞Γ͍͢ɾσβΠϯ͕දݱ͢͠ ͍ʯΑΓʮϢʔβʔ͕͍͍͢ʯΛѹతʹ༏ઌͯ͠ҙࢥܾఆΛ͍ͯ͠·͢ɻ ͦ͏͍͏ҙࣝΛࣗવͱ࣋ͯΔจԽ͕͋Δͷ͋͋Γ͕͍ͨͰ͢ɻ
Slide 98
Slide 98 text
ͱ͍ͬͯࣄۀձࣾͷϓϩμΫτӡӦͱҧ͏͜ͱଟ͍ͷͰɺࠓޙ࣮ࡍʹϓϩμΫτ νʔϜ͕໘͢ΔͰ͋Ζ͏՝(ྫ͑ࠂͱ͔)ʹτϥΠͯ͠Έ͍ͨͱࢥ͍ͬͯ·͢ɻ
Slide 99
Slide 99 text
࡞ͬͨήʔϜproxx.appͰ༡Ϳ͜ͱ͕Ͱ͖·͢ɻ ίʔυશ෦githubʹ্͍͛ͯΔͷͰɺͥͻࢀߟʹͯ͠Έ͍ͯͩ͘͞ɻ
Slide 100
Slide 100 text
͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ