O'Reilly logo

Learning Play! Framework 2 by Andy Petrella

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

Ingesting data

In the coming sections, we'll focus on how we can send data to the servers that is complex and is constrained in its shape and type. The first step being how to deal with a request for content.

Extracting the data

Earlier we saw how to create a structure from the dictionary, which was created by us. However, in a web environment, such a dictionary will be coming from the client, for instance, the browser.

In this section, we'll see that Play! 2 comes with everything that we might need to map our external view back and forth to our server-side structure (until now User).

To illustrate the simplest case, we'll create an HTML form that will mimic the dictionary:

This form was created directly from the previous template by changing its ...

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