views:

91

answers:

1

Does scalatra use circumflex behind the scenes (or vise versa)? What are the key differences between them, and which one would you use?

Both frameworks are inspired by Sinatra and from a glance look identical.

Request routing with scalatra:

class ScalatraExample extends ScalatraServlet {

get("/date/:year/:month/:day") {
  <ul>
    <li>Year: {params("year")}</li>
    <li>Month: {params("month")}</li>
    <li>Day: {params("day")}</li>
  </ul>
}

Sample code in circumflex:

class Main extends RequestRouter {

get("/posts/:id") = "Post #" + uri("id")

}
}