Part 2. Core functionality

Part 2 teaches you how to use Play’s standard features, organized by common web development concepts, and it contains material that every developer should be familiar with.

Chapter 3 dives into Play’s internal architecture. We show why Play works well with the web instead of against it and how control flows through a Play application. Furthermore, we show how the model, views, and controllers work together and how to modularize an application.

Chapter 4 explains, in detail, how controllers work. They form the boundary between HTTP and Play. You’ll learn how to map URLs to actions in your code and how to deal with URL and query-string parameters in a type-safe way. We show how to use Play forms to validate and retrieve user input from HTML forms and how to return an HTTP response to the client.

Chapter 5 shows how a persistence layer fits into a Play application. Anorm is a data access layer for SQL databases that comes with Play, and it works with plain SQL. We also show how to use Squeryl, a Scala domain-specific language for querying databases.

In chapter 6 we show how Play’s template engine works. We explain the syntax and how Scala is used to make templates type-safe. We’ll show you how to build reusable template blocks and how to compose these blocks into larger templates.

Chapter 7 explains Play forms in detail. Forms allow you to validate form data and map form data to Scala objects. They also help when populating HTML forms with existing data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset