Chapter 3. The auction application
This chapter covers
- Auction application requirements
- Segmenting XHTML templates
- Defining data models and validation with Mapper
- Scaffolding with CRUDify
In order to firmly root your understanding of Lift in the real world, we’ll create a full-blown auction application. This part of the book will walk you through the first part of building this application, which, among other things, includes a basic AJAX shopping cart, several real-time components, and a checkout via PayPal. As we go through each chapter, adding new elements of functionality, you’ll learn about many of Lift’s features.
The first two sections in this chapter present an overview of the application you’ll be constructing. This includes a breakdown of the application’s pages and their functionality, along with how you could integrate content supplied by a frontend design team into your Lift templates.
The last three sections deal with defining and constructing the data model using Lift’s object-relational mapping (ORM) tool: Mapper. These sections also show how you can leverage some of the traits within Mapper to get up and running quickly via the Mapper scaffolding, including making a user-registration facility without writing too much boilerplate code. Finally, the last section touches on validation and demonstrates how you can add custom rules to your Mapper models.