Chapter 1. Introduction

 

This chapter covers

  • Recognizing what Scalatra is good at
  • Writing a simple Hello World web application
  • Using microframeworks versus full-stack frameworks

Scalatra is a lightweight web framework written in the up-and-coming new language, Scala. It offers extremely fast development and execution speeds for HTTP applications.

If you’re a Java coder who’s curious about Scala or looking for a productivity gain, Scalatra offers a perfect opportunity: it’s easy to get started with, and if you’re already running your web apps in servlet containers, you can drop in a Scalatra application without any fuss. You can be up and running in a few minutes, building simple and intuitive HTTP interfaces to new or existing software.

On the other hand, maybe you’re a Perl, PHP, Python, or Ruby coder looking for a massive performance boost. Perhaps you’ve built a large system and want the refactoring benefits of type safety without Java boilerplate. Scalatra is the simplest way to jump into Scala web development. You get easy access to tens of thousands of battle-tested Java libraries with a simple and familiar HTTP routing DSL wrapped around them.

1.1. What’s Scalatra good at?

Scalatra can replace other web development frameworks for most tasks. This book will guide you through all the major aspects of building a web application, starting with an overview in chapter 2 and breaking down the details in chapters 3 through 11.

1.2. Hello World

1.3. Microframeworks vs. full-stack frameworks

1.4. How does Scalatra compare with other Scala web frameworks?

1.5. Installing Scalatra

1.6. Summary