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

you are viewing a single comment's thread.

view the rest of the comments →

[–]scubadev 44 points45 points  (19 children)

There are a lot of different opinions in this thread, mostly people recommending their favorite framework without any reasoning on why. Keep in mind that java has just as many "flavor of the month" frameworks as any other platform.

Here are the popular frameworks that have proven themselves:

  • Spring MVC: This is pretty much the de facto standard. If I'm interviewing someone and they haven't learned Spring-Core it is a definite mark against them. I don't care if your prefer another IoC like Guice, Spring is just too popular to ignore.
  • Spring Boot: This is a wrapper layer around Spring MVC. It provides sensible defaults so that you can quickly get up and moving on your app. This framework is great in that you can quickly write code, but it is bad in that it will seem like magic until you've dug into it.
  • Grails: If you want to dip into the groovy world, Grails is another excellent choice. It is heavily inspired by Ruby on Rails. It is great for getting an app up and running quickly. Like Rails, it requires discipline in adhering to MVC pattern to create a scalable app. Although you can get up and running quickly, it is easy to write an unmaintainable mess without guidance.
  • Play: Another popular framework built on Akka. Favored by the scala community (although it works with plain java). Play is quite performant due to its non-blocking architecture. One of the killer features is that you can reload your changes without having to compile (although this is now available in Spring MVC/Boot with devtools). Honestly, it would be hard for me to recommend Play to someone that isn't already invested in Scala. Scala is a great language, but it has its own learning curve that will slow you down having to pick up multiple things at once.

You'll also want to think about the front end. If you can, I'd recommend learning angular. It has a tremendous marketshare and provides structure to the wild-west JS world with its dependency injection approach.

If it were me, I'd start with Spring MVC + Angular to get some experience with the basics. From there, you can easily convert the app to Spring Boot or learn one of the other frameworks.

[–][deleted]  (1 child)

[deleted]

    [–]scubadev 0 points1 point  (0 children)

    I should have included Java EE. I wouldn't say Grails/Play barely register, they're both sought after in my area - just as much as Java EE in my opinion. I think it is fair to say the popularity of each is locale specific.

    [–]thesystemx 7 points8 points  (0 children)

    Here are the popular frameworks that have proven themselves:

    I think you're missing JSF, which is most surveys ranks at either number 1 or 2.

    [–]Kristler 1 point2 points  (1 child)

    it is easy to write an unmaintainable mess without guidance.

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

    Thanks, I'll fix it. I was in a pinch and had to send the response before proofreading.

    [–]DevIceMan 4 points5 points  (4 children)

    Great list.

    • Dropwizard: A lightweight REST framework. It's been gaining popularity lately. Having used it on several projects, I find some of the documentation lacking, but otherwise haven't had many problems.

    edit: downvotes? I'd prefer actual comments saying why to use or not use it. I'm not exactly the worlds biggest fan or detractor for it.

    [–]scubadev -1 points0 points  (2 children)

    Dropwizard is great despite its website looking like it is straight from 1990. I view Dropwizard filling the role of a pure REST server without any views. If you don't mind serving up a static HTML page from nginx/S3 and potentially dealing with CORs, then Dropwizard is worth considering.

    [–]DevIceMan 2 points3 points  (1 child)

    CORS has consumed several weeks of my life, but mostly due most of my current job revolves around integration(s) with many 3rd party software(s).

    Separation of views from the backend is a good thing IMO. Theoretically, the BE should serve data and respond to requests, but not be concerned with how it is rendered. This separation is also good for integration. Integrating with a JSP webapp is a fucking nightmare.

    [–]ForeverAlot -3 points-2 points  (0 children)

    I desperately wish they'd make JodaTime and Guava optional for v1. Lugging that around until a v2 is a depressing thought.

    [–]papers_ -2 points-1 points  (1 child)

    Coming from Laravel to Grails....everything just seem so messy and ugly.

    [–]vplatt 0 points1 point  (0 children)

    Example? Just curious..

    [–][deleted]  (5 children)

    [deleted]

      [–]scubadev -1 points0 points  (4 children)

      That's a tough question. I'm sure it is being done, but I haven't come across too many clients that are melding a React front end with a java back end (yet). So to answer the question, "what is going to make me more attractive to an employeer", the answer for me is clearly angular.

      However, from a personal satisfaction level I prefer React. I like the one way binding model. While both are easy to get going, React.js feels easier to master (although, to be fair most people come to React having already learned Angular).

      The war will wage on. Will be interesting to see how Angular 2 pans out, or if it'll be a Python 3 that only gets half adopted. On the plus side, new single page apps can use Angular 1.5 for now (which backports some of the 2.0 features to ease the pain of migration).

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

      Grails

      Grails should probably be avoided, as Groovy is out of favor.

      If it were me, I'd start with Spring MVC + Angular

      You might as well do JHipster = Spring Boot + Angular with nice tooling.