3 ms·
IMHO the problem with Java 8 is not the language but framework support. Except SparkJava, most other frameworks use Java 8 as a "upgraded java compiler". Tge
by sandGorgon 10y ago
IMHO the problem with Java 8 is not the language but framework support. Except SparkJava, most other frameworks use Java 8 as a "upgraded java compiler". Tge canonical way to write code is still Java 6.
I think the best way to upgrade your java codebase is Kotlin. On the server side, Kotlin +vertx is extremely compelling.. on the Android side, Kotlin pretty much kills it.
- jondot 10y agoI agree. This is exactly the move I've made when I was CTO of a company needing a move to the JVM from .NET. Given the options of Java, Scala - I moved to picking Kotlin. In many ways, Kotlin for me is Scala without the different ways to hang yourself. I wish it was given more credit that it gets right now outside of the Android circles.
- sandGorgon 10y agothat is very interesting! could you talk about the framework that you used? im particularly concerned about ORM and database connectivity.
- jondot 10y agoIf by framework you mean web framework, I've used Dropwizard. It's a lean and mean modern-java option, and it's not a Kotlin native thing (you do have these). You can use any Kotlin or traditional Java framework out there transparently (that's a good value of Kotlin). For ORM, Dropwizard and its ecosystem got you covered. Also dropping out to Java when ever you want can be done in the same project (which I encouraged) seamlessly both in terms of how Java and Kotlin interoperate, and in terms of Intellij, which is first-class in both languages because Kotlin is Jetbrains' baby, and, because Java has been best supported by Intellij for ages (can't really find that kind of thing anywhere else).