Chat+twitter app with lift

Download Chat+twitter app with lift

Post on 15-May-2015

1.409 views

Category:

Technology

0 download

DESCRIPTION

Scala9 in

TRANSCRIPT

  • 1. Lift Twitter Scala 9 in

2. 3. Agenda Chat App demo Programs used Lift Dispatch Code reading Related Technologies OAuth Comet 4. Chat App demo Authentication (OAuth) Callback Chat (Comet) Known issues 5. This app uses Lift Web framework View first http://liftweb.net/ Databinder Dispatch Library for http and http services Written in Scala http://dispatch.databinder.net/About 6. Code reading Basics index.html & OAuthTest.scala Boot.scala TwitterCallback.scala Comet index.html & Chat.scala Model User.scala 7. OAuth Players Provider (Twitter) Consumer (app) User (human) Steps The owner of the app registers it on dev.twitter.com. The user approves the app to use his resource via API. The app gets an access token. The app uses the access token to use the API. http://www.atmarkit.co.jp/fsecurity/special/106oa uth/oauth02.html 8. Comet Traditional web apps (pull) Request & response Need real time? A typical approach is Ajax polling. Comet (push) Server sends data when its ready. How? Several approaches 9. Comet (cont.) Implementation models Streaming Long polling ( ) Server side Different challenges, approaches Out of scope of this presentation Wikipedia Comet Cyboze Labs 10. Comet (cont.) Implementation models Streaming Long polling ( ) Server side Different challenges, approaches Out of scope of this presentation Wikipedia Comet Cyboze Labs