News for hackers. Stuff that matters.
Re:Ask HN: What stack would you use to build a CRUD web app ... by carsongross on Wednesday September 30, 2015 @10:38AM (#10304268)
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.

Re:Ask HN: What stack would you use to build a CRUD web app ... by balamaci on Wednesday September 30, 2015 @01:20PM (#10305536)
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 ... by ww520 on Thursday October 01, 2015 @02:33AM (#10309566)
Pippo looks pretty sweet. How does it compare to Spark?
Re:Ask HN: What stack would you use to build a CRUD web app ... by reactor on Monday October 05, 2015 @07:45AM (#10331141)
I'm trying pippo for the last couple of weeks, its quite lightweight and really fast. I could customize it for whenever the need arises, better than sparkjava. For eg: I couldn't customize the Jetty server params with sparkjava, I could with pippo.
Re:Ask HN: What stack would you use to build a CRUD web app ... by decebals on Tuesday October 06, 2015 @06:50AM (#10337980)
I don't know many things about Spark, so I can't make a full comparison. I will try bellow to enumerate some advantages of Pippo:

- modular [1] (spark uses a giant static singleton architecture)

- support (via modules) for many Template Engines [2] (Freemarker, Jade, Groovy, Trimou, Pebble)

- support (via modules) for many Servers [3] (Jetty, Undertow, TJWS); spark depends on Jetty

- directly serving of static resources [4], support for WebJar

- content type negotiation

- custom session [5] (support for cookie based implementation)

- support (via modules) for many ContentTypeEngines [6] (Plain text, Json - Gson/Fastjson, Xml - Jaxb/Xstream, Yaml - SnakeYaml)

- i18n [7] (in java or directly in template)

- support (via modules) for many IoC [8] (Guice, Spring)

- support metrics [9] (via modules - Ganglia, Graphite, InfluxDB, Librato)

- custom (template) error pages

- regex routes

Unfortunately the actual documentation of Pippo it's a little bit behind of the implementation (from documentation are missing some nice concepts: named routes, finally filters, custom route context, ...) and from this reason I cannot give you more useful links but I will fix this aspect asap.

Another difference in Pippo to other (micro) java web framework (spark, ninja) is that a RouteHandler it's a real endpoint (the handle method return void). You can finalize/commit the response using send, render, redirect. Everything is transparent.

[1] http://www.pippo.ro/doc/modularity.html

[2] http://www.pippo.ro/doc/templates.html

[3] http://www.pippo.ro/doc/server.html

[4] http://www.pippo.ro/doc/static-files.html

[5] http://www.pippo.ro/doc/session.html

[6] http://www.pippo.ro/doc/content-types.html

[7] http://www.pippo.ro/doc/internationalization.html

[8] http://www.pippo.ro/mod/spring.html

[9] http://www.pippo.ro/mod/metrics.html

Re:Ask HN: What stack would you use to build a CRUD web app ... by slantedview on Wednesday September 30, 2015 @02:36PM (#10306103)
The need for codegen to approach LINQ-level magic on the JVM is unfortunate, but jOOQ is killer compared to the JPA/ORM bloat that most folks can't seem to stop themselves from using.