4 ms·
I tend to prefer Python/Flask for Web dev to Python but if you are inclined to use Java there's only really one framework that doesn't make me want to tear my e
by cletus 15y ago
I tend to prefer Python/Flask for Web dev to Python but if you are inclined to use Java there's only really one framework that doesn't make me want to tear my eyeballs out.
That framework is Spring MVC.
It is DI, adapters for vendor-specific libraries and utility. It's probably not the easiest thing to start with just because it is so flexible that it can be hard to know where to start. A good "Hello World" Spring MVC 3.1 app would go a long way.
I really would like to use the Play Framework and it's so close to being great but it just falls too far short.
I really liked Play 1.x with Groovy templates. It was simple and it pretty much just worked.
Play 2.x has gone in a radically different (and backwards incompatible) direction. It is now part of Typesafe and the goal of Play 2.x is to make Scala a first-class citizen.
The problem is that many of the niceties of Play are either harder to use or just outright missing in Java Play 2.x (eg AppEngine support and the OAuth client were all present in 1.x and are slated for a future 2.1 release).
There really is a niche for a Java Web framework that like Play ditches the JEE/servlet model in favour of the Rails/Django way of doing things (including dynamic class reloading) but doesn't do it in a way that makes me want to stab myself repeatedly.
This would include playing nice with the Java ecosystem (seriously just use Maven and to hell with SBT).
- mgkimsal 15y agoGrails (grails.org) is Spring under the hood, good MVC layer on top, and gives you Java or Groovy wherever you want to use it. For people coming from a dynamic language background (php, python, ruby, etc) I've found that Grails is a good middle ground option.
- mindcrime 15y agoThat framework is Spring MVC. Agreed that Spring MVC rocks, but Grails[1] is also awesome, and Wicket[2] is pretty cool. [1]: http://grails.org/ http://grails.org/ [2]: http://wicket.apache.org http://wicket.apache.org
- swah 15y agoCan't you stick with 1.2.x?
- brown9-2 15y agoIt's probably not the easiest thing to start with just because it is so flexible that it can be hard to know where to start. A good "Hello World" Spring MVC 3.1 app would go a long way. Try http://blog.springsource.com/2011/01/04/green-beans-getting-started-with-spring-mvc/ http://blog.springsource.com/2011/01/04/green-beans-getting-...
- Bamafan 15y ago"It is DI, adapters for vendor-specific libraries and utility. It's probably not the easiest thing to start with just because it is so flexible that it can be hard to know where to start. A good "Hello World" Spring MVC 3.1 app would go a long way." Spring is OK in the service and DAO layers. I prefer Stripes on the web layer. Stripes IMO has a far more sensible approach to laying out the web layer (e.g. combining controller and backing object, fewer configurations, more sensible tag system, etc.). http://stripesframework.org/display/stripes/Home http://stripesframework.org/display/stripes/Home