At this stage, we have learned the functionalities offered by Play! 2 to represent our data on both sides (server and client). However, that data was all transient. Indeed, the HTML form was submitting data to an action that rendered them directly.
In a web application, most data isn't transient, but persistent—data is the value of modern applications (moreover, social-oriented ones).
If we remember the structure of our
User model, it includes two references to other users: one optional (
spouse) and one multiple (
friends). Such data must come from somewhere other than the
User form, because the actual form is only defined for a single user.
This implies a third piece in our architecture, a database, in order to retrieve previously ...