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 ...
© Prem Kumar Karunakaran 2020
P. K. KarunakaranIntroducing Play Frameworkhttps://doi.org/10.1007/978-1-4842-5645-9_44. Play Views and Templating with Scala
Prem Kumar Karunakaran1
(1)
Thiruvananthapuram, Kerala, India
Get Introducing Play Framework: Java Web Application Development 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.