No video

Http4s Scala Tutorial: Writing an HTTP Server with Purely Functional Scala

  Рет қаралды 21,919

Rock the JVM

Rock the JVM

Күн бұрын

Пікірлер: 52
@georgezorikov3075
@georgezorikov3075 3 жыл бұрын
Wow, I literally started writing my http4s hello world app a week ago. Very convenient! Thank you
@rockthejvm
@rockthejvm 3 жыл бұрын
Nice!
@OxMiroslav
@OxMiroslav 3 жыл бұрын
Finally http4s ! Thank you for that. I didn't find any good resource to learn it.
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad it helps!
@PawanKumar-kj8oo
@PawanKumar-kj8oo 3 жыл бұрын
Great tutorial as usual. I was shying away from http4s (instead of using play framework) because of its complexity but now it makes total sense to use it.
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad it clicked!
@DinoFancellu
@DinoFancellu 2 жыл бұрын
Definitely move towards http4s. Play is stuck in the past with Futures, zero sign of moving away from them. I say this as a long time Scala Play dev.
@abhishes
@abhishes 3 жыл бұрын
This is amazing!!! thank you for doing this!!!
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad it's useful!
@ivanvelikanova9950
@ivanvelikanova9950 3 жыл бұрын
thank you so much for this video. Scala-type system, implicits etc. are blowing my head ... i didn't get time to complete this video yet, hope to finish this soon .... but this is next level.
@estebanmarin002
@estebanmarin002 Жыл бұрын
Thanks for this video. Really help me to digest the HTTP library
@Elodius2
@Elodius2 Жыл бұрын
You're the best, Daniel!
@piotr2951
@piotr2951 2 жыл бұрын
Amazing crash curse. Looking forward to the cats introduction
@alanlewis1625
@alanlewis1625 3 жыл бұрын
Daniel, another terrific video. Thank you. I think it could be slightly improved by having a (very simple) database implementation, rather than a Map. Yes, I realise the extra effort involved, and it would have made the video longer, but it would add a realistic scenario. Or, perhaps another video with a "simplistic" storage and retrieval from a table? Perhaps making use of JDBC or JOOQ? Thanks again for all your efforts.
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad you liked it! I wanted to keep this specific to http4s - I'll add full-blown projects on my site soon.
@ohngec07
@ohngec07 2 жыл бұрын
Great video! Should have watched this before I spent hours banging my head against the http4s documentation lol
@mrajug
@mrajug Жыл бұрын
Excellent tutorial. thanks
@RenatoRaeffrayBarbosa
@RenatoRaeffrayBarbosa Жыл бұрын
Great video, Daniel! I'm looking information on how to get repeated query parameters in Scala http4s/dsl. Or even get all parameters and handle it. Do you know how we could achieve it? This is pretty silly thing in other languages, such python or java, but in scala looks like quite convolute. Thank you buddy!
@rockthejvm
@rockthejvm Жыл бұрын
OptionalMultiQueryParamDecoderMatcher. The difference from the video is "Multi".
@ThesamBETH
@ThesamBETH 3 жыл бұрын
Thanks very much for this tutorial.
@rockthejvm
@rockthejvm 3 жыл бұрын
Glad you liked it!
@shyam2305
@shyam2305 2 жыл бұрын
Great tutorial. Covers important areas about encoding/decoding of URL points. Error handling with 'year' was too short and quick, IMO. Could be elaborated a bit more. 3rd requirement to POST (create) director is missed. What is the idea behind having HttpRoutes as typed to F[_] : Monad instead of IO ? HttpRoutes is anyways tied to cats provided Monad. So, what is the advantage? Thanks a lot for all your efforts.
@rockthejvm
@rockthejvm 2 жыл бұрын
Will cover more in-depth in a course!
@dmitrytrofimenko4419
@dmitrytrofimenko4419 3 жыл бұрын
Awesome. Like, subscribing. Keep doing, fellow
@BloodnutXcom
@BloodnutXcom 3 жыл бұрын
While I appreciate the type class abstraction to support an effect monad, I have to say that it makes for horrendous boilerplate code. And not only just carrying that F[_]: MONAD everywhere, but also the dsl imports, asJson calls without the option to declare a default serializer and even the final ".resource.use(never)" is just meh and should have been simplified under some "run" method. The first time I needed to use http4s I was relatively new to cats ecosystem and had to use ZIO monad with it. That was a lesson in frustration.
@rockthejvm
@rockthejvm 3 жыл бұрын
I empathize. This is why I shot this video, to ease the frustration for beginners.
@BloodnutXcom
@BloodnutXcom 3 жыл бұрын
@@rockthejvm hopefully ZIO-WEB comes around soon to be a adequate replacement
@user-yl4vt5pw4l
@user-yl4vt5pw4l 5 ай бұрын
Это просто о...но! Daniel, what do you think about Rust & Go? It will be pretty cool oneday to see some technical tutorials from you about both of this!
@nayak232
@nayak232 3 жыл бұрын
Do you plan to have any tutorials on scala.js
@rockthejvm
@rockthejvm 3 жыл бұрын
Something in particular you're interested in?
@PawanKumar-kj8oo
@PawanKumar-kj8oo 3 жыл бұрын
@@rockthejvm Use common / shared case classes in http4s server and scalajs client (maybe using laminar lib)
@cavidxalilov2968
@cavidxalilov2968 2 жыл бұрын
thank you for perfect tutorial. but it does not compile. maybe I do smth wrong. Error: could not find implicit value for parameter encoder: io.circe.Encoder[cats.effect.IO[cats.effect.IO[Option[String]]]]
@bilalf
@bilalf 3 жыл бұрын
Thank you!!
@lovejohnson5426
@lovejohnson5426 3 жыл бұрын
This is amazing
@rockthejvm
@rockthejvm 3 жыл бұрын
Thanks!
@krasavchikable
@krasavchikable 3 жыл бұрын
Good, but too simple video. I would like to know http4s deep, best practices and so on. I hoped you write mini app as microservice in full fp way with movie/director repository, some other services, then you combine all this services and http4s. I wait next episode.
@rockthejvm
@rockthejvm 3 жыл бұрын
In-depth stuff is coming too on my site: rockthejvm.com
@sergeibatiuk3468
@sergeibatiuk3468 Жыл бұрын
Are actors in the tutorial typed?
@reddot_22
@reddot_22 Жыл бұрын
is there solid JWT or OAuth for http4s? I always feel security is left on such a mist of bad documentation.
@rockthejvm
@rockthejvm Жыл бұрын
Try tsec: jmcardon.github.io/tsec/docs/http4s-auth.html
@reddot_22
@reddot_22 Жыл бұрын
@@rockthejvm Thank you King 🙏🙌
@M4rvin66
@M4rvin66 2 жыл бұрын
What would be an alternative to Cats IO? Is the use of tagless final and higher kinded types really helpful here?
@rockthejvm
@rockthejvm 2 жыл бұрын
There's Option, Either, monad transformers, ZIO
@afiefsholichuddin
@afiefsholichuddin 3 жыл бұрын
Is there a way to simplify those route handler? maybe an episode 2 for this? :D
@rockthejvm
@rockthejvm 3 жыл бұрын
What else would you like to see?
@afiefsholichuddin
@afiefsholichuddin 3 жыл бұрын
@@rockthejvm maybe a "simplified" route handler with for comprehention? Not sure if that possible, I am still learning scala fp 😅
@peterstorm_io
@peterstorm_io 3 жыл бұрын
Awesome tutorial, though I'm sad you call the functions "magic", as they are well... just functions. When you do Play, or Spring, or almost any other server framework, those _are_ using magic, with their annotations... http4s is not :D
@rockthejvm
@rockthejvm 3 жыл бұрын
Sufficiently advanced magic becomes indistinguishable from technology.
@theMarhaenist
@theMarhaenist 2 жыл бұрын
http4s = "http for (4) scala"
@rockthejvm
@rockthejvm 2 жыл бұрын
Yep!
Doobie Tutorial: Scala, Databases and pure Functional Programming
41:22
A Load Balancer in Scala with Cats Effect and Http4s
37:33
Rock the JVM
Рет қаралды 4,1 М.
ROLLING DOWN
00:20
Natan por Aí
Рет қаралды 10 МЛН
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 44 МЛН
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 36 МЛН
Scala: Beyond the basics with Christopher Batey
48:05
Devoxx
Рет қаралды 48 М.
Go API Tutorial - Make An API With Go
38:03
Tech With Tim
Рет қаралды 176 М.
Intro to Cats-Effect (Gavin Bisesi)
54:54
thoughtbot
Рет қаралды 15 М.
Top 10 Skills to Learn to Be a Scala Developer
28:13
Rock the JVM
Рет қаралды 15 М.
I forced EVERYONE to use Linux
22:59
NetworkChuck
Рет қаралды 425 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 333 М.
Andrew Kelley   Practical Data Oriented Design (DoD)
46:40
ChimiChanga
Рет қаралды 83 М.
What the Functor? | Functors in Scala | Rock the JVM
24:43
Rock the JVM
Рет қаралды 11 М.
John De Goes - 12 Steps To Better Scala (Part I)
1:04:20
RISK IDENT
Рет қаралды 19 М.
Cats with Scala: Essential Type Class Hierarchy, Explained
35:00
Rock the JVM
Рет қаралды 18 М.