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

learning-cleanarchitecture-in-go

 learning-cleanarchitecture-in-go

Takashi Matsuyuki

February 28, 2019
Tweet

More Decks by Takashi Matsuyuki

Other Decks in Programming

Transcript

  1. CAͷ໨తɺಛੑ • ϑϨʔϜϫʔΫඇґଘ • ςετՄೳ • UIඇґଘ • σʔλϕʔεඇґଘ •

    ֎෦ΤʔδΣϯτඇґଘ →ͭ·Γৄࡉͱํ਑Λ੾Γ཭͠΍͍͢
  2. CAΛߏ੒͢Δݪଇ • Ϟδϡʔϧείʔϓ (SOLIDݪଇ) • ୯Ұ੹೚ͷݪଇ (SRP) • ΦʔϓϯɾΫϩʔζυͷݪଇ (OCP)

    • Ϧείϑͷஔ׵ݪଇ (LSP) • ΠϯλʔϑΣʔε෼཭ͷݪଇ (ISP) • ґଘؔ܎ٯసͷݪଇ (DIP) ← Ұ൪ॏཁ
  3. CAΛߏ੒͢Δݪଇ • Ϟδϡʔϧείʔϓ • DIP ←Ұ൪ॏཁ • Ϟδϡʔϧείʔϓ • SRP,

    OCP, LSP, ISP • ίϯϙʔωϯτείʔϓ(ڽूੑ) • REP, CCP, CRP • ίϯϙʔωϯτείʔϓ(ؔ܎ੑ) • ADP, SDP, SAP આ໌͠·͢ ࣗश
  4. CAͷ໨తɺಛੑ • ϑϨʔϜϫʔΫඇґଘ • ςετՄೳ • UIඇґଘ • σʔλϕʔεඇґଘ •

    ֎෦ΤʔδΣϯτඇґଘ →ݪଇΛར༻͢Ε͹࣮ݱͰ͖ͦ͏ʁ վΊͯɾɾɾ
  5. GoΛษڧ͢ΔͳΒ͜ΕಡΜͲ͚ • தڃऀ~্ڃऀ w (PݴޠʹΑΔฒߦॲཧ w ϓϩάϥϛϯάݴޠ(P w ΈΜͳͷ(Pݴޠʲݱ৔Ͱ࢖͑Δ࣮ફςΫχοΫʳ w

    &⒎FDUJWF(P ӳޠ൛ɿIUUQTHPMBOHPSHEPDF⒎FDUJWF@HPIUNM ೔ຊޠ൛IUUQHPMBOHKQF⒎FDUJWF@HP