Recent submissions

Comment · 8 years ago
Happy to hear it!
Comment · 8 years ago
Comment · 9 years ago
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.
Comment · 9 years ago
Thanks, I appreciate it.
Comment · 9 years ago
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.
Comment · 9 years ago
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.
Comment · 9 years ago
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.

Comment · 9 years ago
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.

Comment · 9 years ago
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.
Comment · 9 years ago
> 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.

Comment · 9 years ago
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.

Comment · 9 years ago
Sorry about that. Getting people to participate on GitHub is pretty hard. I feel dirty for doing it, but it helps.
Comment · 9 years ago
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.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton