4 ms·
Jetty has been around for a while; a response handler is a one liner (well, a Java one liner, which translates to 7 lines ...). With Spark[0] (not to be confus
by _pmf_ 10y ago
Jetty has been around for a while; a response handler is a one liner (well, a Java one liner, which translates to 7 lines ...).
With Spark[0] (not to be confused with Apache Spark ...), you can get a Sinatra-like routing library on top of Jetty (while you still can deploy the webapp in a more heavyweight container if you need to).
I think Spark is in spirit much like Dropwizard, but a bit more lightweight.
[0] http://sparkjava.com/ http://sparkjava.com/
- CHY872 10y ago(opinion: i've spent a year writing Dropwizard based apps, but only two evenings writing Spark based apps). I think that Spark comes at the cost of customisability - 2-way SSL is a chore, you have to parse your own message bodies, you don't get straightforward logging out of the box - there's a base set of features and functionality that I couldn't find in Spark. The thing that impressed me about Dropwizard is that you can get in perhaps 50 lines of boilerplate a really solid core behind an application - with Spark you can do that in perhaps 20, but you are somewhat limited beyond that.
- _pmf_ 10y agoI've only used Spark in a very local context (small company internal projects), so I'll definitely take into account your experience when doing something bigger.