News for hackers. Stuff that matters.
Re:Why Ruby? by Proleps on Friday March 22, 2013 @12:35PM (#5423973)
Spark is a micro framework for Java[1]. I plan on trying it some time in the future.

[1] http://www.sparkjava.com/why.html

Re:Why Ruby? by mbell on Friday March 22, 2013 @02:25PM (#5424666)
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...