Play Form – Data Model
The first and foremost point we need to understand is how we design our Model or Data Model in Play Framework Scala-based applications. This may be a bit different for Play Framework Java-based applications.
In Play Framework Scala-based applications, we use a concept called Scala Case classes to design our Data Models, because they are very handy and provide a lot of free benefits. For instance, we don't need to write getters at all. Scala provides them for free automatically.
You can refer to the Scala Case Classes section in Chapter 2, Functional Scala, for more information on the benefits of Scala Case Classes.
Play Framework Form API
Play Framework has a rich Form API to support Forms in a handy and easy way. It supports simple Forms very easily, and complex Forms are also possible.
We should understand the following two Play Form APIs to develop Play Form-based Web applications:
Form case class Forms object
Both Play APIs are available in the same package, play.api...