Spark – A web micro framework for Java and Kotlin
sparkjava.com
sparkjava.com
While the rest of the Java world was devolving into annotation hell, AOP and other nightmares, these microframeworks showcased what happens when you leverage modern Java language features. A small but enthusiastic following has developed and they pop up now and then.
I do wonder, when looking at the examples, if it might be nice to have a spark/javalin-like that depends on okhttp and reuses everything that appears on both sides of the connection. okhttpd if you like, even if perhaps still best built on top of jetty, like spark/javalin. Might have some skill reuse benefits, but might also cause some unintended shortcut accidents when the type system can't tell upstream from downstream objects.
The tooling for building Spring Boot apps from other build systems like Bazel has problems, and while you can forego it and build your Spring Boot apps with Bazel's java_binary targets, you really don't want to.
Javalin by contrast is a plain boring Java dependency and you can pull it into any Java app with ease.
I do miss the better support for OpenAPI in Spring Boot though - Javalin's support is still missing a lot of functionality, but it is being very actively developed.
It's actively maintained with full time developers, performant, supports Kotlin out of the box, and has more features?
My current favourite Java server framework is Micronaut.
Great performance and easy to develop for!
As for footguns, I agree there are plenty, but in my experience at least, fewer than in most Frameworks I've used.
Didn't use views much, we built a JSON API, so there wasn't much need for it.
One thing I really liked about it was that it was so easy to get in touch with the Devs, and they so quick to fix things!
We started implementing our API with it before they released 1.0, and as such there were plenty of bugs in the beginning. Quite frequently we submitted a bug report, and there'd be a new version released the same or the next day with a fix for it! Very impressive!
I might've had bad luck with the team where I used vert.x but I've seen a few things in there I would categorize as foot-howitzers, I guess it's just hard to create a framework that can be used for anything without also enabling users to blow their feet off.
Sorry about the rambling comment, just happy to share my thoughts with a fellow Micronaut fan <3
Vert.x has already adopted VTs and in general its documentation is still one of the best I‘ve seen.
Really impressive work on the toolkit all these years. I love working with it.
There are actually two ways to use ktor-server with native.
1) you can use Graal and compile your jvm project with that.
2) you can use kotlin-native and produce native code directly.
And I would not be surprised to see some wasm support come together either when the kotlin wasm compiler has had a chance to mature a bit.
But short term, targeting the jvm is the easiest. Either way, ktor is a nice framework.
The only stumbling block I've encountered is the hot reloading support, for whatever reason only half the application is reloaded (some classes are and others aren't). This has been enough of an enigma for me to plan a switch to vertx.io.
Massive shame because I think the general Ktor framework is brilliant and I especially appreciate their adoption of the Kotlin Multiplatform.
I'm very happy with that setup.
https://github.com/grishka/Smithereen
My fork of Spark: https://github.com/grishka/spark
Have deployed 10s of services into production build on java spark. Still works like charm.
https://github.com/manifold-systems/manifold-sample-graphql-...
„and unlike a lot of JavaScript web frameworks, Spark won’t be deprecated tomorrow.“
Especially if you can’t hold your promise. Deprecations are a normal thing in every software driven by individuals. We lose interest, get kids, etc.
The funniest part is comparing it to expressJS, which hasn’t changed much in 10 years, and saying unlike JS frameworks, it won’t be deprecated tomorrow.
If your interest is one language (Java or Kotlin) full-stack for a single-page app, you will be interested in my Flavour book: https://frequal.com/Flavour/book.html