Live data from Hacker News

Learning Spring with Kotlin – Sprint 0

thatsabug.com

11–20 of 41 posts

Re: Learning Spring with Kotlin – Sprint 0

#11

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

What are you using for non-blocking database access? Is not JDBC a roadblock?

Re: Learning Spring with Kotlin – Sprint 0

#12

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

I'm of the opinion that Spring is 100% unnecessary and pretty much in all cases just straight up a bad choice. There's a ton of great companies that are built on it and depend on it, but man is using it unpleasant to say the least.

Admittedly I haven't looked at Spring w/ Kotlin at all, but I can't imagine it would solve fundamental annoyances I have with it (Why can't I capture logs globally while actually handling my exceptions locally?).

IMO the best library for Kotlin web stuff is http4k. Really nice documentation, first class integration for marshalling JSON with Moshi instead of Gson/Jackson, and very good, up-to-date consistent documentation.

Re: Learning Spring with Kotlin – Sprint 0

#13

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

Kotlin is taking over the JVM ecosystem like Scala could only have dreamed of doing. The JetBrains team took one of Scala's more glaring weaknesses, the tooling support, and made it the foundational strength of Kotlin. 100% inter-op with Java. It's a first class citizen alongside Java in IDEA for a long time, since before the language was even production ready. Supremely clean, coherent, and most of all concise docum…

> They got support from Google surprisingly early on in the Android world.

You can thank the Oracle lawsuit for this.

Google has been preparing Kotlin as their escape hatch.

Re: Learning Spring with Kotlin – Sprint 0

#14
post #12

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

I'm of the opinion that Spring is 100% unnecessary and pretty much in all cases just straight up a bad choice. There's a ton of great companies that are built on it and depend on it, but man is using it unpleasant to say the least. Admittedly I haven't looked at Spring w/ Kotlin at all, but I can't imagine it would solve fundamental annoyances I have with it (Why can't I capture logs globally while actually handling…

I would love to use http4k, but last time I checked it lacked support for coroutines, which Ktor makes heavy use of.

Re: Learning Spring with Kotlin – Sprint 0

#15
post #8

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

I just wish that Kotlin had a testing solution as great as Spock (groovy), or rspec for ruby, for that matter. But you mention not using Hibernate. I fully agree myself, and used JOOQ, but what is your preference?

I just wish that Kotlin had a testing solution as great as Spock (groovy), or rspec for ruby, for that matter.

Have you tried using Spek?

[1]: https://github.com/spekframework/spek

Re: Learning Spring with Kotlin – Sprint 0

#16

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

Kotlin is taking over the JVM ecosystem like Scala could only have dreamed of doing. The JetBrains team took one of Scala's more glaring weaknesses, the tooling support, and made it the foundational strength of Kotlin. 100% inter-op with Java. It's a first class citizen alongside Java in IDEA for a long time, since before the language was even production ready. Supremely clean, coherent, and most of all concise docum…

Kotlin does not really take over JVM ecosystem, very few projects use Kotlin outside of Android world (which is not really JVM ecosystem). And even for Android, I believe, its promotion from Google was more to mock Oracle.

Re: Learning Spring with Kotlin – Sprint 0

#17
post #11

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

What are you using for non-blocking database access? Is not JDBC a roadblock?

You run threadpool of JDBC workers and pretend like it's non-blocking now.

Though there are some experimental non-JDBC drivers using non-blocking I/O to move your blocking code from backend into database. In the end you're still blocking.

Re: Learning Spring with Kotlin – Sprint 0

#18
post #11

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

What are you using for non-blocking database access? Is not JDBC a roadblock?

Why do you want db access to be non-blocking? Are you not interested in the result?

Re: Learning Spring with Kotlin – Sprint 0

#19
post #18
post #11

Earlier quoted context omitted.

What are you using for non-blocking database access? Is not JDBC a roadblock?

Why do you want db access to be non-blocking? Are you not interested in the result?

I want to resume business logic when the result is available, but I don't want tens of thousands of kernel threads blocked on results until java finally gets fibers. People who write synchronous drivers also tend to make big poorly-used connection pools which defeat TCP flow control.

Re: Learning Spring with Kotlin – Sprint 0

#20

I've been using spring and Kotlin together for nearly 3 years. Since then, a lot of Kotlin specifics have crept into Spring. Also, there's an effort to move to a fully declarative Kotlin DSL for driving spring (kofu), which gets rid of basically all anotations, AOP processing, and other magic that makes spring both nice and hard to debug. At this point, if you are using Spring and not using Kotlin: you are doing it w…

Why do you prefer co-routines to reactor flux/mono? I have plenty of flux/mono experience and I enjoy the api so I didn't even consider coroutines.

It looks like there is a kotlinx-coroutines-reactor module, I'm not sure if that's what you are referring to.

Post reply on HN