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

【Scala関西】http4s/tagless final

6cd27c6532124cce94ede522c4662767?s=47 Dasha Tarasova
November 10, 2018
1.7k

【Scala関西】http4s/tagless final

http4sとcats-effectで可愛らしい、関数型らしいアプリケーションを書こう!٩(๑^o^๑)۶

6cd27c6532124cce94ede522c4662767?s=128

Dasha Tarasova

November 10, 2018
Tweet

Transcript

  1. http4scats-effect      ٩(๑^o^๑)۶

  2. 2 Hello!  ! !# Scala"  % (&) 

      ' $    ZOZO Tech  
  3.  •   • cats effect   

    • http4s   • Tagless final   +..+♪ (•’∀’•)♪+..+ 3
  4.     •  • dysangelist/scala_kansai_demo @github +..+♪(•’∀’•)♪+..+

    4
  5.  1

  6. Scala(/0#+  • #+-7Java2.6,3" 8 • '$% 7 14 8

    • 57&)*)!!8 •   6
  7.   •    •   •

      7
  8.  01(* .)-4 • *. #'+  • %-!*./ 

    • &$,"3 2 8
  9. Cats Effect 2

  10.  Cats Effect • 7 23Cats8.IO)%$: 1"' *!5/*&*+- • 9ZIOHaskellIOMonix

    Task6 • Type Level04(,#  10
  11. ! Future- • Future#(Future **) • &$ Futureside-effectful • %()"

    ! ! ! • + left identity ' , 11
  12. http4s 3

  13. http4s • Fs2IO    http   (Framework

     • Service As KleisliServer As Stream 13
  14. +< • Play! $' !API-)#)%!!! • Finagle – Twitter Future/1

    • Finch - ↑ :58Effect23  .*4 9; • AkkaHTTP ← Spray,6. 7  • Colossus ???? &(" < • Chaos ??? 0< 14
  15. Tagless final 4

  16. Tagless Final • $'%End Of The World  • "

      (Eff, Free • ↑ !&#  16
  17.  • Principle of Least Power •   •

        17
  18. Application  5

  19. -26*7 • % $!& "'#5 345(+ 2  • ),persistence.in

    memoryHashMap )0   8DB91/ '#  : https://github.com/dysangelist/scala_kansai_demo 19
  20.   20 •     

  21. Algebra① 21 •   %#)! '  • Type

    "$&(
  22. Algebra② 22

  23. Algebra③ 23 • *(Algebra'"$ &% #!+  • - .Aggregate-DDD,

     ) .
  24. Algebra④ 24

  25. Logic① 25 • Logic, Algebra    

  26. Logic② 26

  27.  27

  28.  ② 28 • Service/Router Logic    

  29. ③ 29

  30.  ④ 30 •  !!

  31.  31

  32. Representation 32 • Algebra    

  33. Representation② 33 •  InMemory     

    
  34. Representation③ 34 •  InMemory     

    
  35. • HttpService[F]Kleisli[OptionT[F, ?], Request[F], Response[F]] alias •  IntelliJcombineK 

      Service? 35
  36.  36

  37. 4 37 • FW%#%&(), 1.Separation of Concerns  • "!'$

     03/ • http4sOpinionated 2*  • +-
  38. 38 ~fin~ Any questions?