Chapter 4. Customers, auctions, and bidding
This chapter covers
- Binding queries from snippets
- Implementing Comet
- Bidding via AJAX
Now that you have the base of the application in place, the next thing to do is construct the frontend so that visiting customers can browse through the auction catalog and access details on any particular auction. By its very nature, an auction is a highly spontaneous affair, so it’s critical to get real-time feedback when other customers bid on the same auction as you, particularly if they placed a higher bid!
These updates will be delivered via Lift’s sophisticated Comet mechanism, so if a competing customer places a higher bid, all the other users viewing that auction will receive a notification telling them about this new bid and inviting them to place another bid. The bidding itself will be passed to the server using Lift’s built-in AJAX support, so you’ll be able to see the interplay between snippets, AJAX, and Comet, all in a single user interface.
We’ll be building on chapter 3’s CRUD interface assembled with the CRUDify traits and adding custom snippets, and we’ll also be covering a range of new topics, including automatic list pagination.