Any possible benefits to the developer disappear in the face of a huge increase in complexity.
Let's take the Play 1 vs Play 2 example:
How many times I got a 500 pages in the face due to a basic NullPointerException in Play 1 groovy templates...
In new play 2 templates, because they are type-safe, they guarantee that you will not have those basic errors.
Of-course, it doesn't guarantee everything, but it's way less error-prone. You actually CANNOT make this kind of NPE errors with type-safe scala code.
where in java you do something like:
user.address.town // oops I forgot to test if user.address is not null
in scala:
// user.address.town wouldn't work, because address is represented as an Option[Address]
user.address.map(_.town).getOrElse("")
It just seems that for the rest of the system there isn't any real benefit over Play1 if you are using Java as opposed to Scala.
There was a long email thread on the play framework, but as someone who is doing Play 2/Scala, they're nothing even close to the same framework, enough that calling it the same name is silly. Further, the deprecation of Play 1 does no favors, and I'm just hoping that as things go forward, a fork will emerge.
I'm also hoping that Play 2 will stop taking so ing long to compile longer projects. Is 2.1 going to make me not want to claw my eyes out?
Nice work on the new Json API, though.
(For Java, that is)
- non-blocking IO with the powerful iteratee concepts (a nice approach to play with streams (EventSource/WebSockets/*) which is not only an event-based approach like in NodeJS, but more a "reactive" approach)
- functional approach of things with Scala
- everything is much more type-safe (especially templates) which make apps stronger (not prone to simple error like NPE in templates) but also faster (templates are compiled)
It does seem that real time data management is a good use case for Play2 but curious to know for typical web apps what benefits there would be.
This benchmark is based on Play 1 but you can see Japid is 4 - 5 times faster than the Scala template
Is there anything Play 2 Java can do that Play 1 Java + Japid template cannot do as well?
Seems like the move to Play 2 and Scala is more political than technical. The Play people formed an alliance with Typesafe, a Scala company, and thus decided to move away from Java and focus on Scala, abandoning their huge Java user base of Play 1.
This is a technical decision to build a web framework to the JVM. And even if the core is written in Scala, it doesn't mean you can't use it in Java. Give a try!