About WebAuction

Given the array of technologies supported by the J2EE platform, how is a developer to choose among them to create an application such as WebAuction?

The first task, of course, is to create a functional specification that describes exactly what the application is supposed to do.

For WebAuction, we started with the mental model of a “web auction” site similar to existing auction sites on the Internet. Functionally, the WebAuction application supports:

  • Secure user registration

  • Email validation of user's login credentials

  • Browsing, for both registered and unregistered users

  • Browsing by category for auction items (with some minor searching functionality)

  • Placing bids

  • Email confirmation of bids

  • Viewing open bids

The J2EE services introduced in this chapter are discussed in subsequent chapters in detail. A more detailed description of the WebAuction application architecture appears in Chapter 14.

WebAuction Application Technology Requirements

Based on the functional specification, the WebAuction technology requirements include services for:

  • Storing data in a database. User account information should be stored persistently, in a database, on disk. In the event of a power failure, we do not want to lose any user information.

  • Handling concurrency issues. Concurrency becomes an issue when multiple threads of execution try to access the same resource at the same time. For example, users might try to bid on a given item simultaneously. The developer should enclose data access operations in transactions, which can help prevent or resolve concurrency issues. Both the database and the WebLogic Server container provide support for transactions.

  • Handling user sessions. Because the WebAuction application needs to handle many concurrent users, session information must be maintained for each user. A session begins when the user attempts to log in. The application must determine that a user is valid before allowing that user to access the auction area. If the user is not a registered user, logic should exist to point the user to a “create user account” page.

  • Representing database data. The WebAuction application's data is stored in a relational database. However, the application uses that data in the context of the object-oriented Java environment. The technology requirements therefore include mechanisms to represent relational data in a way that is consistent with the J2EE environment.

  • Updating data from the Web interface. In the WebAuction application, users can update their personal inventory and data on items for auction. Technology must support updating the database from a Web form.

  • Querying data. Many features of WebAuction require searching and querying data. For example, one feature requires that users be able to browse auction items by category, such as “all the books available for auction.”

  • Securing user information. It must be possible to protect user information and accounts so that other users cannot access them. It must be impossible to access another user's information inside of the WebAuction application, and for someone to view the auction information that belongs to a given user while it is in transit to that user. In order to secure user information, the WebAuction application must take advantage of the security services of WebLogic Server.

We now begin the first of the detailed chapters on J2EE technologies, with a discussion of servlets.

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

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