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

121–130 of 213 posts

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

#121

Groovy / Grails. It's what we chose to base all of our products on and it has worked out really well for us. If there's any complaint / negative, it might be that the ecosystem is in a bit of a "state of flux" with Pivotal dropping support for Groovy and the language moving to the ASF, etc. One bit of fallout from that, for example, is that the GGIDE isn't available for Eclipse Mars yet (or it wasn't last time I look…

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.

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

#122
post #14

Definitely Clojure with http-kit [1]. Easy to use, minimalist and supports websockets. However, it depends from your use-case. Could add some detail please? [1]: http://www.http-kit.org/

I can personally second this. It is pretty quick to get a micro service up and running with Clojure. My team has been using the Duct[0] generators which set up a nice scaffolding. It also includes some decent examples writing components, models and endpoints. Plus swagger is free out of the box.

[0]: https://github.com/weavejester/duct

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

#123

I don't see how this question is answerable in any meaningful way in its current form. You're going to get a list of basically every JVM framework there is, and you speak nothing of your front-end requirements.

This isn't stackoverflow.com and getting a list is totally ok.

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

#124

Spring MVC + Hibernate. I'm familiar with those libraries and they provide almost everything I usually need. For frontend I would choose either JSP or Thymeleaf, both are good, depends on your taste and whether you're writing HTML markup. Another option is a JavaScript-powered SPA website. You have plenty of choices there. And I highly suggest using Intellij Idea Ultimate + JRebel. Those technologies provide tremendo…

Yeah, as long as you go with Java 8, then I think the Spring+Java app is still a viable and also pretty powerful option. Although I disagree about Hibernate as I've found it ends up causing a lot more problems than it solves in the end.

Java + Spring is still a very safe (albeit boring) option for a lot of different types of web apps today.

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

#126

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…

+1 for Dropwizard. Setting up Dropwizard was a breathe of fresh air in the Java world.

If you can swing it for your project, I would suggest trying to sidestep ORM altogether by using a NoSQL database like MongoDB.

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

#127

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

I love the idea of JRuby, but I found the community was weak when I did my exploration. Granted, that was about 1.5 years ago.

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

#128

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/

As redtuesday correctly noticed, Akka HTTP is a successor of Spray.io. Mathias Doenitz, the main author of Spray.io, worked on Akka HTTP as well. They are similar in many places, just powered by different "engines". Akka HTTP is built above new Akka Streams, while Spray.io is powered by plain Akka. But, for example, routing DLS is very similar. Our main API is in Spray, but when I tried Akka HTTP for a new microservice, I actually reused most of things from our customised stuff above Spray.

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

#129

Earlier quoted context omitted.

It doesn't change my impression much if the answer to "lots of boilerplate" is to use another tool to generate it automatically...

Actually the example I was thinking of is the finder methods which require only an interface definition conforming to a naming convention. Bytecode is generated at runtime - there is no generated source to manage. Not much of what Jhipster generates could be considered boilerplate - the application code is pretty DRY. I've used Rails off and on since 2005 and it is fairly comparable in that respect at this point thou…

It's difficult to take Spring seriously after trying Jersey. Resource traversal is a powerful concept. Also, recent or not, Spring still comes with way too much complexity and magic. I'd really go for something more Sinatra/Flask-like. Haven't tried Dropwizard, but from what I saw it looks a lot more sane.

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

#130
post #36

Earlier quoted context omitted.

Just because uncle Bob says something doesn't mean it's true. Frameworks and stacks provide templates for building CRUD apps. Building CRUD apps (read: database skins) isn't a big technological challenge most of the times anyway. So picking a stack that abstracts most of it for you could be a great help to only focus on the parts you care about. Not every project requires astronaut architecture and grand design. Half…

It seems to me that you intentionally misrepresent the argument to make it easier to attack. No one is claiming that Uncle Bob is always right or that an "astronaut architecture" is the correct design. On a different note, I would also recommend to not start picking the framework or stack: Instead I would start by creating a couple of basic classes that represent the business logic. I would also write tests for those…

I would start by creating a couple of basic classes

How would you do that without deciding on a language/framework?

Suppose the goal is a shared calendar and message boards plus some way to buy ski passes. Doing this using SharePoint is going to be vastly different than Ruby on Rails.

Post reply on HN