5 ms·
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,
by davidw 11y ago
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.
- edem 11y agoThere is [Grails](https://grails.org/ 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/ 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...
- davidw 11y agoMy question is pretty open-ended, so 'use XYZ in Clojure' works too.
- vorg 11y ago> 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.
- ccoggins 11y agoI'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.
- edem 11y agoI 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.
- Yhippa 11y agoTake a look at JHipster: https://jhipster.github.io https://jhipster.github.io.
- champion 11y agoFor a side project I've deployed some simple endpoints to Heroku and used Spark (http://sparkjava.com/ 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.
- Edmond 11y agotry Hivemind (www.crudzilla.com)
- glorge 11y ago"Dropwizard (http://www.dropwizard.io/ 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.
- g_josifov 11y agoI would recommend to see https://www.youtube.com/user/bienadam 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).