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

111–120 of 213 posts

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

#111

Does anyone have any opinions on DropWizard as a framework? Is it the minimalist web framework for Java, similar to Flask for Python?

It's ok for Java. Much rather be in Scala land though, and exploit the JVM for all it's worth.

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

#112

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 basically the successor to spray if I remember correctly. At least I believe jonas boner said so. Not sure I would invest much time in spray at this point in time.

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

#116

SparkJava ( http://sparkjava.com/ ) + jooq ( http://www.jooq.org/ ) Minimalist and powerful enough. It's as close as you can get to sinatra + active record in the java world. And, of course, I would use intercooler.js for the front-end: http://intercoolerjs.org/ to keep things simple.

And to go even lighter I use pippo(https://github.com/decebals/pippo). I like the modular way that allows me to tailor my apps to be <1MB final size. Really helps with lightning fast deployments on my many DigitalOcean smallest 512MB instances.It also works great on raspberry pies - I was using nodejs webapps until pippo because they were lighter on resources(I rather hate js and nodejs and hence the praise for pippo) . I also pair it with jooq for db access when needed.

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

#117

Does anyone have any opinions on DropWizard as a framework? Is it the minimalist web framework for Java, similar to Flask for Python?

I've used all the technologies in DropWizard, but not DropWizard itself. I do think their project is on the right track and pretty much my ideal solution.

But because they've designed a one-size-fits-all stack for any project, it looks overkill for a lot of apps. I.e., you can just use plain Jersey+Grizzly/Jetty+Freemarker.

I've been meaning to put a simple project together which ties all those into a functioning web and app server. The trick to turning Jersey into a web server (for static files) is along the lines of this: https://github.com/MachinePublishers/ScreenSlicer/blob/maste...

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

#118

Earlier quoted context omitted.

If you're favoring Boot, why not just use a newer version of Grails?

I don't understand the question, beyond the fact that Spring and Grails both had the same corporate sponsorship at one point in the past. Spring Boot is a rapid, flexible, and fairly tight (as far as Java frameworks go) foundation for building Java applications. Grails is a Groovy-based wrapper layer around Spring and Hibernate. So if you want to use Groovy for application development, then Grails is certainly there…

For the most part you don't need to rebuild to test your changes. Live reload works.

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

#119

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.

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

#120
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 complexity that's so pervasive, where Spring is/was the poster-child. Building generation after generation of newer APIs on top of the old stuff doesn't remove the fact that the old stuff is still there. Hiding complexity with code generation doesn't remove the fact that code still needs to be generated. And the same with annotation driven programming. And JPA/Hibernate/etc.

Simplicity isn't about hiding mountains of legacy complexity under a shiny new API, or annotations, or code gen - it's about having a stack that is understandable and easy to use from top to bottom without requiring magician's toolbag of tricks to hide the complexity. I get the feeling that most JVM developers don't even know what this looks like - Dropwizard is a great example. Other languages/ecosystems tend to not have this legacy baggage, so you can't blame their developers for thinking that the mainstream JVM frameworks are ridiculous. Because they are.

/end-rant

[1] https://www.playframework.com/

[2] http://sparkjava.com/

[3] http://www.jooq.org/

[4] http://www.dropwizard.io/

Post reply on HN