News for hackers. Stuff that matters.
Re:Why we choose Java instead of a polyglot stack by davidw on Thursday January 21, 2016 @06:14PM (#10949315)
So, Java guys, what do you recommend if someone wants to have a Rails-like experience where programmer time is more valuable than 'web scale' performance? Say, also that I don't want to have to pay oodles of money for some server with a terabyte of memory to hold the application. Honest question - I haven't kept up with what's happening in Java land, and am curious what you'd recommend for that kind of side-project thing.
Re:Why we choose Java instead of a polyglot stack by glorge on Thursday January 21, 2016 @08:36PM (#10950130)
"Dropwizard (http://www.dropwizard.io/) pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package that lets you focus on getting things done."

It's easy to get up and running, and I've grown to appreciate the emphasis on stable, mature libraries in Dropwizard compared to some of the more bleeding edge libraries that I've fought with in other "opinionated" Java frameworks that try to approximate the RoR experience.

Dropwizard gives you the option of using either JDBI or Hibernate for an ORM. My suggestion would be to go with Hibernate, even though it's a beast and you will waste time deciphering cryptic error messages and hunting down crippling N+1 select performance problems. Even with those issues, I feel that Hibernate is worth using, as even on small projects it can save you from writing thousands of lines of monotonous database access code.

Re:Why we choose Java instead of a polyglot stack by edem on Thursday January 21, 2016 @06:25PM (#10949379)
There is [Grails](https://grails.org/) which I honestly did not use so I can't comment on it but people seem to like it. It is Groovy based though. The most common framework nowadays is Spring and its ilk (including Spring MVC and its friends). BUT there is Spring Boot which is basically a meta framework which takes an opinionated "sensible defaults for all the stuff" approach and you can get a project working with 5 clicks basically. Try out the [Spring Boot initializr](https://start.spring.io/). The biggest problem with these frameworks is the magic. While you are fine with the defaults it works. You can check the config files and tinker with them but there are a lot of layers to peel away if you are presented with some exotic Exception which will happen sooner or later. I'm also interested in what other options I have in Javaland currently because I'm steering away from it to Clojure islands and even the Node archipelago...
Re:Why we choose Java instead of a polyglot stack by ccoggins on Thursday January 21, 2016 @07:29PM (#10949775)
I'll put a second vote for Spring Boot. You're right that when the magic fails it can get a little complicated. However, I've found Spring documentation to be very good. Also, once you understand a little of how it's put together it becomes pretty easy to selectively replace whatever piece of the magic with your own custom version.
Re:Why we choose Java instead of a polyglot stack by edem on Thursday January 21, 2016 @07:44PM (#10949857)
I know but I'm not sure I want to do it every time the magic breaks. In clojure for example I only have to dig into compojure and ring 4-5 layers deep involving 20 files. With spring with all the reflection, indirection (annotation processing) and such it is common to have a call stack 30-40 levels deep. Much more time consuming to debug imho.
Re:Why we choose Java instead of a polyglot stack by vorg on Thursday January 21, 2016 @07:03PM (#10949612)
> I can't comment on it but people seem to like it

Not sure how many Grails 2.x systems out there have been upgraded to Grails 3.x, or how many new Grails systems have been started in version 3.x. I don't think it's many though, which suggests a general decline in Grails use.

Re:Why we choose Java instead of a polyglot stack by davidw on Thursday January 21, 2016 @06:29PM (#10949408)
My question is pretty open-ended, so 'use XYZ in Clojure' works too.
Re:Why we choose Java instead of a polyglot stack by champion on Thursday January 21, 2016 @07:11PM (#10949672)
For a side project I've deployed some simple endpoints to Heroku and used Spark (http://sparkjava.com/). Spark is a Java Sinatra clone rather than full Rails.

That said, not sure I'd pick it for simple side-projects. Part of the benefit here is how it works for a large dev team, with a large codebase, etc.

Re:Why we choose Java instead of a polyglot stack by g_josifov on Friday January 22, 2016 @02:21AM (#10951282)
I would recommend to see https://www.youtube.com/user/bienadam

Very elegant introduction to Java Land, it uses Java EE 7 and by default two servers Payara or Wildfly(around 100MB).

Re:Why we choose Java instead of a polyglot stack by Yhippa on Thursday January 21, 2016 @06:38PM (#10949459)
Take a look at JHipster: https://jhipster.github.io.
Re:Why we choose Java instead of a polyglot stack by Edmond on Thursday January 21, 2016 @07:40PM (#10949836)
try Hivemind (www.crudzilla.com)