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 ...
Get Scalatra in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.