Earlier quoted context omitted.
> Part of it is a framework issue. Struts is horrible...absolutely, stunningly horrible. Your controller is an XML file (seriously). Freemarker (the main templating language) makes ColdFusion look awesome. Play is better, but it seems built for the way websites were created in mid-2000. JSON is still a second-class citizen. Static actions are a weird choice given IoC is achieved via DI in a static language. 99% of we…
My complaint isn't about client-side rendering. It's about _anything_ that involves getting in JSON or outputting JSON. It's essentially being able to easily bind json to objects on the way in, and being able to use respond_to and to_json on the way out.
@Path("/hello")
@Produces(MediaType.APPLICATION_JSON)
class HelloController {
class Greeting {
public Greeting(String name) {
this.content = "Hello, " + name;
}
public final String content;
}
@GET
public Greeting greet(@PathParam("name") String name) {
return new Greeting(name);
}
}
> curl http://localhost:8080/hello?name=me
{"content": "Hello, me"}