Scalatra

{{Use dmy dates|date=June 2023}}

{{Infobox software

| name = Scalatra

| logo = Scalatra Logo.png

| screenshot =

| caption =

| author = {{URL|https://github.com/scalatra/scalatra/blob/develop/CREDITS.md|Scalatra contributors}}

| released = {{start date|2009|04|11}}

| latest release version = 2.8.1

| latest release date = {{start date and age|2021|09|25}}{{Cite web |url=https://scalatra.org/2021/09/25/2021-09-25-scalatra-2-8-1-released.html |title=Scalatra 2.8.1 is out |access-date=28 October 2021}}

| latest preview version =

| latest preview date =

| repo = {{URL|https://github.com/scalatra/scalatra|Scalatra Repository}}

| operating system = Cross-platform

| platform =

| language = Scala

| genre = Web application framework

| license = BSD

| website = {{URL|scalatra.org}}

}}

Scalatra is a free and open source web application framework written in Scala.{{Cite web |url=http://www.infoq.com/news/2010/10/scalatra|author=Synodinos, Dionysios G.|title=Scalatra: A Sinatra-like Web Framework for Scala|date=2010-10-07|publisher=InfoQ }} It is a port of the Sinatra framework written in Ruby. Scalatra is an alternative to the Lift, Play!, and Unfiltered frameworks.

Scalatra is an example of a microframework, a web software development framework which attempts to be as minimal as possible.

A full Scalatra application can be written in very few lines of code:

package org.example.app

import org.scalatra._

class MyScalatraFilter extends ScalatraFilter {

get("/hello/:name") {

Hello, {params("name")}

}

}

From this tiny domain-specific language, Scalatra can be expanded into a minimal but full-featured model-view-controller web framework. For example, additional libraries can be attached in order to provide templating, object-relational mapping, and unit testing or behaviour driven development support.

Software built with Scalatra

  • LinkedIn used Scalatra to power its now-defunct{{cite web |url=http://help.linkedin.com/app/answers/detail/a_id/5028 |title=LinkedIn Signal - No Longer Supported |date= 2013-08-22}} Signal API.{{cite web |url=http://www.infoq.com/articles/linkedin-scala-jruby-voldemort |author=Synodinos, Dionysios G. |title=LinkedIn Signal: A Case Study for Scala, JRuby and Voldemort |date=2010-10-11 |publisher=InfoQ }}
  • Parts of The Guardian's API services are built in Scalatra.{{cite web |url=https://github.com/guardian/scalatra-openid-consumer |title=Github Scalatra OpenID Consumer code|website=GitHub |date=9 May 2022 }}
  • http://gov.uk has built its API systems using Scalatra.{{cite web |url=http://radar.oreilly.com/2012/01/with-govuk-british-government.html |title=With GOV.UK, British government redefines the online government platform | date=2012-01-31 |publisher=O'Reilly |access-date=13 March 2012}}

References