News for hackers. Stuff that matters.
Re:The Modern Java Ecosystem (for the Sinatra or web.py lover) by mbell on Friday December 02, 2011 @01:09PM (#3304973)
It may be slightly more verbose but you have to consider that the Java variant contains much more information in a single location. For example having a single file with methods annotated with @GET or @POST is so much cleaner to me than having routes.rb open in another editor window constantly Ctrl-Fing through it to sort out whats going on.
Re:The Modern Java Ecosystem (for the Sinatra or web.py lover) by masklinn on Friday December 02, 2011 @01:26PM (#3305050)
> For example having a single file with methods annotated with @GET or @POST is so much cleaner to me than having routes.rb open in another editor window

URL mapping is a framework detail, not a language detail — although the framework can be limited by the language. In Sinatra you'd write:

    get 'someroute' do
        # do stuff
    end
http://www.sinatrarb.com/intro.html#Routes

each style (these and half a dozen others) has its advantages and inconvenients. For instance, separate urls mapping (Rails, Django) give a starting point laying out the structure of the site and make views/controllers easier to reuse (as they're not coupled to URLs)[0], whereas annotating the handler directly gives a better view of where they're involved and how.

[0] They also make it simpler to "graft" sub-sites in

Re:The Modern Java Ecosystem (for the Sinatra or web.py lover) by hello_moto on Friday December 02, 2011 @01:21PM (#3305023)
I think that's a matter of preference.

I don't mind both styles (after working with Spring MVC 3, Servlet 3, JAX-RS, and Rails)