Play 3.0.0 Release and Scala¶
| scala |
Thoughts¶
Play Team released on 2023-11-06 Play 2.9.0 and Play 3.0.0. This is very interesting event especially in relation to Lightbend is Changing the License for Akka.
I am more interested in Play 3.0.0 features:
Since late 2021, the project has undergone several major changes.
- The project is now entirely driven by the community, and fully committed to Open Source.
- The project transitioned from Lightbend Inc. to a core team of dedicated individuals.
- Play has decided to use Apache Pekko under the hood, instead of Akka.
Play 3.0 is nearly identical to Play 2.9, and continues to offer support for the latest Java LTS versions and Scala 3. Play 2.9 and 3.0 will offer the same features and receive parallel maintenance, benefiting from identical enhancements and bug fixes.
I guess this release might be valuable for some people. But, there are several major issues for me:
- Play framework was cool/interesting in 2017, but then I personally switched to Akka-http and it was must better for my needs. In my current company some projects have been using http4s or ZIO. Playframework is 90% legacy, means new projects will not use it and rather pick up Spring Boot Java/Kotlin, Ktor, than looking into Play.
- Scala 2 to Scala 3 migration is happening slowly.
- Scala 3 is a “new” language and it’s not clear for the business why they need to migrate to it instead of e.g. Kotlin.
- Even Lightbend decided to leave this “ship”.
- Play and Java is not even considered, there are much better frameworks for Java.
Rant¶
I had to use Playframework in the past because of project’s needs, but there are always some things I didn’t like:
- Dependency Injection (DI) via Guice. I prefer manual DI. And it doesn’t look natural to use the Java DI library with Scala, it is alien.
- Default Play application layout (see sample), that’s why I had to switch to “traditional” project layout. I can’t say it was difficult, but it was an additional step(s).
- Bloated dependency (e.g. template lib) when I need to build REST API only.
- CoffeeScript is added as default to Play.
- Template language is Scala.
What about Play1
?¶
Some people might not know that Play1 and Playframework (aka Play2) are two different frameworks.
Play1
is pure Java framework. It was/is very dynamic, fast development cycle, etc. Codeborne decided to fork it (see codeborne/replay) and make it even “better”. I checked and indeed, Codeborne’s fork is in active development.