Adventures in Play 2.0 with Scala, Salat, and Casbah


How to get play-salat and play-cashbah working in the Play 2.0 Scala web framework

Scala? It's object-oriented. It's functional. It's complex. It's fun.
Scala has anonymous functions, type inference, list comprehensions, lazy initialization, excellent pattern matching, case classes, delimited continuations, higher-order types, and complexity that exceeds 10.

What is that stuff after the mapping binder? The apply and unapply functions of the Post model are curried with the form mapping. Also check out the views.html.helper package in the Play 2.0 API.

Controller: controllers/Posts.scala
View: views/posts.scala.html

Model: models/Post.scala
Context (from play-salat): models/mongoContext.scala

Look at me im wearing a feathered hat and tight pants (typical Scala user)


Complexity exceeds 10

No comments:

Post a Comment