Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
【Scala関西】http4s/tagless final
Search
Dasha Tarasova
November 10, 2018
3
2.7k
【Scala関西】http4s/tagless final
http4sとcats-effectで可愛らしい、関数型らしいアプリケーションを書こう!٩(๑^o^๑)۶
Dasha Tarasova
November 10, 2018
Tweet
Share
More Decks by Dasha Tarasova
See All by Dasha Tarasova
ワークライフバランスのバランス
dysangelist
1
880
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Visualization
eitanlees
146
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
860
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Automating Front-end Workflow
addyosmani
1366
200k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Done Done
chrislema
182
16k
Transcript
http4scats-effect ٩(๑^o^๑)۶
2 Hello! ! !# Scala" % (&)
' $ ZOZO Tech
• • cats effect
• http4s • Tagless final +..+♪ (•’∀’•)♪+..+ 3
• • dysangelist/scala_kansai_demo @github +..+♪(•’∀’•)♪+..+
4
1
Scala(/0#+ • #+-7Java2.6,3" 8 • '$% 7 14 8
• 57&)*)!!8 • 6
• • •
7
01(* .)-4 • *. #'+ • %-!*./
• &$,"3 2 8
Cats Effect 2
Cats Effect • 7 23Cats8.IO)%$: 1"' *!5/*&*+- • 9ZIOHaskellIOMonix
Task6 • Type Level04(,# 10
! Future- • Future#(Future **) • &$ Futureside-effectful • %()"
! ! ! • + left identity ' , 11
http4s 3
http4s • Fs2IO http (Framework
• Service As KleisliServer As Stream 13
+< • Play! $' !API-)#)%!!! • Finagle – Twitter Future/1
• Finch - ↑ :58Effect23 .*4 9; • AkkaHTTP ← Spray,6. 7 • Colossus ???? &(" < • Chaos ??? 0< 14
Tagless final 4
Tagless Final • $'%End Of The World • "
(Eff, Free • ↑ !&# 16
• Principle of Least Power • •
17
Application 5
-26*7 • % $!& "'#5 345(+ 2 • ),persistence.in
memoryHashMap )0 8DB91/ '# : https://github.com/dysangelist/scala_kansai_demo 19
20 •
Algebra① 21 • %#)! ' • Type
"$&(
Algebra② 22
Algebra③ 23 • *(Algebra'"$ &% #!+ • - .Aggregate-DDD,
) .
Algebra④ 24
Logic① 25 • Logic, Algebra
Logic② 26
27
② 28 • Service/Router Logic
③ 29
④ 30 • !!
31
Representation 32 • Algebra
Representation② 33 • InMemory
Representation③ 34 • InMemory
• HttpService[F]Kleisli[OptionT[F, ?], Request[F], Response[F]] alias • IntelliJcombineK
Service? 35
36
4 37 • FW%#%&(), 1.Separation of Concerns • "!'$
03/ • http4sOpinionated 2* • +-
38 ~fin~ Any questions?