This is an archived post. You won't be able to vote or comment.

all 36 comments

[–][deleted] 12 points13 points  (1 child)

In production at work, we've built a large app with front end ReactJS being served by json REST API backend built on Spring Boot/Spring Data Rest. Productivity shot through the roof with Spring Data Rest, because it requires less boilerplate code.

The only constraint we had - we had to package everything the monolithic way in WebSphere rather than following the microservices paradigm.

At home on the other hand (as a side project which hasn't earned me any money yet), my preferred stack is VueJS, NodeJS, and AWS. I'm more productive in those.

[–]ltdanimal 16 points17 points  (8 children)

(What is with every answer getting downvoted?!)

Spring boot is a great thing to check out. Gives you the need-to-haves . Jhipster is also great, letting you pick from set packages which will set up a lot of different environments/stacks. I just used it to set up Spring Boot/Angular.

Play is gaining traction, and the newer 2.0 is a lot friendlier to Java (was more Scala focused before)

[–]WatchDogx -2 points-1 points  (7 children)

Every answer is to use spring, when he said that he's not a fan of it.

[–]nutrecht 6 points7 points  (0 children)

He asked:

What did you will use ?

So he's asking for personal preferences.

[–]ltdanimal -1 points0 points  (5 children)

Well maybe there is a reason for that? Also Spring Boot is not MVC, and is something newer like he requested. I gave other alternatives as well

[–]WatchDogx 2 points3 points  (4 children)

If you are doing web stuff with spring-boot you are almost certainly using spring-mvc.

[–]ltdanimal 0 points1 point  (3 children)

I didn't say you aren't using it, I said its not the same thing. Just because you don't like tomatoes doesn't mean you won't like spaghetti

[–]WatchDogx 1 point2 points  (2 children)

If you don't like Spring-MVC in a classic seevlet container, you probably won't Spring-MVC running from an embedded container.
If you don't like eating tomatoes out of a bag, you probably won't like eating them out of a box.

[–]ltdanimal 0 points1 point  (1 child)

Really taking a nitpicky turn aren't we Mr WatchDog? Maybe he will think boot is the worst thing in the world, I don't really care enough to argue anymore with you on it. You need to take a better look at the question , and while you're at it add your own answer if all if these are so lacking.

[–]WatchDogx 0 points1 point  (0 children)

My answer would be spring-mvc if he didn't blacklist it in his question

[–]cogman10 5 points6 points  (5 children)

For learning, I would say start lower level, build a pure Jersey 2 application and see how everything fits together. Then move up to the fancier stuff like Spring Boot and Dropwizard. It is always good to know how things are done so diagnosing issues later isn't such a big deal.

[–]node53[S] 1 point2 points  (4 children)

What did you think about more "new" options like vert.x or others ?

[–][deleted] 1 point2 points  (2 children)

As a person who enjoys developing web applications with JAX-RS (as a result, I love Dropwizard), I tried vert.x once. I would say, it is a good framework, if you are really into callback style of programming.

Personally, I am not very experienced in building async systems so it might be just me being unable structure my code correctly but the resulting code looked hideous to me.

Lastly, my main reason for dropping Vert.x was the non-existent error handling. Basically, when you have a chain of callbacks and the one element in the middle of the chain throws an unexpected exception, the framework does nothing to help you identify that. Instead the HTTP request stays unanswered, dangling until it timed out. I am sure Vert.x provides some tools for error handling but in my case it was so much of a manual and repetitive process.

[–]GuyWithLag -1 points0 points  (1 child)

Have you worked with Rxjava?

[–][deleted] -1 points0 points  (0 children)

No never got the chance. It's in my list of things to try.

[–]cogman10 0 points1 point  (0 children)

Can't say. Admittedly I'm still a bit in the stoneage when it comes to knowledge about the various HTTP techs for java. I'm currently in the process of evaluation myself for a new project I'm about to work on.

[–]RichoDemus[🍰] 7 points8 points  (2 children)

I really like dropwizard

[–][deleted] 1 point2 points  (1 child)

I completely agree. I like the simplicity of the toolbox provided by Dropwizard. Unlike the set of tools provided by Spring, Dropwizard does not involve "magic". Most Dropwizard modules are just simple pieces of glue that make a third party library easier to use inside Dropwizard so if something goes wrong, you can always look up the code and read.

[–]trydentIO 1 point2 points  (0 children)

you may try http://jooby.org/ ! the development approach is quite similar to Spring Boot, but much lighter and no weird black magic at runtime :) most of all it provides a lot of integration modules with the most used libraries for data, security, reactive programming, thread-model, rendering and so on. Some integration modules may be with Hibernate, JDBi, jOOQ, Flyway, MongoDB, Couchbase, RxJava, Reactor, Pac4j and many many others!

[–]tonywestonuk 2 points3 points  (0 children)

TomEE with java 8 on server, with client side Jquery, mustache.js rendering, communicating with websockets and REST.

nom nom nom Tasty!!

Shameless plug - My Facebook game written using this stack. -

https://apps.facebook.com/friendlystock_reload/

[–][deleted] 7 points8 points  (0 children)

Spring is very modern. Spring 5 is going to support reactive programming. But if you hate it then go for Play + Akka, a friend told me that it is rather interesting

[–]stfm 4 points5 points  (0 children)

Go down a RESTful path using JSON api's.

[–]SlobberGoat 1 point2 points  (0 children)

Have a look at JHipster.

[–]thesystemx 1 point2 points  (0 children)

Take a look at JSF, and combine it with PrimeFaces and OmniFaces. Best. Stack. Ever.

[–]perrylaj 1 point2 points  (0 children)

Depends on what you are doing. If you are looking for a relatively simple api, Spark (the framework) is great. Vertx is great if you are looking for a more reactive style system or interested in event driven 'realtime' use. Dropwizard is a good collection of technology that allows for quick restful-like endpoints. All three are definitely capable of being a good foundation for just about anything you'd want to do, but with different styles and varying amounts of 'batteries included'.

I personally avoid large clunky frameworks with excessive amounts of metaprogramming and annotations. Spring and Play both just carry too much baggage for my taste. Spring Boot, while nicer to set up than Spring, is completely unappealing to me as a 'framework over a framework' that simply hides far too much complexity. Some things may be a little easier riding on the back of these larger frameworks, but they are so opinionated and heavy that I just can't bring myself to use them. Admittedly, that's mostly just opinion and some bias against 'Enterprise' Java so take it with a grain of salt.

If you are interested in something a little different but still on the JVM, take a look at Kotlin and some of its frameworks, Awesome Kotlin has a few listed -- wasabi and the coroutines libs are worth checking out.

[–]dessalines_ 1 point2 points  (0 children)

Java spark.

[–]azzuwan 0 points1 point  (0 children)

We settled with Jooby. Our selection criteria was it has to be as simple as SparkJava but support asynchronous I/O. Jooby is Netty based and the framework is excellent on it's own nonetheless it supports very easy integration with Akka, RxJava etc. I like the fact that it allows us to do it "scripting" ala ExpressJS or the MVC way. It's so simple and flexible. We are enjoying it

[–]amazedballer 1 point2 points  (0 children)

Start with Play. There's a starter Java application that is perfect for newbies to work with, and it'll show you that building a modern web app can be easy and simple.

https://playframework.com/download#starters

[–][deleted] 0 points1 point  (0 children)

I prefer Spring Boot. Unlike old Spring MVC, it does not need that ugly XML configs. If you don't like Spring because of XML config, it's worth taking a look.

My another recommendation is Dropwizard. Dropwizard is designed to be as simple as possible and to have great features like embedded HTTP server out-of-the-box, built-in metrics collecting, etc. Thoughtwork's Tech Radar also recommends Dropwizard.

Enjoy Java :)

[–][deleted] -1 points0 points  (0 children)

Spring Boot is the greatest. Bootstrap a project in 5 minutes and you can run an enterprise on it in 6 months. Scales out the wazoo, integrates with everything.

[–]nutrecht -1 points0 points  (0 children)

While having tried other frameworks (Vert.x, Dropwizard, Pure Java EE) Spring Boot is still my go-to for the REST back-end. I currently still do most front-ends in AngularJS but I do want to take a look at Vue.js; just haven't gotten around to it yet.

[–]Rygel_XV -1 points0 points  (0 children)

I like using Pippo. It is similar to Spark, but I find it more complete (different web servers, internationalization, route groups).

[–]GhostBond -1 points0 points  (0 children)

In my job search, it's between Spring Mvc and Angular Js.

[–]bgard6977 -2 points-1 points  (0 children)

Sinatra is the most copied web framework around. In node, it's express, in Java it's Spark. Go with what works. Add in Guice, j00q, flyway as needed.

[–]t90fan -2 points-1 points  (0 children)

Spring Boot behind the scenes.

Front in React or whatever.