4 ms·
I think it's simpler to tribute Sinatra in Java by annotating methods: @get('/hi') String myMethod() { return "Hello World!"; } I made a prototype o
by 6ren 13y ago
I think it's simpler to tribute Sinatra in Java by annotating methods:
@get('/hi')
String myMethod() {
return "Hello World!";
}
I made a prototype of this (including extracting arguments Sinatra-style, which I think is its coolest bit), and didn't encounter any serious problems with this approach.
- jebblue 13y agoI like reducing the number of annotations which is one reason I like the SparkJava approach.
- 6ren 13y agoJava 8 lambdas might shorten their approach too.
- jebblue 13y agoI've reviewed Lambdas and still don't think the syntax is clearer to me than just using an Anonymous Class. Either way, less configuration and less annotations, whatever lets me do that I could buy into as long as the debugging isn't a mess.