Data Management with Java
By Desmond D'Souza and Jun Wang
Last month's column discussed the design of a basic online-shopping applet in Java. It described the design and implementation of the GUI components using Java's AWT library, the implementation of GUI event handling, and the interactions with problem-domain objects.
This month, we present a more sophisticated shopping application that will introduce the data-management aspects of such a shopper in Java. You can browse the applet itself at www.iconcomp.com/shopper. The features of our new applet will include:
- Flexible categorization of products into groups.
- Easy browsing of these product groups.
- The ability to advertise specials on certain products or groups.
- Side-by-side comparison shopping.
- Direct links to product comparisons and reviews.
- Displaying of structured product information (textual or graphical).
- Full configuration from either simple text files or product databases.
- Control parameters that are provided through HTML.
- The ability to enter order information and place orders online.
Any real shopping application needs to store and retrieve a lot of data, such as product and group names, descriptions, prices, and graphics. We need a simple and maintainable approach to storing and importing data into our shopping application. We will outline three schemes, from the most straightforward and least flexible to the most flexible but most complex.<>