Reactive REST on Play2 & ReactiveMongo
-
Upload
raulraja -
Category
Technology
-
view
1.517 -
download
2
description
Transcript of Reactive REST on Play2 & ReactiveMongo
![Page 1: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/1.jpg)
REST Services with Play2 Scala & ReactiveMongo
![Page 2: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/2.jpg)
Who am [email protected], Java, Objective-C
![Page 3: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/3.jpg)
MAIN TOOLS TO BUILD THIS APP
![Page 4: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/4.jpg)
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!
![Page 5: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/5.jpg)
Let’s get started
![Page 6: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/6.jpg)
Create the APP
![Page 7: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/7.jpg)
Run it!
![Page 8: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/8.jpg)
![Page 9: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/9.jpg)
Play uses conf/routes to map http requests to controller actions
![Page 10: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/10.jpg)
Play projects are SBT projects, here we add the dependencies
![Page 11: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/11.jpg)
Play plugins are registered in conf/play.plugins
![Page 12: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/12.jpg)
In conf/application.conf we add things like DB settings
![Page 13: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/13.jpg)
In DEV mode you can see the configured routes on a bogus URL
![Page 14: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/14.jpg)
Controllers implement the actions
![Page 15: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/15.jpg)
Let’s build it!
If you did not attend the session a full tutorial is here
https://github.com/47deg/bbcdzREST
![Page 16: Reactive REST on Play2 & ReactiveMongo](https://reader034.fdocuments.in/reader034/viewer/2022051514/5484fdc8b4af9faa0d8b4ce9/html5/thumbnails/16.jpg)
Become a Scala Master
For comprehensionsCase Classes
FuturesOptionsTraitsEither
Pattern MatchingMonadsActorsDSL’s
...