Scalatra is a lightweight Scala-driven web framework similar to the popular Ruby-based Sinatra. It’s perfect for writing high-performance stateless applications that take advantage of RESTful APIs. Scalatra uses a simple DSL to capture your entire application in a single class. As a result, it’s an amazingly-fast way to spin up a Scala-based web app or to build an HTTP API for a mobile, Backbone.js, or angular.js app. And since it uses Scala and the functional programming model, it’s perfect for realtime applications.
Scalatra in Action introduces Scalatra and the Sinatra model. It covers the framework in its entirety, starting with concepts such as request routing, input handling, actions, and HTTP responses. It then proceeds to more advanced topics, such as data access, handling heavy load, asynchronicity, securing your application, designing and documenting RESTful APIs, and realtime web programming.
What’s Inside
- Everything you need to use the Scalatra web framework
- Design powerful web applications and RESTful APIs with easy and readable code
- Integrate with libraries that supplement Scalatra
- Make clean templates using Scalate
- Write tests using specs2
For readers who don’t already know Scala, the book introduces the basic tools: the Scala language and SBT, the Simple Build Tool. The book also shows you how to test and deploy your Scalatra applications. Readers should be familiar with the basics of HTTP, REST and web applications. No prior experience with Scalatra, Sinatra, or Scala is required.

