Fork me on GitHub
#beginners
<
2020-07-11
>
tvaisanen11:07:25

Hi! I'm following the book: Web Development with Clojure and doing the examples alongside with the book. There's a chapter where the schema validation logic is moved from the clj to cljc so that it can be shared with the front end validation as well. The problem that I'm having is that: Even if the code compiles and runs without errors, the validation logic seems not to be triggered, neither at front end form or the back end endpoint. I'm not sure if I'm missing a step here or just doing something plain wrong. Any tips would be appreciated! Thanks!

tvaisanen11:07:40

... as usual after stating the problem, it was resolved..

stopa18:07:26

hey team noob q -- what do folks use for web servers? I used jetty, but I wonder if there are better alternatives that are more idiomatic to clojure -- I saw immutant -- looks interesting, but am not sure if it is actively maintined, etc

phronmophobic18:07:10

I use http-kit. Fortunately, any ring compatible server feels fairly idiomatic to me

👍 3
seancorfield18:07:10

We use the embedded Jetty server in production.

seancorfield18:07:10

We used http-kit in production for a while but, while it was fast and reliable, New Relic's agent isn't compatible with it and we wanted better telemetry, so we switched to Jetty.

👍 3
seancorfield18:07:19

We were originally using an earlier version of Jetty and it was a bit buggy -- we kept seeing random thread death errors in production, which was why we switched to http-kit for a while.

👍 3
stopa19:07:21

Thanks for the context Sean!

seancorfield18:07:13

@dimitar.ouzounoff Just for Clojure? I wouldn't bother learning OO patterns, except as a way to understand more of the benefits of FP in several of those cases...

👍 6
seancorfield18:07:52

Many OO patterns (for Java etc) come down to "just functions" in an FP context. There are FP patterns as well/instead tho'...

seancorfield18:07:41

This is a nice, tongue-in-cheek romp through common OO patterns and what they would look like in FP http://mishadoff.com/blog/clojure-design-patterns/

seancorfield18:07:10

(but, be aware, it's a bit of a simplification and deliberately a bit provocative 🙂 )

👍 3
Dimitar Uzunov18:07:24

thanks! I will watch this presentation now.

Dimitar Uzunov19:07:42

watching Stuart Sierra’s presentation I reached to conclusion that I need to learn more about architectural patterns, not design patterns

3