News for hackers. Stuff that matters.
Re:I Miss Rails by ethagnawl on Friday March 29, 2019 @12:22AM (#19519140)
I've been meaning to revisit Kotlin's web framework offerings. I've used it in small doses for Android and AWS Lambda functions and, IMO, it seems to potentially be the best of both worlds; strict where it needs to be and flexible where it doesn't. I'm currently supporting a few Python Lambda functions at work and they feel very slapdash in comparison.
Re:I Miss Rails by jrs95 on Friday March 29, 2019 @12:32AM (#19519171)
The biggest problem with Kotlin is also it's biggest strength: excellent interop with Java. This means that you can use all of the Java libraries...but that also makes writing new libraries in idiomatic Kotlin unnecessary, so you're going to get less of them, and have to use a lot of crummy old Java APIs.
Re:I Miss Rails by vbsteven on Friday March 29, 2019 @03:04AM (#19519714)
Try Kotlin with the Spring Boot framework. I view Spring Boot as the Rails of the Java world and the Spring team has done a lot of work lately on Kotlin compatibility and idiomatic APIs.

This week I’ve been porting one of my Spring Boot apps to Kotlin and that was a great experience.

The only thing I’m waiting for is good reactive drivers for Postgres and then you can go with their new reactor based apis instead of the older one-thread per request Spring MVC.

Re:I Miss Rails by m23khan on Friday March 29, 2019 @09:47AM (#19521617)
+1 - Kotlin/Java with Spring is a totally different beast as compared to java apps of yester years.
Re:I Miss Rails by ethagnawl on Friday March 29, 2019 @10:33AM (#19522006)
This is a good point. I haven't used Spring in forever, so I don't know if/how it takes advantage of any modern Java features, but I could see Java 8/9/10 and (a framework like) Spring being pleasant and productive.
Re:I Miss Rails by vbsteven on Friday March 29, 2019 @11:39AM (#19522582)
The Spring and Spring Boot teams have done a lot of work on this. IIRC Spring Boot 2.1 is compatible up until Java 11, and Java 12 support should be in 2.2.

Some API's are adapted to take advantage of modern Java features like for example JPA repositories that can return Optional<T> for single row queries and Stream<T> for multi row queries. Some API's have been improved with functional equivalents.

If you combine this with Kotlin you get all the power of the Spring framework together with excellent nullability checks and modern language features that Kotlin brings to the table.

Re:I Miss Rails by ganonm on Friday March 29, 2019 @06:41AM (#19520464)
Kotlin + Dropwizard is a great choice (or Spring Boot). I've used it in production and it's got the best aspects of Rails (opinionated) with the best aspects of a modern, statically typed language running on the JVM (need I say more?).