3 ms·
Ug...that is some ugly code. I can't believe they are arguing that this (Spark): get(new Route("/") { @Override public Object handle(Reque
by mbell 14y ago
Ug...that is some ugly code. I can't believe they are arguing that this (Spark):
get(new Route("/") {
@Override
public Object handle(Request request, Response response) {
Integer age = request.queryMap("user").get("age").integerValue();
//do stuff
}
});
is cleaner and easier to read than this (JAX-RS):
@GET @Path("/")
public Response get(@QueryParam("user[age]") Integer age) {
//do stuff
}
It gets far worse if you think about what it takes to marshall a JSON response in spark...