Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Reactive REST on Play2 & ReactiveMongo

Reactive REST on Play2 & ReactiveMongo

A quick tutorial focused on building a quick Reactive application with Play2 Framework that features a REST API backed by the asynchronous ReactiveMongo driver. Tutorial and sources available at https://github.com/47deg/bbcdzREST

Ad2476bf0540dfaa0fc30cb62c8e07da?s=128

Raúl Raja Martínez

September 18, 2013
Tweet

Transcript

  1. REST Services with Play2 Scala & ReactiveMongo

  2. Who am I? @raulraja 47deg.com raulraja.com Scala, Java, Objective-C

  3. MAIN TOOLS TO BUILD THIS APP

  4. App frameworks are like hipsters, always looking for the next

    cool thing. There is a new kid on the block... REACTIVE APPS Only one thing is better than reactive apps. Monkey beard JORGE!
  5. Let’s get started

  6. Create the APP

  7. Run it!

  8. None
  9. Play uses conf/routes to map http requests to controller actions

  10. Play projects are SBT projects, here we add the dependencies

  11. Play plugins are registered in conf/play.plugins

  12. In conf/application.conf we add things like DB settings

  13. In DEV mode you can see the configured routes on

    a bogus URL
  14. Controllers implement the actions

  15. Let’s build it! If you did not attend the session

    a full tutorial is here https://github.com/47deg/bbcdzREST
  16. Become a Scala Master For comprehensions Case Classes Futures Options

    Traits Either Pattern Matching Monads Actors DSL’s ...