March 2020
Intermediate to advanced
201 pages
2h 50m
English
By default, views in Play are HTML and they can be made dynamic using the Scala expression language. In fact, you can return a JSON or XML response as well if necessary. Let’s focus first on HTML Scala views and how the Play template engine helps you to create modular, expressive, and fluid views. Even though the template engine uses Scala as the expression language, this is not a problem for Java developers. The Scala language used in templates is very simple. As you saw in Chapter 1, the template engine used by Play is Twirl. Recall ...
Read now
Unlock full access