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

Using the MongoDB module

MongoDB is one of the many rising stars on the NoSQL horizon. MongoDB outperforms other databases in development speed once you get used to thinking in data structures again instead of somewhat more or less arbitrary split rows. If you do not use MongoDB, this recipe will not help you at all.

You can find the source code of this example in the chapter3/booking-mongodb directory.

Getting ready

As there is already a wonderful and well known booking application, which is also used in many other frameworks (Seam, Spring, ZK) as an example, we will take it in this example and convert it to use MongoDB as its persistence backend. So, in order to get ready, copy it from the samples-and-tests/booking directory of your Play installation ...

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