Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So what is the right java web framework today? Play has gone down the scala route - is there really another rails-like web framework that today that would do what the author is asking?


Rails-like is a confounding term. If you mean something as comprehensive, I'm not sure there is quite an analog. Although I personally don't usually want something as comprehensive.

If you mean something that is easy to get started, deals with the most annoying stuff, and gives you the fundamentals to implement an application, then I think there are some good options.

Of the Java frameworks we've tested [1], if you are ruling out Play-Java (because of a real or imaginary Scala design preference; I'm not judging that), I personally enjoy the coding style of Rest-Express and DropWizard. Check out the Rest-Express [2] and DropWizard [3] multi-query test implementations for a quick insight into their coding style. (Note the Rest-Express test was contributed by that framework's author.)

I'm not sure if this really answers your question, but I think it does speak to my earlier point in this thread that modern frameworks solve the problems I most care about and also (happily) tend to do so more efficiently--with respect to server resources--than the frameworks of a few years ago.

[1] http://www.techempower.com/benchmarks/#section=data-r6&hw=i7...

[2] https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

[3] https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...


Thanks!

Nothing against scala specifically, just using Play-Java (which we are) means you are bound to using sbt and when debugging into play internals you are looking at scala instead of java.

DropWizard is fantastic, will check out rest-express. I think the thing I miss from both that you do get in play (and rails) is the front end templating, assets pipeline, and useful assorted bits tailored to quickly building a html/js/css/api web app.


It depends. When you say "Java" do you mean Java or the JVM?

It's certainly not anything like rails, but if I'm forced to work in Java I'm quite fond of SpringMVC, especially for building restful services that need to support a bunch of different serialization formats. Once you get over the fact that Spring-done-right is a bit XML-heavy, it's quite good. Also since most of the heavy-lifting is front-loaded into the the context initialization it can be very performant.

Otherwise for more simple stuff I just drop down to straight-up servlets and JSP.

If you can relax your requirement to just the JVM there are tons and tons of options...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: