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

Raúl Raja Martínez

September 18, 2013
Tweet

More Decks by Raúl Raja Martínez

Other Decks in Programming

Transcript

  1. REST Services with
    Play2 Scala & ReactiveMongo

    View Slide

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

    View Slide

  3. MAIN TOOLS TO BUILD THIS APP

    View Slide

  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!

    View Slide

  5. Let’s get started

    View Slide

  6. Create the APP

    View Slide

  7. Run it!

    View Slide

  8. View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  14. Controllers implement the actions

    View Slide

  15. Let’s build it!
    If you did not attend the session a full tutorial is here
    https://github.com/47deg/bbcdzREST

    View Slide

  16. Become a Scala Master
    For comprehensions
    Case Classes
    Futures
    Options
    Traits
    Either
    Pattern Matching
    Monads
    Actors
    DSL’s
    ...

    View Slide