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

201–210 of 213 posts

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

#202
Clojure on the back end and ClojureScript on the front end.

Some reasons:

1. It's a proper full-stack solution. You can share code between client and server if you need to.

2. There is some amazing front end technology (Om, figwheel etc.) that can change the way you think about front end development.

3. It is hard to match Clojure for productivity / interactive development. You can code almost everything at the REPL without restarting (no restarts or edit/compile cycle time needed)

4. You can use all the Java libraries very easily (although idiomatic Clojure wrappers exist for almost everything you are likely to need)

5. The usual Clojure reasons: functional programming, concurrency, immutability, Lisp macro etc.

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

#203

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…

I attempted to learn Spring framework about a year ago since I wanted to build a quick CRUD app on the JVM too. However, I found the Getting Started guides really difficult to learn from. In addition, I found myself quite confused as to which templating engine to use and how to use it in Spring. I stopped working on CRUD for other reasons (pursuing an MSc where I mostly wrote C code).

Yep, similiar situation here. The getting started guides often just introduce a single concept and stops there. Many seems outdated as well. However, Spring Boot with whatever DB choice you make is a winner imho. Found it really easy to get going after just investigating a sample project.

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

#204
In scala-land, I've got experience from Scalatra, http4s and Play framework. We've recently migrated a large Scala project from Scalatra to http4s. I would not recommend using the current 2.x version of Scalatra. The biggest issue I've got with it is it's lack of type-safety. Each REST-endpoint in Scalatra is basically a function from Request to Any. So you can return anything and cross your fingers it works runtime (see e.g. https://github.com/scalatra/scalatra/issues/534). I believe many of the core Scalatra-contributors are nowaday much more active in development of the http4s (see https://github.com/scalatra/scalatra/graphs/contributors vs https://github.com/http4s/http4s/graphs/contributors).

I really like the design of http4s; services compose really nicely -- each service/server is just a partial function from Request to Response. It utilizes Scalaz Tasks for asynchronous opeartions / streaming. On the other hand, I would not consider http4s very mature yet. We've encountered some issues during refactoring from Scalatra to http4s. Also, they offer support for both Servlet- and Blaze NIO -servers, but I've had the feeling that Servlet-support feels a bit like second-class citizen. Maybe not so thoroughly tested (I'm just spitballing here)? But still.. I like it and based on current experience would not advice against using it. Also, I've had great help from their Gitter-channel. :)

Play framework, is nowadays pretty mature. I've used it in multiple projects, and love that nowadays it's sbt compatible (just declare the dependencies) -- I think in the past you had to download a separate distribution for using it.

I think http4s and Play are both excellent choices. Play feels a bit bloatish and maybe opionated compared to http4s, but on the other you've got everything ready (play-ws, play-json, play-twirl etc.). Once http4s gets a bit more mature, I believe it'll be awesome! :)

P.S. With http4s my current recommendation would be: Argonaut for JSON, and Slick for RDMS-support (Postgres all the way).

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

#205
post #183

Earlier quoted context omitted.

Meh... vorg posts on nearly every thread that mentions Groovy and rants about all the perceived wrong-doings in the Groovy community. Some of his points have some merit, but he seems to tend to make mountains out of mole-hills.

You didn't comment on any of the specifics mentioned in that linked-to comment, instead you attacked my behavior, just like one replier to that comment. You mentioned Groovy moving to the ASF in another comment above, but if only two people control the DNS name and physical access to that server in Germany hosting the websites, receiving the Nabble mail archive and Apache website redirects, creating the phantom downl…

instead you attacked my behavior, just like one replier to that comment.

Have you considered that your behavior might be at issue then? Seriously man, you seem to go out of your way to find any and every thread that mentions Groovy in any way, and then launch into your rant about all the evils of the Groovy community.

The thing is, I said that you have some merit in what you say. But the repetitiveness and the vitriolic presentation make you look like somebody who has an axe to grind or something, instead of a dispassionate observer.

You mentioned Groovy moving to the ASF in another comment above, but if only two people control the DNS name and physical access to that server in Germany hosting the websites, receiving the Nabble mail archive and Apache website redirects, creating the phantom downloads from Maven and Bintray, etc, then the list of committers and mentors at ASF for Groovy is meaningless.

When existing, long-established projects move to the ASF, they always deal with shit like this. It takes time to sort this stuff out, that's why there's an incubator. And if it doesn't work out, then so be it. At that point, I'd reconsider my position of advocating for Groovy. But I'm not going to rush to judgment and focus on all the negatives, which is what you seem to do.

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

#206
post #173

My background, which informs my personal taste here: - 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 per…

Why Maven rather than Gradle? Gradle has all the libraries in Maven Central. Gradle also has an extensive set of useful plugins built in [1], and many more available externally [2]. In particular, there's a plugin for making a fat jar [3], and even without a plugin, it's a few lines of code [4]. Or you can also make something more exotic like a capsule [5] or a shell script [6], or my preferred format, a 'distributio…

Honestly, I just hadn't used or explored Gradle in any great detail since returning to the Java world. Thanks for all the tips! Awesome resources.

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

#207
post #183

Earlier quoted context omitted.

You didn't comment on any of the specifics mentioned in that linked-to comment, instead you attacked my behavior, just like one replier to that comment. You mentioned Groovy moving to the ASF in another comment above, but if only two people control the DNS name and physical access to that server in Germany hosting the websites, receiving the Nabble mail archive and Apache website redirects, creating the phantom downl…

instead you attacked my behavior, just like one replier to that comment. Have you considered that your behavior might be at issue then? Seriously man, you seem to go out of your way to find any and every thread that mentions Groovy in any way, and then launch into your rant about all the evils of the Groovy community. The thing is, I said that you have some merit in what you say. But the repetitiveness and the vitrio…

> you seem to go out of your way to find any and every thread that mentions Groovy in any way, and then launch into your rant

The most significant thing you've really said here is that I generally post comments under my own name, as I suspect you also do, given how active your "mindcrime" user is and the implicit assumption in your above comment that you're seeing the entire picture by looking at who's posting comments. Have you considered that other "entrepreneurs" involved with Groovy keep hundreds of HN logins each to obfuscate their mischief here and engage in illicit surveillance of people whose comments they don't like? This I don't say in my comments, instead I keep what I say seemly and do it in my own name. It's because I use my own name that I "seem to go out of my way to find any and every thread ..."

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

#208
post #207

Earlier quoted context omitted.

instead you attacked my behavior, just like one replier to that comment. Have you considered that your behavior might be at issue then? Seriously man, you seem to go out of your way to find any and every thread that mentions Groovy in any way, and then launch into your rant about all the evils of the Groovy community. The thing is, I said that you have some merit in what you say. But the repetitiveness and the vitrio…

> you seem to go out of your way to find any and every thread that mentions Groovy in any way, and then launch into your rant The most significant thing you've really said here is that I generally post comments under my own name, as I suspect you also do, given how active your "mindcrime" user is and the implicit assumption in your above comment that you're seeing the entire picture by looking at who's posting commen…

Have you considered that other "entrepreneurs" involved with Groovy keep hundreds of HN logins each to obfuscate their mischief here and engage in illicit surveillance of people whose comments they don't like?

Honestly? No, the thought never crossed my mind. And now that you mention it, it doesn't sound terribly likely to me. Not "hundreds* of such people anyway. Maybe two or three. Why do I say that? Simply because Groovy just doesn't come up that often to begin with. And a decent percentage of the time, when it does, I'm the one bringing it up, and know where I stand. And while "mindcrime" clearly isn't my birth name, my HN account is clearly linked to my real world identity, so no one can really claim that I'm trying to hide anything here.

One other person here to mentions Groovy / Grails occasionally is @mgkimsal, and I also know him in the Real World, and have no suspicion that he's up to anything nefarious.

That said, people never cease to surprise me and clearly some people post on HN largely for commercial gain. I don't think anyone questions that. I just don't see what you seem to see, in terms of large numbers of users here trying to manipulate the discourse around Groovy in particular.

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

#209

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.

+1 for getting rid of hibernate (and JPA et al). We've been mucking around with JBDI recently it really seems to work well. We haven't done anything extravagant yet, but initial impressions are good

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

#210
post #207

Earlier quoted context omitted.

> you seem to go out of your way to find any and every thread that mentions Groovy in any way, and then launch into your rant The most significant thing you've really said here is that I generally post comments under my own name, as I suspect you also do, given how active your "mindcrime" user is and the implicit assumption in your above comment that you're seeing the entire picture by looking at who's posting commen…

Have you considered that other "entrepreneurs" involved with Groovy keep hundreds of HN logins each to obfuscate their mischief here and engage in illicit surveillance of people whose comments they don't like? Honestly? No, the thought never crossed my mind. And now that you mention it, it doesn't sound terribly likely to me. Not "hundreds* of such people anyway. Maybe two or three. Why do I say that? Simply because…

> other "entrepreneurs" involved with Groovy keep hundreds of HN logins each

> post comments under my own name, as I suspect you also do

I would agree probably 2 or 3 people -- I never said "hundreds" of people, and I specifically said you post comments under your own name, not the opposite.

Post reply on HN