Live data from Hacker News

What’s new in Play 2.2

playframework.com

1–10 of 44 posts

Re: What’s new in Play 2.2

#2
We're using Play pretty heavily at our startup though not for our customer-facing frontend, that's still in Rails.

What we love about Play:

* Async everything, especially the web service library

* JSON macros

* Scala-based templates

* Integration with Akka

* Support for server-sent events (we use this for cluster monitoring)

What we wish was better:

* JSON deserialization performance isn't as good as raw Jackson yet. (Our PR regarding this is actually in 2.2, should be better now)

* Documentation could be much better, we still have to resort to the API to figure out a lot of stuff

I've been using Play ever since the 2.0-RC days and it's definitely made some huge gains since then. We use Akka very heavily, especially its clustering, and Play works well in conjunction with that though there are still some gotchas lurking about.

Our backend is one big Akka cluster right now. We've had a few hiccups but overall it's been a hugely enjoyable experience.

Re: What’s new in Play 2.2

#3
For those that have some experience using Play with both Java and Scala, which Play variant do you enjoy working with the most? It sounds like there are some API difference between the Java and Scala versions and I'm curious whether those differences are a factor in deciding whether to go Java or Scala with Play. I'm a long time Java developer, envious of Ruby, interested in Scala for its potential in being a hybrid of the two.

Re: What’s new in Play 2.2

#4
post #3

For those that have some experience using Play with both Java and Scala, which Play variant do you enjoy working with the most? It sounds like there are some API difference between the Java and Scala versions and I'm curious whether those differences are a factor in deciding whether to go Java or Scala with Play. I'm a long time Java developer, envious of Ruby, interested in Scala for its potential in being a hybrid…

With Play 2.0 in Java, there's more verbosity (though nothing like any J2EE framework) in using Java and lack of syntactical sugar features as well as functional programming features (which are widely used in parts like JSON for Play). Also, you don't get the benefits of such things as optional parameters in Java.

Don't get me wrong, the Java version of it is going to be better than any other Java web framework you ever encountered most likely (especially if everything else one tried was based in part on J2EE/JSP since Play has none of those and no XML bs config). However, you do lose some of the Scala niceties when going that route. You still can still call to Scala bits of the API in Java and templates themselves are all Scala (Lift templates), but it's still not quite the same.

If using something like Intellij, you can still mix and match bits of Scala and Java in the same project (but not within the same class file) without too much trouble. Not sure how the official Scala IDE that TypeSafe maintains handles that offhand.

Re: What’s new in Play 2.2

#5
post #2

We're using Play pretty heavily at our startup though not for our customer-facing frontend, that's still in Rails. What we love about Play: * Async everything, especially the web service library * JSON macros * Scala-based templates * Integration with Akka * Support for server-sent events (we use this for cluster monitoring) What we wish was better: * JSON deserialization performance isn't as good as raw Jackson yet.…

Why use a Rails / Play hybrid? I can understand separating the front- and back-ends, but why not stick to one platform through and through? Momentum? Expertise? Marketing?

Re: What’s new in Play 2.2

#6
post #2

We're using Play pretty heavily at our startup though not for our customer-facing frontend, that's still in Rails. What we love about Play: * Async everything, especially the web service library * JSON macros * Scala-based templates * Integration with Akka * Support for server-sent events (we use this for cluster monitoring) What we wish was better: * JSON deserialization performance isn't as good as raw Jackson yet.…

Sorry if I'm being dumb here, I've never heard of Play before. It is a replacement for Tomcat?

Re: What’s new in Play 2.2

#7
post #4
post #3

For those that have some experience using Play with both Java and Scala, which Play variant do you enjoy working with the most? It sounds like there are some API difference between the Java and Scala versions and I'm curious whether those differences are a factor in deciding whether to go Java or Scala with Play. I'm a long time Java developer, envious of Ruby, interested in Scala for its potential in being a hybrid…

With Play 2.0 in Java, there's more verbosity (though nothing like any J2EE framework) in using Java and lack of syntactical sugar features as well as functional programming features (which are widely used in parts like JSON for Play). Also, you don't get the benefits of such things as optional parameters in Java. Don't get me wrong, the Java version of it is going to be better than any other Java web framework you e…

Awesome, thanks for the info!

Re: What’s new in Play 2.2

#8
post #2

We're using Play pretty heavily at our startup though not for our customer-facing frontend, that's still in Rails. What we love about Play: * Async everything, especially the web service library * JSON macros * Scala-based templates * Integration with Akka * Support for server-sent events (we use this for cluster monitoring) What we wish was better: * JSON deserialization performance isn't as good as raw Jackson yet.…

Sorry if I'm being dumb here, I've never heard of Play before. It is a replacement for Tomcat?

Play is a web development framework. It has the capability to run standalone using it's built in http server or it can output a .WAR file that can be run under containers like Tomcat.

http://www.playframework.com/documentation/1.2/deployment

Re: What’s new in Play 2.2

#9
post #7
post #4

Earlier quoted context omitted.

With Play 2.0 in Java, there's more verbosity (though nothing like any J2EE framework) in using Java and lack of syntactical sugar features as well as functional programming features (which are widely used in parts like JSON for Play). Also, you don't get the benefits of such things as optional parameters in Java. Don't get me wrong, the Java version of it is going to be better than any other Java web framework you e…

Awesome, thanks for the info!

No problem. I was stuck to mostly using the Java side of it for a project that Java was the requirement. It was a university requirement, as I could not convince my group into experimenting with Scala for the entire project. They were mostly worried they would not learn it fast enough to have us finish the project on time and I agreed, since it was a valid concern.

I was worried how it would fair after trying Play 2.0 in Scala previously for my own work. However, it was not anywhere as bad as I thought, but I was a bit envious of not being able to use some of the features of the Scala side I had used previously.

Re: What’s new in Play 2.2

#10
post #4
post #3

For those that have some experience using Play with both Java and Scala, which Play variant do you enjoy working with the most? It sounds like there are some API difference between the Java and Scala versions and I'm curious whether those differences are a factor in deciding whether to go Java or Scala with Play. I'm a long time Java developer, envious of Ruby, interested in Scala for its potential in being a hybrid…

With Play 2.0 in Java, there's more verbosity (though nothing like any J2EE framework) in using Java and lack of syntactical sugar features as well as functional programming features (which are widely used in parts like JSON for Play). Also, you don't get the benefits of such things as optional parameters in Java. Don't get me wrong, the Java version of it is going to be better than any other Java web framework you e…

Excellent summary. A lot of the API's are definitely built scala-first, then adapted for Java. Usually this isn't too bad, but it can cause some headaches around things like the logger interfaces, etc.

We run a fairly complex java system in the same process as play (similar to an in-process database) for performance reasons, so given the amount of code already in java and not having the time to learn scala, java interop, AND build in the web bindings, we went the Java route.

It's definitely easier to use than something like Spring if you're approaching both for the first time.

Post reply on HN