O'Reilly logo

Learning Play! Framework 2 by Andy Petrella

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Real time (advanced)

The Web has changed; HTML5 is almost there and is already implemented by all browsers. At least, the useful parts of it are available, especially the parts we'll use in this section.

It's now very familiar and it won't surprise you anymore, but Play! Framework 2 will again demonstrate that it is a real web framework by integrating things such as WebSocket or its old fallback, Comet .

Actually, Comet is not really a fallback for WebSocket since it's unidirectional while the latter is bidirectional. Nevertheless, there is another specification that does the same as Comet: Server-Sent Events (SSE). Even if an implementation of SSE is not (yet) provided by default, Play! 2's API will help us a lot in implementing it on our own ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required