O'Reilly logo

Scalatra in Action by Stefan Ollinger Dave Hrycyszyn Ross A. Baker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Server-side templating

This chapter covers

  • Deciding whether server-side templating is right for you
  • Introducing Scalate
  • Serving content with Scalate
  • Comparing Scalate and Twirl

In chapters 5 and 6, you saw how Scalatra can be used to build RESTful APIs by returning JSON and files directly from your controller actions. Scalatra excels at this architecture, but as an HTTP framework, it’s also well suited to serving websites. In this chapter, we’ll discuss what this means and look at how Scalatra can integrate various standalone templating systems to render the user interface.

7.1. Deciding whether server-side templating is right for you

Server-side templating will be a familiar topic to many readers. Many Scalatra users come ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required