git » homepage.git » master » tree

[master] / archive / open-source / evidence-pages / raw / scalatra-home.html

<!DOCTYPE html>

<html lang="en">
	<head>
	<meta name="generator" content="Hugo 0.31.1" />
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="alternate" href="https://scalatra.org/index.xml" type="application/rss+xml" title="Scalatra">
		<link rel="icon" href="https://scalatra.org/favicon.ico">
		<title>Scalatra</title>
		
		<link rel="stylesheet" href="https://scalatra.org/css/highlight/github.css">
		<link rel="stylesheet" href="https://scalatra.org/css/bootstrap.min.css">
		<link rel="stylesheet" href="https://scalatra.org/css/bootstrap-theme.min.css">
		<link rel="stylesheet" href="https://scalatra.org/css/theme.css">
		<link rel="stylesheet" href="https://scalatra.org/css/bootie-docs.css">
		<link rel="stylesheet" href="https://scalatra.org/css/site.css">
	</head>

<body role="document">

	
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="https://scalatra.org/"><img src="https://scalatra.org/images/logo-s.png" alt="logo"></a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">
				<ul class="nav navbar-nav">
                    
			
			
				
					<li ><a href="https://scalatra.org/getting-started/">Getting started</a></li>
				
					<li ><a href="https://scalatra.org/news.html">News</a></li>
				
					<li ><a href="https://scalatra.org/guides/">Documentation</a></li>
				
					<li ><a href="https://scalatra.org/community/">Community</a></li>
				
			
                
				</ul>
				
			</div>
		</div>
	</nav>

<div class="container">


<main role="main">

<div class="row container">
	<div class="col-md-4">
    <img src="images/logo-x.png" class="img-rounded">
  </div>
  <div class="col-md-6">
    <p>Scalatra is a simple, accessible and free web micro-framework.</p>
    <p> It combines the power of the JVM with the beauty and brevity of Scala,
        helping you quickly build high-performance web sites and APIs.</p>
  </div>
</div>

<div class="row">
  <div class="col-md-3">
    <h2>Ready</h2>
    <p><img src="https://scalatra.org/images/glyphicons/glyphicons_339_rabbit.png"> Get
      set up in <a href="getting-started/installation.html">2 easy steps</a>
      with our quick installation guide. There's a good chance that you already
      have most of the software you need.</p>
    <p><a href="getting-started/" class="btn btn-primary">Get started »</a></p>
  </div>
  <div class="col-md-3">
    <h2>Steady</h2>
    <p><img src="https://scalatra.org/images/glyphicons/glyphicons_064_lightbulb.png"> We've
      documented the main aspects of Scalatra development in a handy set of
      <a href="guides">reference guides</a>, to help you become productive
      quickly.</p>
    <p><a href="guides/" class="btn btn-primary">View the guides »</a></p>
  </div>
  <div class="col-md-3">
    <h2>Code</h2>
    <p><img src="https://scalatra.org/images/glyphicons/glyphicons_043_group.png"> We have a
      very active community, and an enthusiastic group of
      developers working on the next version.</p>
    <p><a href="community/" class="btn btn-primary">Get involved »</a></p>
  </div>
  <div class="col-md-3">
    <h3>Project news</h3>
    <ul>
			
			<li>
			  <a href="https://scalatra.org/2024/06/08/2024-06-08-scalatra-3-1-0-released.html.html">Scalatra 3.1.0 is out</a><br>
				<span class="doc-entry-meta in-list"><time datetime="2024-06-08">June 08, 2024</time></span>
			</li>
			
			<li>
			  <a href="https://scalatra.org/2023/09/30/2023-09-30-scalatra-3-0-0-released.html.html">Scalatra 3.0.0 is out</a><br>
				<span class="doc-entry-meta in-list"><time datetime="2023-09-30">September 30, 2023</time></span>
			</li>
			
			<li>
			  <a href="https://scalatra.org/2021/09/25/2021-09-25-scalatra-2-8-1-released.html.html">Scalatra 2.8.1 is out</a><br>
				<span class="doc-entry-meta in-list"><time datetime="2021-09-25">September 25, 2021</time></span>
			</li>
			
			<li>
			  <a href="https://scalatra.org/2020/03/01/2020-03-01-scalatra-2-7-0-released.html.html">Scalatra 2.7.0 is out</a><br>
				<span class="doc-entry-meta in-list"><time datetime="2020-03-01">March 01, 2020</time></span>
			</li>
			
			<li>
			  <a href="https://scalatra.org/2019/02/15/2019-02-15-scalatra-2-6-5-released.html.html">Scalatra 2.6.5 is out</a><br>
				<span class="doc-entry-meta in-list"><time datetime="2019-02-15">February 15, 2019</time></span>
			</li>
			
    </ul>
  </div>
</div>

<div class="row">
  <div class="col-md-7">
    <h3>Why would you want to use Scalatra?</h3>
    <ul>
    <li>It&#39;s been proven in production - the <a href="http://bbc.co.uk">BBC</a>, the <a href="http://www.guardian.co.uk">Guardian newspaper</a>, <a href="http://box.com">Box.com</a>, <a href="http://www.netflix.com">Netflix</a>, and <a href="http://www.mclaren.com/appliedtechnologies/">McLaren</a> all rely on it.</li>
    <li>It can help you quickly build high-performance, scalable HTTP APIs for web
    and mobile applications.</li>
    <li>It&#39;s a perfect server-side counterpart to in-browser client development
    frameworks such as <a href="http://backbonejs.org/">backbone.js</a>,
    <a href="http://emberjs.com">ember.js</a> or <a href="http://angularjs.org">angular.js</a>.</li>
    <li>It&#39;s a simple, fun, and practical way to learn
    <a href="http://www.scala-lang.org">Scala</a>, a new programming language with advanced
    features.</li>
    <li>It will help you use all available cores of that new 16-core server. It
    also gives you easy access to Scala&#39;s new concurrency-management constructs:
    <a href="http://akka.io">Akka Actors</a>.</li>
    </ul>
  </div>
    <div class="col-md-5 well">
      <h4>We've got a book!</h4>
      <div class="row">
        <div class="col-md-5">
          <a href="http://www.manning.com/carrero2/">
            <img src="https://scalatra.org/images/book-cover.png">
          </a>
        </div>
        <div class="col-md-7">
          <p>Order <a href="http://www.manning.com/carrero2/">Scalatra in Action</a> as part of the Manning Early Access Program (MEAP).</p>
          <p>Written by members of the Scalatra team, the book walks you through the entire framework, from first steps to servlet deployment. </p>
        </div>
      </div>
    </div>

</div>

<h3>Start small</h3>

<p>You will need to <a href="getting-started/installation.html">install a few things</a>
before you can get started, but first, here&#39;s a Scalatra app:</p>

<div class="highlight"><pre><code class="scala"><span class="k">package</span> <span class="nn">com.example.app</span>
<span class="k">import</span> <span class="nn">org.scalatra._</span>

<span class="k">class</span> <span class="nc">HelloWorldApp</span> <span class="k">extends</span> <span class="nc">ScalatraFilter</span> <span class="o">{</span>
  <span class="n">get</span><span class="o">(</span><span class="s">&quot;/&quot;</span><span class="o">)</span> <span class="o">{</span>
    <span class="o">&lt;</span><span class="n">h1</span><span class="o">&gt;</span><span class="nc">Hello</span><span class="o">,</span> <span class="o">{</span><span class="n">params</span><span class="o">(</span><span class="s">&quot;name&quot;</span><span class="o">)}&lt;/</span><span class="n">h1</span><span class="o">&gt;</span>
  <span class="o">}</span>
<span class="o">}</span>
</code></pre>
</div>

<p>Notice a few things about it:</p>

<ul>
<li>It&#39;s small - a full web application in 7 lines of code.</li>
<li>It uses a <a href="http://sinatrarb.com">Sinatra</a>-style DSL.</li>
<li>It defines a single method, an HTTP GET to the path &quot;/&quot;.</li>
<li>It renders a response, in this case the text <em>Hello world!</em></li>
</ul>

<p>This is the essence of Scalatra - a simple, easy to understand way to make
web systems, which embraces HTTP&#39;s stateless nature. You can build anything
you want with Scalatra, but one of the things it&#39;s been most successful at
is the construction of RESTful APIs.</p>

<h3 id="toc_25">Scale up and customize</h3>

<p>Scalatra is a micro-framework, so you start small and build upwards.</p>

<p>You can easily add exactly the libraries you want - for data models, templating,
unit and integration testing, async request handling, or server-push.</p>

<p>We can&#39;t predict what you&#39;ll want to build, or how you&#39;ll want to build it.
Instead of prescribing a set of libraries for you to use, and building the
framework around that, we let <em>you</em> choose.</p>

<h3>Versions</h3>

<table class="table table-striped table-bordered">
  <thead>
    <tr>
      <th>Scalatra Version</th>
      <th>Status</th>
      <th>Source</th>
      <th>Scala versions</th>
      <th>Servlet</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>3.2.0</td>
      <td>Stable</td>
      <td><a href="http://github.com/scalatra/scalatra/tree/v3.2.0">3.2.0</td>
      <td>
        <ul class="scala-versions">
          <li>2.13.x</li>
          <li>3.3.x</li>
        </ul>
      </td>
      <td>4.0.1 / 6.1.0</td>
    </tr>
    <tr>
      <td>3.1.2</td>
      <td>Stable</td>
      <td><a href="http://github.com/scalatra/scalatra/tree/v3.1.2">3.1.2</td>
      <td>
        <ul class="scala-versions">
          <li>2.12.x</li>
          <li>2.13.x</li>
          <li>3.3.x</li>
        </ul>
      </td>
      <td>4.0.1 / 6.0.0</td>
    </tr>
    <tr>
      <td>3.0.0</td>
      <td>Stable</td>
      <td><a href="http://github.com/scalatra/scalatra/tree/v3.0.0">3.0.0</td>
      <td>
        <ul class="scala-versions">
          <li>2.12.x</li>
          <li>2.13.x</li>
          <li>3.3.x</li>
        </ul>
      </td>
      <td>4.0.1 / 5.0.0</td>
    </tr>
    <tr>
      <td>2.8.4</td>
      <td>Stable</td>
      <td><a href="http://github.com/scalatra/scalatra/tree/v2.8.4">2.8.4</td>
      <td>
        <ul class="scala-versions">
          <li>2.12.x</li>
          <li>2.13.x</li>
        </ul>
      </td>
      <td>3.1</td>
    </tr>
    <tr>
      <td>2.7.1</td>
      <td>Stable</td>
      <td><a href="http://github.com/scalatra/scalatra/tree/v2.7.1">2.7.1</td>
      <td>
        <ul class="scala-versions">
          <li>2.11.x</li>
          <li>2.12.x</li>
          <li>2.13.x</li>
        </ul>
      </td>
      <td>3.1</td>
    </tr>
    <tr>
      <td>2.6.5</td>
      <td>Stable</td>
      <td><a href="http://github.com/scalatra/scalatra/tree/v2.6.5">2.6.5</td>
      <td>
        <ul class="scala-versions">
          <li>2.11.x</li>
          <li>2.12.x</li>
        </ul>
      </td>
      <td>3.1</td>
    </tr>
    <tr>
      <td>2.5.4</td>
      <td>Stable</td>
      <td><a href="https://github.com/scalatra/scalatra/tree/v2.5.4">2.5.4</td>
      <td>
        <ul class="scala-versions">
          <li>2.11.x</li>
          <li>2.12.x</li>
        </ul>
      </td>
      <td>3.1</td>
    </tr>
    <tr>
      <td>2.4.1</td>
      <td>Stable</td>
      <td><a href="https://github.com/scalatra/scalatra/tree/v2.4.1">2.4.1</td>
      <td>
        <ul class="scala-versions">
          <li>2.10.x</li>
          <li>2.11.x</li>
        </ul>
      </td>
      <td>3.1</td>
    </tr>
    <tr>
      <td>2.3.2</td>
      <td>Stable</td>
      <td><a href="https://github.com/scalatra/scalatra/tree/v2.3.2">2.3.2</td>
      <td>
        <ul class="scala-versions">
          <li>2.10.x</li>
          <li>2.11.x</li>
        </ul>
      </td>
      <td>3.1</td>
    </tr>
    
  </tbody>
</table>

</main>




</div> 

<footer class="doc-footer">
	
	<p>Scalatra Team</p>
	<p>Powered by <strong><a href="https://github.com/progrhyme/hugo-theme-bootie-docs">Bootie Docs</a></strong> - theme
		for <a href="http://gohugo.io/">Hugo</a> by <a href="https://github.com/progrhyme/">progrhyme</a>.</p>
</footer>



<script src="https://scalatra.org/js/jquery.min.js"></script>
<script src="https://scalatra.org/js/bootstrap.min.js"></script>

<script src="https://scalatra.org/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="https://scalatra.org/js/ie10-viewport-bug-workaround.js"></script>
<script src="https://scalatra.org/js/bootie-docs.js"></script>

</body>
</html>