Skip to main content

skip to main content

developerWorks  >  Web development  >

Build Comet applications using Scala, Lift, and jQuery

Creating the e-commerce Auction Net site

developerWorks
Go to the previous pagePage 2 of 8 Go to the next page

Document options
PDF format - Fits A4 and Letter

PDF - Fits A4 and Letter
144 KB (21 pages)

Get Adobe® Reader®

Sample code


My developerWorks needs you!

Connect to your technical community


Rate this tutorial

Help us improve this content


Auction Net

Before I start talking about the technical details of the implementations, let's first take a look at the functional design of the example application. You will build a simple e-commerce site that you will call Auction Net.

Functional design

Auction Net will be an auction Web application, as the name suggests. It will allow people to sell (list) items and for other uses to buy (bid) on those same items. There are a lot of potential complexities in an auction Web application, but I will simplify things greatly so you can focus on how to use Scala, Lift, and jQuery to easily create a Comet-style application. After you see how easy it is to create a Comet application using Lift, it can be tempting to start using Comet everywhere. It is similar to when Ajax applications first started appearing. You often saw some sites overuse Ajax and create a less functional application.

This site needs to let people sign up for the application and become registered users, which is common functionality, and something that would not benefit from Comet. A typical registration/login process is sufficient. After the users have registered, they need to be able to sell an item, so you need a way to create new items and to list existing items. Again, this is something that would not greatly benefit from Comet-style interactivity. Finally, you want users to also bid on items. This is where Comet becomes a nice feature. You want a user to see the current high bid for an item, and have the bid update automatically when another user bids on it.

You should now have a basic idea of how you want the site to work. You can list out several domain objects: user, item, and bid. For each object you can also list the operations you want to be able to perform on them. These operations can be used as the basis for several pages, some of which can be very interactive using Comet. Now let's look at how you implement all of this by using Lift.



Back to top



Go to the previous pagePage 2 of 8 Go to the next page