Scala for the web Lightning Talk
Upcoming SlideShare
Loading in...5
×
 

Scala for the web Lightning Talk

on

  • 8,423 views

Nathan Hamblen gives a lightning talk about Scala

Nathan Hamblen gives a lightning talk about Scala

Statistics

Views

Total Views
8,423
Views on SlideShare
970
Embed Views
7,453

Actions

Likes
0
Downloads
0
Comments
0

12 Embeds 7,453

http://tech.gilt.com 7194
http://rockitup.tumblr.com 217
http://bester-flachbildfernseher-2012.tumblr.com 11
http://canon-powershot-sx210-is-prezzi.tumblr.com 7
http://www.yatedo.com 5
http://www.tumblr.com 5
http://translate.googleusercontent.com 5
http://samsung-clx-3175n-toner.tumblr.com 3
http://webcache.googleusercontent.com 2
http://bauknecht-kge-335-bio.tumblr.com 2
http://74.6.147.41 1
http://gaming-headset-2012.tumblr.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Scala for the web Lightning Talk Scala for the web Lightning Talk Document Transcript

    • Scala for the WebWill it blend?def ol(items: Seq[String]) = <ol> { items.map { s => <li> { s } </li> } } </ol>Scala is hybrid.λ+☃=?LiftAjax.scala// create an ajax select boxdef doSelect(msg: NodeSeq) = ajaxSelect((1 to 50).toList.map { i => (i.toString, i.toString) }, Full(1.toString), { v => DisplayMessage(msgName, bind("sel", msg, "number" -> Text(v)), 5 seconds, 1 second) })// bind the view to the functionalitybind("select" -> doSelect _, ...ajax.html
    • <ajax:select> You selected <sel:number></sel:number> From the select box.</ajax:select>Scalate • Mustache • Scaml • Jade • SSPXML literals.Seriously.val myDiv = <div>Yo</div>Scalatraclass MyScalatraFilter extends ScalatraFilter { get("/") { <html> <body> <h1>Hello, world!</h1> </body> </html> }}def ol(items: Seq[String]) = <ol> { items.map { s => <li> { s } </li> } } </ol>Unfilteredimport unfiltered.request._import unfiltered.response._val echo = unfiltered.filter.Planify {
    • case Path(Seg(p :: Nil)) => ResponseString(p)}unfiltered.jetty.Http.anylocal.filter(echo).run()object Stream extends unfiltered.netty.async.Planwith ServerErrorResponse { val ChunkedMp3 = unfiltered.response.Connection(HttpHeaders.Values.CLOSE) ~> TransferEncoding(HttpHeaders.Values.CHUNKED) ~> ContentType("audio/mp3") val listeners = new DefaultChannelGroup def intent = { case req => val initial = req.underlying.defaultResponse(ChunkedMp3) val ch = req.underlying.event.getChannel ch.write(initial).addListener { () => listeners.add(ch) } } ...Scala for the WebYes, it blends!http://meetup.com/ny-scala