When comparing Play Framework vs Spring MVC, the Slant community recommends Play Framework for most people. In the question“What are the best backend web frameworks?” Play Framework is ranked 7th while Spring MVC is ranked 9th.
Ranked in these QuestionsQuestion Ranking
Pro Asynchronous Core
Pro Interoperable with Java
It's like Java, but more Haskell-y.
Pro Good documentation and a great community
Play has quite a large community which provides numerous tutorials and videos related to developing with Play.
The Play official documentation covers many things, such as the framework itself but also specific stuff such as Akka, SBT and Netty.
There are also many big companies that base their main sites around Play, one of them is LinkedIn which provides third-party documentation on a regular basis.
Pro Play is an extensive ecosystem
Play uses Akka for concurrency, Scala for a templating engine, Netty as a client-server framework and SBT (Simple Build Tool) for building. And they all come out of the box.
Play also comes with the option to scaffold your applications. Play is an all-embracing ecosystem designed to increase developer productivity and shorten development times.
Pro Simple for beginners
Play is very simple to get started. The documentation is very helpful for beginners and advanced users alike and the official website has a great "Getting Started" tutorial to begin developing with Play.
Pro Good Websocket Support
Pro Readable code
Play framework's convention over configuration methodology makes most Play projects have a very similar structure. This means that the code written for the framework is very readable. This enables a developer to switch between applications without having to relearn the ecosystem for every project. The built-in templating system also helps with code and makes it possible to have a very low count of lines of code.
Pro Can use Java, one of the most widely known languages
Java is one of the most widely known languages, so people coming from that background can jump right in and not have to learn a new language syntax.
Pro Spring MVC has a massive community
Being the oldest and most used JVM web framework, means that Spring MVC has a massive community of followers who are very helpful and have provided numerous tutorials and answers on SO.
Spring even holds an annual conference called SpringOne. The Spring forums and SO are great places to ask and get help about anything Spring related. The website blog and newsletter keep developers informed on every news related with the framework.
Pro Spring apps are highly scalable
Applications are meant to scale as the framework is used in large-scale applications worldwide. Components like EhCache are used to scale memory cache and it also contains components used for parallel processing.
Batch enables processing of large volumes of records and job processing statistics.
Pro Great documentation that covers almost everything
The official documentation covers virtually everything. The official website also has a series of great tutorials in video and text formats. There are links to Github repositories for Spring sample applications and there are also a lot of third-party tutorials out there for the fact that Spring MVC is so widely used by many experienced developers.
Pro Spring has an extensive ecosystem
It is based and is dependent on the Spring Framework, therefore it benefits from tools like for example Roo and Spring Tool Suite and many more tools included in the Spring Framework. All Maven dependencies are available in a public Maven repository.
There are also 3rd-party solutions for Spring, such as MyEclipse which includes scaffolding capability for Spring MVC.
Con Not as many resources to learn
Other languages and frameworks have countless tutorials, books, moocs, etc. Java and Play does not have nearly as much.
Con Backward incompatibility
The jump from Play 1 to Play 2.x caused a lot of confusion. While it is important to have some kind of evolution, sometimes it causes backward incompatibility which can create some problems. It makes tutorials or modules made for the old version obsolete. This can make it hard for beginners to find useful resources. The template engine which used Groovy now uses Scala.
Con Updating and code maintenance can be a grueling task if you are a beginner
Updating your project is manageable if you’re already familiar with the framework and the project itself, but if you’re just diving in it can be a little overwhelming and hard.
Con Bloated legacy DI API
Spring DI is bloated and rather complex in comparison to CDI.
Con Complex and not newbie friendly
Spring MVC architecture although simple has a lot of layers and abstractions which can be hard to debug if problems arise. It is also highly dependant on the Spring core.
It's an old and mature framework that has numerous amount of ways to extend and configure it – and this actually makes it fairly complex.
Con Lacking in UI development
While actually very good and with a very complete and rich feature set to develop and maintain code on the server side, it still doesn't provide any rich framework for building good user interfaces.
Con Unnecessarily slow, bloated, complex, convoluted, wordy, and verbose
Spring is convoluted and XML-ridden. Deploying things on the JVM has always been a pain in the nipple and nothing has changed much since the 90s. All things Java-related are wordy, verbose, and a waste of developer time.
Con Slow Prototyping
If you are looking to build a quick prototype fast and easy, Spring isn't going to help much. It's very large and quite hard to grasp if you are just beginning with it.