框架对比

Java Web 框架对比

  • 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.

  • 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.

上一页