What’s new in Play 2.4
playframework.com
playframework.com
As someone who's used Play heavily for the past couple of years, I'm very excited by this release, which is Play's best yet.
I always thought Play looked incredible, but the focus on Scala puts me off. Every time I tried it, Java seemed like a second-class citizen in the Play world. I don't have anything against Scala, I'm just not really interested in learning it, especially if I all I want to do is use a web framework.
EDIT: never used the Java side myself, though. EDIT2: here is a nice comment on Java vs Scala: https://groups.google.com/forum/?nomobile=true#!searchin/pla...
It works fine. The only annoying thing is the asynchrone nature forces you to have abstract classes everywhere, but with Java 8 it's no longer a problem.
Could you elaborate?
Akka uses callbacks to handle asynchronous behaviours, which means you need closures, and in Java <8, that means anonymous classes littering your code, which is a real PITA.
I'm not entirely sure why Play has a reputation of being for Scala except that there are fewer web frameworks for Scala than Java, so Play is more popular among Scala developers. I think the other thing that confuses newcomers is that the templates are Twirl templates. They should probably have an extension like .twirl but unfortunately use the extension .scala.html even though you're really not writing Scala at all. You're writing Twirl which is it's own thing and doesn't take more than a few minutes to pick up. (The reason for the .scala.html is that templates get compiled to Scala, but you really don't have to know or care about that)
Which parts are out-of-date?
> and bundled ORM
Didn't they just go the other way, de-bundling all persistence APIs/libs?
What's wrong with just picking the one that's right for your use-case and using just that?
I really find Play 2 to be an enormous improvement over Play 1 though. As just one example, deploying your app is so much easier in Play 2. Play 1 expected you to install the framework on your production machines. Play 2 has built-in support for building deb/rpm packages, docker containers, zip archives, etc. which makes deploying so much easier.
Both Play and DropWizard seem to have the same goal, Play being more integrated and scalable, DropWizard more respectful of existing Java frameworks.
Anyone else had the same feeling here ? I came to the conclusion that play should advocate the use of java as the preferred language if they want to grow their user base even more.
1 - https://github.com/codingwell/scala-guice 2 - https://github.com/mohiva/play-silhouette-seed 3 - https://github.com/mohiva/play-silhouette-seed/blob/master/a... 4 - https://github.com/mohiva/play-silhouette-seed/blob/master/a...