Unfortunately it's not being properly maintained anymore. Last maven release was in Jul 10, 2022. It's maven dependencies have security issues and need to be updated to latest version. So if you want to use it you will need to do that.
SparkJava has an actively developed fork/successor called Javalin[1]. It's straightforward to convert from SparkJava to Javalin. The latter is written in Kotlin but fully supports ordinary Java.
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.
The community of vert.x is quite active. There’s a Discord server where discussions, releases info and help questions are being published in live chat.
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.
If you are on Kotlin, ktor is a nice framework. And it works outside the JVM too. Ktor client works in the browser, on native, wasm, and on the jvm. Ktor server is mainly for the jvm but also works on native.
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.
I've been working on a framework built on top of Ktor for a while now with the intention of providing SSR capabilities with the HTML and CSS DSL and auto generated bindings to generate JavaScript from Kotlin multiplatform code in order to provide interactivity.
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've inherited an old legacy spark project. I find the developer experience and tooling of Spring Boot to be much better and it's well suited to building microservices.
Spark is nice, I switched to usinh jersey+jetty though, you get the mature API of jax-rs and everything in under 6MiB of dependencies.
you can even use the jdk http server to be even smaller.
My ActivityPub project, Smithereen, is built on this. Though I had to fork it to add the ability to stream responses. By default it really insists on rendering everything fully into a string and only then serving it to the client. I also updated its dependencies and added support for Java 21 virtual threads.
What‘s rubbing me the wrong way is the author pitting against NodeJS/Typescript on the front page without real arguments. You can pit your framework against another, but show me how it makes my life easier in comparison. Argue with features and developer experience, not with personal opinions.
„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.
I remember stumbling upon it like 10 years ago. IIRC Per took a year off work (parental leave?) and built it as a fun project. A very thin layer on top of the java standard. I used it for a few side projects and also hosted the official javadocs back in the day on one of my servers.
If you need something tiny and simple on the JVM spark is still a valid choice although there are tons of alternatives nowadays.
How is sprint boot + java thèse days? I have a client that wants to pick it up for a suite of services (and Java) but my experience with it 5+ years ago was that it was an overengineered painful thing to use. I would much prefer they use a Kotlin + ktor/vertx + jooq combo but I have a hard time convincing them.
This appears to be a server-side web framework only.
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
I've been using this for years, simple and gets the job done. Perfect when you just want to add an http endpoint to an existing java application quickly without including tons of libraries.
[+] [-] bborud|2 years ago|reply
[+] [-] pritambarhate|2 years ago|reply
[+] [-] topspin|2 years ago|reply
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.
[1] https://javalin.io/
[+] [-] AndrewSChapman|2 years ago|reply
It's actively maintained with full time developers, performant, supports Kotlin out of the box, and has more features?
[+] [-] amarant|2 years ago|reply
My current favourite Java server framework is Micronaut.
Great performance and easy to develop for!
https://micronaut.io/
[+] [-] selimco|2 years ago|reply
[+] [-] p2detar|2 years ago|reply
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.
[+] [-] vips7L|2 years ago|reply
[+] [-] jillesvangurp|2 years ago|reply
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.
[+] [-] tfsh|2 years ago|reply
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.
[+] [-] aussieguy1234|2 years ago|reply
[+] [-] ysleepy|2 years ago|reply
I'm very happy with that setup.
[+] [-] grishka|2 years ago|reply
https://github.com/grishka/Smithereen
My fork of Spark: https://github.com/grishka/spark
[+] [-] debarshri|2 years ago|reply
Have deployed 10s of services into production build on java spark. Still works like charm.
[+] [-] sidcool|2 years ago|reply
[+] [-] owlstuffing|2 years ago|reply
https://github.com/manifold-systems/manifold-sample-graphql-...
[+] [-] fnord77|2 years ago|reply
[+] [-] ph4te|2 years ago|reply
[+] [-] knvlt|2 years ago|reply
„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.
[+] [-] zackify|2 years ago|reply
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.
[+] [-] hit8run|2 years ago|reply
[+] [-] Sytten|2 years ago|reply
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] TeaVMFan|2 years ago|reply
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
[+] [-] arthur_sav|2 years ago|reply
[+] [-] Copenjin|2 years ago|reply
[+] [-] jknoepfler|2 years ago|reply
[+] [-] brazzy|2 years ago|reply
[+] [-] blacklite|2 years ago|reply
[+] [-] winrid|2 years ago|reply