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

橋の下で安心して寝るための 『iOSアプリ設計パターン入門』

79d8818c9cb52a0e297f44b9ff4aa8c2?s=47 kameike
January 15, 2019

橋の下で安心して寝るための 『iOSアプリ設計パターン入門』

79d8818c9cb52a0e297f44b9ff4aa8c2?s=128

kameike

January 15, 2019
Tweet

Transcript

  1. ڮͷԼͰ҆৺ͯ͠৸ΔͨΊͷ ʰJ04ΞϓϦઃܭύλʔϯೖ໳ʱ   QJYJWJOD !LBNFJLF

  2. !LBNFJLF   w ೥ͷ݄͙Β͍͔ΒQJYJWͰಇ͍͍ͯ·͢ w ෱Ԭग़਎

  3.   ʰΦϒδΣΫτࢦ޲ʹ͓͚Δ࠶ར༻ͷͨΊͷσβΠϯύλʔϯʱ

  4.   ຊ୊

  5.   lઃܭ͸ͦͷϓϩδΣΫτͷཁ݅΍νʔϜن໛ɺܦݧͳͲʹΑͬ ͯࠨӈ͞Ε·͢ɻ͜ͷઃܭύλʔϯ͕ઈରʹ౰ͯ͸·Δͱ͍ ͏ɺ͍ΘΏΔۜͷ஄ؙ͸͋Γ·ͤΜɻz

  6. lࣄલʹݻఆԽ͞ΕͨϚελʔϓϥϯʹै͏ͷͰ͸ͳ͘ɺͦͷ ࣌ʑͷঢ়گʹ߹Θͤͯॊೈʹमਖ਼ɺ෮ݪɺ֦ுɺվળ͢Δ͜ͱ ͕ॏཁz   Christopher Alexander

  7.  

  8.   ܞΘ͍ͬͯΔ ϓϩμΫτʹͱͬͯϕλʔͳ ઃܭͱ͸ͳΜͩΖ͏ʜ 

  9.   έʔεόΠέʔε ΈΜͳݴ͍ͬͯΔ͠ʜ

  10.   ࠓࣗ෼͕΍͍ͬͯΔந৅Խ͸ ྑ͍ํ޲ɺਖ਼͍͠ํ޲ʹ ޲͔͍ͬͯΔͷͩΖ͏͔ʁ

  11.  

  12.   ͦΜͳͱ͖ʜ

  13.  

  14.   lϩʔϚ࣌୅ͷΤϯδχΞ͸ɺ ࣗ෼ͷݐͯͨڮͷԼͰ ͠͹Β͘ա͝͞ͳ͚Ε͹ͳΒͳ͔ͬͨɻz ʰ൓੬ऑੑʦԼʧʕʕෆ࣮֬ͳੈքΛੜ͖ԆͼΔ།Ұͷߟ͑ํʱɹφγʔϜɾχίϥεɾλϨϒ ๬݄Ӵ ઍ༿හੜॱ

  15.  

  16.   ڮͷԼͰ৸ͯΔࣗ෼͕ ͨͲΓண͍ͨઃܭ͸ େ੾ʹ͍͍ͯ͠ઃܭ

  17.   ࣗ෼͕ݐͯͨ ڮͷԼͰ਒͑ͯ຾Βͳ͍ͨΊʹʜ

  18.   ͜Μͳʹศརʂ ʰJ04ΞϓϦઃܭύλʔϯೖ໳ʱ

  19.   lγϯϓϧͳγεςϜ͔ΒਐԽͯ͠ෳࡶͳγεςϜ͕ੜ·ΕΔͷ͸ɺ ҆ఆͨ͠தؒతͳܗଶ͕͋Δͱ͖͚ͩͰ͢ɻ݁Ռͱͯ͠ੜ·ΕΔ ෳࡶͳܗଶ͸ɺඞવతʹώΤϥϧΩʔͷ͋Δ΋ͷʹͳΓ·͢ɻz ੈք͸γεςϜͰಈ͘ʕ͍·ى͖͍ͯΔ͜ͱͷຊ࣭Λ͔ͭΉߟ͑ํυωϥɾ̝ɾϝυ΢ζ ࢬኍ३ࢠ খాཧҰ࿠ॱ

  20.   ෳࡶ͞͸ ʰγϯϓϧͳதؒঢ়ଶʱͷ ૊Έ߹ΘʹΑΓ੒͠਱͛ΒΕΔ

  21.   ઃܭ 㲈 ύλʔϯԽͱύλʔϯͷ֊૚Խ Ͱෳࡶ͞Λ৐Γ͜ͳ͍ͯ͘͠

  22.   Christopher Alexander

  23.   ύλʔϯɾϥϯήʔδ૑଄తͳະདྷΛͭ͘ΔͨΊͷݴޠ ϦΞϦςΟɾϓϥε Ҫఉਸ ஶ ฤू த೮ത ஶ ஛தฏଂ

    ஶ ߐ౉ߒҰ࿠ ஶ த੢ହਓ ஶ ӋੜాӫҰ ஶ IUUQXFCTGDLFJPBDKQdJCBQBQFST1631-40$@1SPQFSUJFTQEG
  24.   IUUQTXXXTMJEFTIBSFOFUUBLBTIJJCBUIFOBUVSFPGPSEFS

  25.   छྨͷ ઃܭͷύλʔϯ छྨͷந৅తͳঢ়ଶ

  26.   6*,JU IUUQTEFWFMPQFSBQQMFDPNMJCSBSZBSDIJWFEPDVNFOUBUJPO$PDPB$PODFQUVBM$PSF"OJNBUJPO@HVJEF *OUSPEVDUJPO*OUSPEVDUJPOIUNMBQQMF@SFGEPDVJE51

  27.   ෳࡶ͞Λ৐Γ͜ͳ͢ʹ͸ ʰγϯϓϧͳதؒঢ়ଶʱ͕ඞཁ

  28.   ઃܭύλʔϯ 㲈 ʰγϯϓϧͳதؒঢ়ଶʱͱ ͦͷ࢖͍ํͷΧλϩά

  29.   J04ઃܭύλʔϯͷཱͪҐஔ 4XJGUͷදݱ Ϗδωεཁٻ ʹର͢Δදݱ ϥΠϒϥϦ΍044܈ ઃܭύλʔϯ

  30.   Ұൠతͳઃܭύλʔϯͷٞ࿦ 4XJGUͷදݱ Ϗδωεཁٻ ʹର͢Δදݱ ϥΠϒϥϦ΍044܈ ઃܭύλʔϯ

  31.   ʰJ04ઃܭύλʔϯೖ໳ʱͷٞ࿦ͷΧόϨοδ 4XJGUͷදݱ ϥΠϒϥϦ΍044܈ Ϗδωεཁٻ ʹର͢Δදݱ ઃܭύλʔϯ

  32.   ͱͯ΋͓͢͢Ίʂ ʰJ04ΞϓϦઃܭύλʔϯೖ໳ʱ

  33.   ЋͰ ࣮຿Ͱͷઃܭͷ࿩Λ͠·͢ɻ

  34.   lઃܭ͸ͦͷϓϩδΣΫτͷཁ݅΍νʔϜن໛ɺܦݧͳͲʹΑͬ ͯࠨӈ͞Ε·͢ɻ͜ͷઃܭύλʔϯ͕ઈରʹ౰ͯ͸·Δͱ͍ ͏ɺ͍ΘΏΔۜͷ஄ؙ͸͋Γ·ͤΜɻz

  35. w Ϗδωεతͳཁ݅ w جຊతͳອըΞϓϦΛϕʔε w Ϗδωε্ͷΞϓϩʔν͸ఆ·͓ͬͯΒͣࢼߦࡨޡΛ܁Γฦ͢ඞཁ͕͋Δɻ w ن໛ɾظؒ w ࣾ಺νʔϜ͸dਓ

    J04 "OESPJE αʔόʔαΠυ σβΠϯ $4 1. 10  w ࠓޙ਺೥͸ؔΘΔͰ͋Ζ͏ϓϩμΫτ w ٕज़తͳഎܠ w ͜ͷϨϕϧͷن໛ͷ΋ͷΛҰਓͰอकɾ։ൃ͢Δͷ͸ॳ w ్த͔ΒҾ͖ܧ͗   1BMDZͷഎܠɺ͋ΏΈ
  36.   খن໛ ௕ظత /PUΤΩεύʔτ

  37.   ϕʔε͸.77.

  38. w 7JFX.PEFM 7JFX$POUSPMMFSʹґଘੑΛͲ͏΍ͬͯ஫ೖ͢Δ͔ʁ w Ͳ͏΍ͬͯ7JFX$POUSPMMFSͱ7JFX.PEFMΛCJOE͢Δ͔ w 7JFX.PEFM͕ͲͷΑ͏ʹσʔλʹΞΫηε͢Δͷ͔ʁ w ͲͷΑ͏ʹͯ͠ςελϏϦςΟΛ୲อ͢Δͷ͔ʁ w

    ൚༻తͳ-PBEJOH΍ɺΤϥʔΛͲ͏΍ͬͯڞ௨Խ͢Δ͔ w FUDʜ   .77.Ͱ΋ΑΓΑΓܗΛٻΊͯมԽ͍ͯͬͨ͠
  39.   ʮ઴ਐత੒௕ʯ Christopher Alexander

  40. w θϩΠνͰ͸ͳ͘ɺྑ͍ܗʹΉ͚ͯঃʑʹҠߦͰ͖Δ͜ͱ w ҰਓͷνʔϜͰҰؾʹશ෦ॻ͖׵͑Δͷ͸ݱ࣮తͰ͸ͳ͍ w ࢼߦࡨޡ͠ɺ஌ݟ͕஝ੵͰ͖ΔΑ͏ͳঢ়ଶ   ઴ਐత੒௕

  41.   ʰ઴ਐత੒௕ʱʹରͯ͠ ศརͩͬͨͭͷ5JQT

  42.   5JQT ϓϩδΣΫτΛॎʹׂΔʂ 5JQT ઃܭͷ࿹׳Β͠ͱͯ͠ͷ#-P$ύλʔϯ

  43.   5JQT ϓϩδΣΫτΛॎʹׂΔʂ

  44.   ProjecctRoot ViewController ViewModel StoryBoard ComicDetailsViewController.swift ComicDetailsViewModel.swift SearchViewModel.swift SearchViewController.storyboard

    SearchViewController.swift ComicDetailsViewController.storyboard ProjecctRoot ComicDetails Search ComicDetailsViewController.swift ComicDetailsViewModel.swift ComicDetailsViewController.storyboard … ԣׂΓͷϑΥϧμߏ੒ ॎׂΓͷϑΥϧμߏ੒
  45. w ࠷ॳ͸7JFX.PEFMͰ4FTTJPOΛ௚Ͱѻ͍ͬͯͨˠςετ͕ॻ͖ͮΒ͍ w 'MVYΛϕʔεʹɺϦΫΤετঢ়ଶͷ4UPSFͱϦΫΤετͷ%JTQBUDIFSΛͭͬͯ͘%*͢Δ Α͏ʹˠCPJMFSQMBUF͕૿͑͗ͯͭ͢Β͍ w 3FQPTJUPSZ૚Λͭͬͯ͘(FOFSJDTΛ׆༻ͯ͠%*͢ΔΑ͏ʹ   7JFX.PEFMͷѻ͍ํ͕มભ͍ͯͬͨ͠

  46. w ͲΕ͕࠷৽͕Θ͔Βͳ͍ w Өڹൣғ΍ɺదԠൣғ͕Θ͔Βͳ͍ɻ w ํ਑Λॻ͘ͱͨ͠ΒผͰ͔ͬ͠Γͱ·ͱΊͳͯ͘͸ͳΒͳ͍   ͦΜͳதͰͷԣׂΓͷਏ͞

  47.   ॎׂΓʹ͢Δͱ খ͞ͳվળ΍ ৽͍͠΋ͷͷಋೖʹ׮༰ʹʜ

  48.   $IBOHF-PHͱରԠ͕औΓ΍͍͢

  49.   3&"%.&Λஔ͘͜ͱ͕Ͱ͖Δ ProjecctRoot ComicDetails Search ComicDetailsViewController.swift README.md ComicDetailsViewModel.swift ComicDetailsViewController.storyboard

  50.   ৽͘͠ೖ͖ͬͯͨਓʹɺ ࠓͷͱ͜Ζͷ࠷ળҊ ΍ݱঢ়Λ఻͑΍͍͢

  51.   5JQT ઃܭͷ࿹׳Β͠ͱͯ͠ͷ#-P$ύλʔϯ

  52.   #VTJOFTT-PHJD$PNQPOFOU ˣ #-P$

  53.   ݶఆతͳൣғʹ͓͍ͯ ϏδωεϩδοΫΛղܾ͢Δ ίϯϙʔωϯτΛ࡞Δ

  54.   #VJMESFBDUJWFNPCJMFBQQTXJUI'MVUUFS (PPHMF*0` 

  55.   ʰখ͘͞ಋೖʱͰޮՌΛ࣮ײͰ͖Δ Φʔόʔϔουͷগͳ͍ Φεεϝͷύλʔϯ

  56.   PlacePicker Form OK Name Place

  57. w ໊લͱ৔ॴΛߋ৽Ͱ͖Δ w ৔ॴ͕೔ຊ͡Όͳ͍ͱૹ৴Ͱ͖ͳ͍ w ໊લ͕ۭจࣈͩͱૹ৴Ͱ͖ͳ͍   ϏδωεϩδοΫ

  58.   OK Name Place PlacePicker Form FormBLoC

  59.   OK Name Place PlacePicker Form FormBLoC GVODVQEBUF/BNF UPOFX/BNF4USJOH

    WBSOBNF0CTFSWBCMF4USJOH\HFU^ WBSQMBDF0CTFSWBCMF$(1PJOU\HFU^ WBSJT7BMJE0CTFSWBCMF#PPM\HFU^ GVODVQEBUF1MBDF UPOFX/BNF$(1PJOU
  60.   OK Name Place PlacePicker Form FormBLoC GVODVQEBUF/BNF UPOFX/BNF4USJOH

    WBSOBNF0CTFSWBCMF4USJOH\HFU^ WBSQMBDF0CTFSWBCMF$(1PJOU\HFU^ WBSJT7BMJE0CTFSWBCMF#PPM\HFU^ GVODVQEBUF1MBDF UPOFX/BNF$(1PJOU
  61.   FormBLoC OK Name Place WBSQMBDF0CTFSWBCMF$(1PJOU\HFU^ GVODVQEBUF1MBDF UPOFX/BNF$(1PJOU

  62.   খͯ͘͞ศརʂ

  63.  

  64.   4XJGUͷදݱ ϥΠϒϥϦ΍044܈ Ϗδωεཁٻ ʹର͢Δදݱ ઃܭύλʔϯ

  65. w Өڹൣғ͕ݶఆతˠଟগԼखΛͯ͠΋େৎ෉ͳͷͰࢼ͠΍͍͢ w ͱͯ΋γϯϓϧͰΘ͔Γ΍͍͢ɻ w ৭ʑͳύλʔϯ΁ͷൃల΁ͷಎ࡯Λಘ΍͍͢ w #-P$͸มԽΛٴ΅͢࡞༻ʢ"DUJPOʣͱมԽͷ؍ଌ 4UPSF ʹ෼͚Δˠ'MVYతʹ

    w #-P$ͷঢ়ଶΛ7JFXʹόΠϯυ͢Δʹ͸ʜˠ.77.΍.71΁ͷ଍͕͔Γ w ͲͷΑ͏ʹ7JFX΍7JFX$POUSPMMFSʹ#-P$Λ౉͍͔ͯ͘͠ˠ૚ͷؒͷ%* w #-P$Λελϒͨ͠Γɺ#-P$ͷςετΛॻ͍ͯΈΔˠ૚Λ෼ׂͨ͠ԸܙΛ࣮ײͰ͖Δ   ઃܭͷ࿹׳Β͠ͱͯ͠#-P$ͷ͕͓͜͜͢͢Ί
  66.   ·ͱΊ w ڮͷԼͰ҆৺ͯ͠৸ΔͳΒʰJ04ΞϓϦઃܭύλʔϯೖ໳ʱ w খ͘͞௕ظతͳϓϩδΣΫτͰ͋Ε͹ɺ઴ਐత੒௕Λ໨ࢦͯ͠ࢼߦࡨޡ͢ΔͱΑ͔ͬͨ

  67.