Live data from Hacker News

Ask HN: What stack would you use to build a CRUD web app on the JVM today?

news.ycombinator.com

131–140 of 213 posts

Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?

#132

Earlier quoted context omitted.

I would have agreed till Grails 3. It doesn't work in so many different ways and it's never clear why. The reload stuff seems completely broken if you have dependencies that use many Java 8 features.

Aah, that may well be a fair point. We haven't upgraded to the 3.x series yet, so everything I said should be taken as referring to 2.x.

I had about 6 months experience with Grails 2 and loved it then got forced into updating to 3. Now we're trying to replace it completely.

Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?

#133

If I had to use JVM today, I'd try JRuby + Ruby ON rails: https://github.com/jruby/jruby/wiki/JRubyOnRails

I actually did this. Our main app is a rails app with MRI, which has worked well but comes with a bunch of opts complexity (even with heroku / AWS you're still setting up background workers, caching, queues, etc).

We built an internal webapp using torquebox (http://torquebox.org/). It's kind of a weird project (run your rails app on JBoss of all things), but it's actually worked out wonderfuly for us. I know it's all the rage to build your app out of a bunch of separate services right now (and the next version of torquebox is split out into smaller pieces), but for our small team wrapping all the stuff you need for an app up into one box has been great. Torquebox gives you:

- In-memory cache

- Message queue

- DSL for defining services (can be singletons or not) which torquebox will ensure are running. Your services are plain ruby classes but they can access to your rails environment.

- Threads! Coming from MRI it's really nice to "background" some things via threads.

- Mount other rack apps at "/app" and they share the environment (e.g., queue)

It's been running rock solid for a year with basically no ops maintenance. I'd encourage anyone building webapps to read through the torquebox documentation, it's clearly written by a team of people with experience deploying and maintaining "serious" stuff.

Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?

#134
spring mvc for the rest controllers with spring data jpa for the repository layer. The frontend in Angular 1, nothing beats that in terms of simplicity and flexibility.

Dont try to do your frontend in java using jsf, wicket, gwt, vaadin, play framework the scala compiled templates or anything they are too complex and unflexible compared to what you can do with angular in the browser in a fraction of the time.

Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?

#136

Another vote for Play + Scala here. What I built my last app on, and plan to keep building on it. For simple CRUD it may be overkill, but it scales nicely for when you go past CRUD.

Slick has a bit of a learning curve, but it's really a thing of beauty once you figure it out. I never make syntax errors in queries any more. Getting the code generation from the DB model going is a must. It makes things go really fast, especially for a large data model.

Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?

#138

If that's only me or me and a few experienced Scala developers I would use more cutting edge stuff - Akka HTTP. If the team is less experienced or have more experience with traditional web apps - I would go with Play framework. It's well supported, not difficult to get into.

A nice complement to Akka is Spray.io[1]. Not really meant for CRUD type apps that is the subject of the original question, but very well suited for REST systems. 1 - http://spray.io/introduction/what-is-spray/

Akka HTTP is Spray.io.

Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?

#139
Grails hands down. I work on an enterprise team and every time we pull a developer in who has no experience with it they fall in love. It's just so easy to work with. We spend maybe 2% of the time configuring something and 98% solving the business problem.

Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?

#140

Probably playframework [1] or maybe Spark [2] if it's a really simple app, along with jOOQ for persistence [3]. If I was just writing a REST API, then Dropwizard [4]. The reason I would not choose Spring despite the fact that it is better now than it was 10 years ago is because it still approaches things with the wrong mindset, IMO. The reason JVM technologies are so loathed is because of the stupid, pointless comple…

I really like annotations.

And I really enjoy working on JavaEE.

For anyone who still thinks it means loads and loads of boilerplate code but wants to check, read Adam Bien, check out the TomEE examples, the Wildfly examples etc.

Post reply on HN