Need advice about which tool to choose?Ask the StackShare community!
Javalin vs Ktor: What are the differences?
What is Javalin? Simple REST APIs for Java and Kotlin. Javalin started as a fork of the Spark framework but quickly turned into a ground-up rewrite influenced by express.js. Both of these web frameworks are inspired by the modern micro web framework grandfather: Sinatra, so if you’re coming from Ruby then Javalin shouldn’t feel too unfamiliar.
What is Ktor? Framework for quickly creating connected applications in Kotlin. It is a framework for building asynchronous servers and clients in connected systems using the Kotlin programming language.
Javalin and Ktor can be categorized as "Microframeworks (Backend)" tools.
Javalin and Ktor are both open source tools. It seems that Ktor with 6.1K GitHub stars and 470 forks on GitHub has more adoption than Javalin with 3.6K GitHub stars and 313 GitHub forks.
I developed Hexagon heavily inspired in these great tools because of the following reasons:
- Take full advantage of the Kotlin programming language without any strings attached to Java (as a language).
- I wanted to be able to replace the HTTP server library used with different adapters (Jetty, Netty, etc.) and though right now there is only one, more are coming.
- Have a complete tool to do full applications, though you can use other libraries, Hexagon comes with a dependency injection helper, settings loading from different sources and HTTP Client, so it comes with (batteries included).
Right now I'm using it for my pet projects, and I'm happy with it.
Pros of Javalin
- Rich support of template engines1
- Does not require IDEA plugins1
Pros of Ktor
- Simple & Small5
- Light weight5
- Kotlin native4
- High performance1
Sign up to add or upvote prosMake informed product decisions
Cons of Javalin
Cons of Ktor
- Relatively fresh technology - not a lot of expertise1