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

141–150 of 213 posts

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

#141

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.

I'm actually pretty amazed at the diversity, and how few of these frameworks I'm familiar with.

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

#145

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.

This is so true! ... I was ready to give up on J2EE (prior to the name change and version 1.5). Java EE 7 is wonderful and more tools are coming. It's no longer an XML configuration nightmare with 10 classes to define all the required interfaces and implementation.

To reduce even more boiler-plate, I've recently started using project Lombok [1]. Code generation provides all the standard methods and allows JPA @Entity objects or JAX-B objects to be completely declarative. Start with @Data and @Value.

[1] https://projectlombok.org/

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

#146
post #48

First of all, I have to agree with dommer. You pick the stack depending on the use case. That being said, in most use cases I've encountered I would've gone with a REST API on the server for CRUD operations and an SPA framework on the UI side. I've found that the use of a classical UI Framework like Play, Grails or JSF make seperation of UI and business logic harder, rather than easier. Especially Grails is a huge ve…

Grails is great for building a REST API. Especially the latest version. It makes it dead simple. I do SPA frameworks on the front and JSON APIs from the back.

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

#147
It depends on your needs, and what you want to do. If you're a big Pythonista, perhaps Jython is worth a look in. Lisper? Look more towards Clojure. Need to be able to hire developers? Plain Java will help you on that front.

Often, choosing a JVM language does not lock you into that language, as there's good interoperability. Be prepared that the first choice of language for a project might not be the best choice.

In response to the question, Java, Spring, Hibernate, and Postgres have served me well on a variety of projects. However, you need to take it with a grain of salt -- my needs will likely be different to your needs, and my skill set is almost certainly different.

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

#148

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.

Indeed. I recently received a pull request to swap Hibernate into a Dropwizard project with a relatively simple data model that was operated on by some simple JDBI repository implementations. The pull requester obviously spent a lot of time on it, and I felt bad rejecting it, but in total the Hibernate impl would have added several thousand lines of code to something that worked perfectly fine as it was. I really don't understand the need to use complex things just because they're popular.

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

#149
Being the author, I'm of course biased, but I made Boilerplay (https://github.com/KyleU/boilerplay) for this very reason. It's a Play/Scala app, uses postgres-async for database access, and provides most of the boilerplate you'd need for non-trivial apps (admin, metrics, reporting, sign-in, etc).

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

#150

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.

I'm guessing you like annotations because they're less painful than what you were used to previously. You don't need an EE server to serve up a basic web app. Or even a complex one.
Post reply on HN