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

Scalaで学ぶヘキサゴナルアーキテクチャ実践入門

kimutyam
March 26, 2016

 Scalaで学ぶヘキサゴナルアーキテクチャ実践入門

「Scala将軍達の後の祭り」での発表資料

http://scala-syogun-matsuri.connpass.com/event/28124/

kimutyam

March 26, 2016
Tweet

More Decks by kimutyam

Other Decks in Technology

Transcript

  1. Hexagonal Architecture༻ޠ(2) • Adapter(Ξμϓλ) ΠϯλʔϑΣʔεΛ֤σόΠε(αʔϏε)͕ඞཁͱ͢Δ ৴߸ʹม͑Δ Port : Adapter =

    1 : N >σόΠε͕ඞཁͱ͢Δ৴߸ʹม͑Δɺٯ΋·ͨવΓɻ ϔΩαΰφϧΞʔΩςΫνϟ(Hexagonal architecture຋༁)
  2. Hexagonal Architectureͷࢫຯ(1) • ϙʔτ୯ҐͰؔ৺Λ෼཭͢Δ͜ͱ͕Մೳ • υϝΠϯΛத৺ʹஔ͘ࣄͰΞϓϦέʔγϣϯશମͷํ਑ ͕ܾఆ͞ΕΔ ϙʔτؒͰͷґଘ͸ͳ͘ɺϙʔτ্Ͱ͸υϝΠϯͳ͍͠ ͸ΞϓϦέʔγϣϯͷ࣮૷Λར༻ͨ͠ΓɺI/FΛ࣮૷͢Δ •

    Ξμϓλ୯ҐͰٕज़ͷ૊Έସ͕͑Մೳ(ৄࡉͷٕज़Λมߋ ͯ͠΋υϝΠϯʹ͸Өڹ͸͠ͳ͍) • ϞοΫԽ͠΍͍͢(ϞοΫDBΛར༻͢ΔΑ͏ͳ࢓૊Έ͕ ؆୯ʹ࣮ݱͰ͖Δ) • ࢹ֮తͰॲཧͷϑϩʔ΍ґଘؔ܎͕໌ྎ
  3. ࣮ફ౤ೖͯ͠ΈͯͷϝϦοτ·ͱΊ • ϓϩδΣΫτɾϓϩμΫτಋೖظͷυϝΠϯΛৠཹͤ͞ ͳ͕ΒɺϞοΩϯά͕͠΍͍͢ • ґଘؔ܎ͷ੍໿͕ڧ͍ΞʔΩςΫνϟͳͷͰίʔυͷํ ਑͕ͿΕͮΒ͍ • ৽͍ٕ͠ज़Λಋೖ͠΍͍͢ •

    ϚΠΫϩαʔϏεͱͷ૬ੑ͕Α͍ • ϨΠϠʔυΞʔΩςΫνϟDIPͱൺ΂ͯؔ৺ͷ෼཭͕͠΍ ͘͢ • ΞʔΩςΫνϟਤͷࢹ֮ޮՌʹΑΓϝϯόʔͷཧղ͕͸ ΍͍ ! !
  4. ࢀߟࢿྉ ॻ੶ ʰ࣮ફυϝΠϯۦಈઃܭ (Object Oriented SELECTION)ʱ ॻ੶ʰΤϦοΫɾΤϰΝϯεͷυϝΠϯۦಈઃܭʱ ϔΩαΰφϧΞʔΩςΫνϟͱϨΠϠʔΞʔΩςΫνϟͷҧ͍ͱϚΠΫϩαʔϏε - falsandtru

    ͷϝϞா υϝΠϯ૚ʹ࠷దͳΞʔΩςΫνϟΛߟ͑Δ ϔΩαΰφϧΞʔΩςΫνϟ(Hexagonal architecture຋༁) ΦϒδΣΫτࢥߟ: ґଘؔ܎ٯసͷݪଇ ࠞཚ͕ͪ͠ͳαʔϏεͱ͍͏֓೦ʹ͍ͭͯ