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

61–70 of 213 posts

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

#61
post #4

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!

I agree. And I'd add that the continuous compilation of the Play framework allows for a great, fast workflow. Even in combination with non-JVM compilation like for Typescript.

The last version comes with Slick integration which brings Ling-for-Sql style persistency to the JVM. In combination with support for Postgress JSON persistency that makes for a great fast prototyping stack.

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

#62
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.

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

#63
post #29

I would not start with technology stack and build around them. You look at your use cases and build out. Pick your frameworks and databases judiciously and as late as possible. Read: https://blog.8thlight.com/uncle-bob/2012/05/15/NODB.html Read: http://www.amazon.co.uk/Growing-Object-Oriented-Software-Gui... [EDIT] Removed the unnecessary/unhelpful opening statement.

Particular things have to be decided upfront. You can't just add an app framework as an afterthought to your code.

I'm unsure about that and I think it depends greatly on what is the goal.

You can very easily do DI without Spring. (yes I know Spring is more than DI) As the project grows you can simple add Spring if brings 'real' value.

You can defer the choice of data store very late in a project without hinder its progress.

I'm not anti-framework/tooling, I just want to make sure it is required before I add it.

Most, if not all, frameworks require some specific bootstrapping/configuration that is extra to the job at hand.

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

#64
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/

That looks like it is a HTTP server. What parts of CRUD does it help with, does it have say an ORM (or equivalent way to interface with a database) and some sort of default interface so the user can work with it?

I picked some best library choices in this repo https://github.com/pjagielski/modern-clj-web

In short it's component + system + monger + om on the frontend

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

#65
post #53
post #46

Earlier quoted context omitted.

My inclusion of these two reading resources were only meant as examples. The reader is still required to make their own mind up. I haven't suggested astronaut architecture; the question didn't indicate the size/scale/importance either. 50% of the internet runs perfectly fine without consideration...wow! Have you looked at all the source code yourself to make such a ridiculous conclusion. Tooling does matter, but I'm…

As a data point, 20% of the internet runs WordPress [1], think these people spent a lot of time thinking about architecture. A lot of time the problem being solved is in fact simple enough and easy enough to solve without thinking about architecture, not everything is a hard problem - and there is nothing noble about solving things over and over. The point I was disagreeing with was "Pick stacks as late as possible".…

I'll skip the flame about WordPress developers as I don't know any, or, viewed their work.

If you think building micro service architecture can be done without consideration I'm lost for words.

The question–as I've been rightly reminded–was 'CRUD Web App in JVM'; furthermore, we now know that the domain part of the application is already done, so my comment is moot.

That just leaves CRUD, Web, and JVM.

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

#67
post #55

Earlier quoted context omitted.

can you talk a bit more ? How do you write your views and integrate them with sangria. I'm coming from nodejs .. where everything is JS, so I'm trying to understand how this stack works.

Sangria is a scala GraphQL server. Facebook released an initial reference implementation in javascript, but I wanted the type-safety that scala gives. If you're more comfortable with JS you could check that out. See https://facebook.github.io/relay/ . With GraphQL you don't write views per se, but you make data available. The client can pick and choose which of the exposed attributes it needs to render a view. So if…

thanks for that!

I'm assuming your views are written in React.js - how does that get served to your clients ? does the Scala relay server serve it ... or do you have a separate client webapp ?

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

#68
post #55

Earlier quoted context omitted.

Sangria is a scala GraphQL server. Facebook released an initial reference implementation in javascript, but I wanted the type-safety that scala gives. If you're more comfortable with JS you could check that out. See https://facebook.github.io/relay/ . With GraphQL you don't write views per se, but you make data available. The client can pick and choose which of the exposed attributes it needs to render a view. So if…

thanks for that! I'm assuming your views are written in React.js - how does that get served to your clients ? does the Scala relay server serve it ... or do you have a separate client webapp ?

Yeah the views are all just react.js. The JS for the webapp is dumb so can be served by S3 (i.e. no server-side rendering). It's basically REST++ - a pure server that just serves data (sangria/graphQL server) and a decoupled client (which in my case happens to be a react web app for now).

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

#70
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.

Post reply on HN