O'Reilly logo

Play for Java by Nicolas Leroux and Sietse de Kaper

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 8. Producing output with view templates

This chapter covers

  • An introduction to Scala templates
  • The Scala template syntax
  • Reusing template code and components
  • Performing common tasks

We’ve seen how to structure and store data and business logs using models, and how to use controllers to bridge the gap between the Java world and the HTTP-based web.

We’ve covered the M and the C in MVC, but what about the V, the view layer? We need a view layer to present all the work our application does to the client, whether that is a browser or another system using our API.

When developing an application with Play, one of the options for creating output is using templates. You’ve probably used a templating system of some kind before, but you’ll ...

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