Does scalatra use traversal around the scene?

Does scalatra use circumflex per scene (or vice versa)? What are the main differences between them and which one would you use?

Both frameworks are inspired by Sinatra and look the same at first glance.

Request routing with scalar:

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> } 

Example code in circumflex:

 class Main extends RequestRouter { get("/posts/:id") = "Post #" + uri("id") } } 
+6
rest scala scalatra
source share
1 answer

Ross A. Baker, one of the developers of Scalatra, recently commented on the difference between Circu, flex and Scalatra:

They look very similar in appearance, although I think everyone has their own strengths. Here are some of the differences that I see:

Templates: Scalatra integrates with Scalate, Circumflex integrates with Freemarker.

Routing: Circumflex has a nicer sugar for heading matching, but Scalatra allows you to agree to arbitrary booleans (i.e. the global flag for serving the site)

ORM: Circumflex has one Scalatra buckskin. I know Scalatra users using Squeryl, Querulous, Scala -Query, ORMBroker, and, yes, Circumflex-ORM. These integrations are trivial, and I will also assume trivial with the metacharacter.

Auth: Scalatra has an auth module in his last snapshot, Circumflex does not.

i18n: Circumflex has sugar for message bundles, ScalaTra does not.

Testing: Scalatra also includes a nice DSL for testing; I don't know about something like Circumflex.

+4
source share

All Articles