O'Reilly logo

Play Framework Cookbook by Alexander Reelsen

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

Managing different output formats

In the preceding examples another API was consumed. When your application gets more users, the demand to get data out of your application will not only rise in web pages. As soon as machine-to-machine communication is needed, you will need to provide an API yourself.

This recipe will show you how to implement your own APIs using the Play framework. If you need an API that exposes your data in as many data formats as possible, you might not be right with selecting the Play framework. Currently, it is not that generic. You might want to go with enunciate for example, which is reachable at http://enunciate.codehaus.org/

Find the accompanying source example at examples/chapter4/mashup-api.

Getting ready

There is some ...

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