I second Play Framework. Have used it and Scala is a very nice language to learn. If I had invested in so much into the JVM, Play Framework would be it. But, if it's just a simple CRUD app, and if you had a choice, I'd recommend you to give Ruby on Rails a try. Hope this helps!
Scala and Play is a great choice. Another good Scala framework is Lift: http://liftweb.net/ If JVM is not a must, consider using Meteor.
Ask HN: What stack would you use to build a CRUD web app on the JVM today?
91–100 of 213 posts
Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#92Earlier quoted context omitted.
Scala and Play is a great choice. Another good Scala framework is Lift: http://liftweb.net/ If JVM is not a must, consider using Meteor.
+1 for Meteor. We've been using Meteor for about 8 months now and are amazed with the productivity and no-boilerplate code. To give some context, we were previously a JVM-only shop. In the past we've used Spring+Hibernate+GWT for one project, Ninja for another project, and a full blown custom stack + Dojo client side in a third project. If JVM is your only choice because you want to connect to legacy Java API, consid…
Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#93Definitely 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/
Also, yesterday I announced that I am writing a book on developing REST API's in Clojure, if anybody's interested in learning: http://christopherdbui.com/announcing-practical-rest-apis-in...
Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#94- Most recent 8 years, have used dynamic languages on the server (Node.js, Ruby, PHP, some Python)
- Have dabbled in C# (ASP.NET MVC and WPF)
- First 4 years professional experience as a Java web developer (servlets, Struts, Spring, Hibernate, etc)
- Have needed recently to generate greenfield Java apps for relatively straightforward CRUD web apps / JSON APIs
I personally would have a hard time going back to Spring or JEE. I initially looked at Play, which is very cool in many respects, but comes with a high complexity/magic level that makes me nervous. Probably it's great, my old bones just can't deal with another long walk to mastery like with Rails.
Here's the stack I have been most comfortable with - note that this has been for relatively simple CRUD app development, and may or may not suit your hyper-enterprise-iot-multitenant-whatever use case:
Web Framework:
Spark 2 (requires Java 8)
Kevin likes: Easy to generate single runnable jar, simple route configuration, no heavy abstraction over HTTP (easy to filter, redirect, return status codes, set cookies, etc), support for a variety of modern template engines.
Kevin dislikes: pretty small community around the software
Template Engine:
jade4j
https://github.com/neuland/jade4j
Kevin likes: terse syntax I came to enjoy from Node/Ruby, can easily re-use templates on the front end if needed in Backbone. Integrates easily with Spark.
Model:
Morphia (MongoDB)
http://mongodb.github.io/morphia/
Kevin likes: it's web scale, no schema maintenance, easy to configure for dev/test/prod, easy to create fat models, doesn't require a ton of annotation for persistent fields.
Kevin dislikes: sparse documentation
Dependencies/Build:
Maven (duh)
Kevin likes: doesn't matter if I like it, all Java packages live there. Lots to use and choose from both for build tasks and in your code. Make note of the Shade plugin, which makes it easy to generate a single runnable "fat jar":
https://maven.apache.org/plugins/maven-shade-plugin/
Kevin dislikes: OMG XML. Super verbose. Pretty slow. Seems to frequently download the Internet. Not fun to extend - consider shelling out to your own scripts:
http://www.mojohaus.org/exec-maven-plugin/
With the above tools, I found that it's easy to take advantage of the great software packages that do exist for Java, without making my brain hurt too much.
HTH!
Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#95Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#96Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#97If 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.
Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#98Backend: Scala Spark - http://sparkjava.com ScalikeJDBC - http://scalikejdbc.org Postgres Coming from Rubyland (and AR specifically), I despise writing a bunch of dao/repo code, so I've resorted to codegen-ing my daos/repos. Frontend: Aurelia - http://aurelia.io
Out of curiosity, why Spark over Scalatra? (http://scalatra.org/)
Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#99Re: Ask HN: What stack would you use to build a CRUD web app on the JVM today?
#100I call it rm-driven development. It'll be a thing in a year.
In all seriousness, I'd probably look at Scala and Play if JVM was absolutely required, but I'd first look into why that requirement is in place and if the requirement can be removed.