clojuredesign-podcast

Discussions around the Functional Design in Clojure podcast - https://clojuredesign.club/
dharrigan 2020-01-15T08:31:47.003400Z

Hey

dharrigan 2020-01-15T08:32:03.003800Z

Just listened to your first episode of the Web Series - looking forward to the next

dharrigan 2020-01-15T08:33:09.004900Z

I use reitit as my choice of framework. My use case is receiving GraphQL requests (just normal RESTful requests) as JSON, doing parsing etc.., business logic.

dharrigan 2020-01-15T08:33:37.005600Z

I'm quite a newbie at Clojure so it was quite a learning experience (I'm coming from (still use) Spring Boot with Kotlin, and that's super easy))

nate 2020-01-17T20:00:20.002300Z

Very interesting. I'm curious as to why it is easier in Kotlin. Are there fewer choices? Does the community rally around one stack?

dharrigan 2020-01-17T20:08:32.002500Z

Not sure, but with Spring Boot it's as simple as adding a dependency at annotating one class. Writing a RESTful controller is again just annotating one class (with one annotation).

dharrigan 2020-01-17T20:09:21.002700Z

https://spring.io/guides/gs/rest-service/

dharrigan 2020-01-17T20:09:37.003Z

Create a Resource Controller

dharrigan 2020-01-17T20:11:09.003200Z

That's actually quite long winded, with Kotlin, it's a lot smaller codebase.

dharrigan 2020-01-17T20:26:36.003400Z

Here's an example I put together in 5 minutes

dharrigan 2020-01-17T20:26:37.003600Z

https://github.com/dharrigan/simple-rest-kotlin

dharrigan 2020-01-17T20:26:58.004200Z

That is all that is required.

nate 2020-01-17T21:29:59.004400Z

cool!

nate 2020-01-17T21:30:16.004600Z

thanks for this example, I'll check it out and see if I can understand it

nate 2020-01-17T21:30:25.004800Z

I've only read the main kotlin website page

nate 2020-01-17T21:30:56.005Z

but I have been meaning to learn it more thoroughly to understand why people like it

dharrigan 2020-01-20T07:39:39.005800Z

There is another library that we are looking to use

dharrigan 2020-01-20T07:39:40.006Z

https://ktor.io/

dharrigan 2020-01-20T07:39:53.006200Z

This is even more lightweight that Spring (a lot!)

dharrigan 2020-01-15T08:34:00.006200Z

So, yes, a barrier, but not an insurmountable barrier

dharrigan 2020-01-15T08:34:38.006400Z

https://metosin.github.io/reitit/