Last November I released my first serious open source project, Javalin. Since then the project has gained ~400 commits, ~25 contributors, and ~150 forks. ~200 issues have been closed and ~100 PRs have been merged.
Hackernews was very important to gaining early traction, and although I doubt most people seeing this post will remember the post from last year, I just want to say thank you.
Javalin is better suited for smaller/simpler projects (the library is a lot easier to understand and easier to setup). Vertx is a lot more powerful. If I ever found myself in a position where I'd need to create a massive and performant service (10m+ daily users), I'd probably choose vertx.
You can add them before starting the server if you want. I usually put them after just because I like separating them out. Should only take a few milliseconds to add them.
Thanks! Java8+ is what you make of it really. The syntax and standard APIs are still a bit clunky compared to $otherJvmLanguage, but you can make great APIs in Java.
Okay, poorly worded. I think (please correct me if I'm wrong) that in play you have distinct parts of the code-base that are for Java developers, while other parts are for Scala developers.
In Javalin, although some parts are written in Kotlin and some parts are written in Java, there is 0 duplication. If one part is written in Kotlin, both Java and Kotlin developers use that part. If a part is written in Java, both Java and Kotlin developers use that part.
I'm slightly biased of course, but Javalin is just a lot simpler to use. That might be because it's inherently simpler, or because Ktor's docs (as you pointed out) are very incomplete. I've tried to setup simple apps in Ktor to compare how it feels to write apps in it compared to Javalin, but I have given up on a lot of them because of the lack of documentation.
Other than that, Javalin is aimed at java-devs who have switched (or are interested in switching) to Kotlin, and works equally well in Java and Kotlin. Ktor is probably a better fit if you're a Kotlin purist.
Thanks! Yeah, I had to leave a few parts as Java in order to get the interop right. Anything that takes an functional interface needs to be Java, so the main API entry points are all Java. Most other classes and all internal code is Kotlin. I originally wrote it all in Java, and ended up with about 30% less code after I rewrote it to Kotlin.
> for sure, Jetty provides a lot of convenience classes on top of that plumbing
That's really the benefit. I have been using jetty for years. I trust them a lot more than I trust myself to create a web-server. If I were to write everything from scratch, I would never have finished the project.
It's not that much more work. You have to be careful with a few concepts (like SAM/Functional interfaces), but most of the time you can just write in Kotlin. I want to support both because a lot of companies are probably like the one I work for, where there are a lot of java-devs, and a few of them are pushing for kotlin. This seems like a good compromise to me.
Play was two different projects tho? There is only one Javalin source.
That's the point. It's not a framework for kotlin purists, but for java-shops/java-devs who want to try out kotlin. It should work more or less the same in both languages.