Using J2EE Design Patterns

About the VSM Sample Application

The Virtual Shopping Mall (VSM) sample application enables vendors to set up online shops, customers to browse through the shops, and a system administrator to approve and reject requests for new shops and maintain lists of shop categories.

About VSM Users

The application identifies three types of users—Mall Administrator, Shop Owner and Mall Customer—each with different privileges.

Mall Administrator
The Mall Administrator is the superuser and has complete control over all the activities that can be performed. The application notifies the administrator of all shop creation requests, and the adminstrator can then approve or reject them. The administrator also manages the list of available product categories. The administrator can also view and delete entries in the guestbook.
Shop Owner
Any user can submit a shop creation request through the application. When the request is approved by the Mall Administrator, the requester is notified, and from there on is given the role of Shop Owner. The Shop Owner is responsible for setting up the shop and maintaining it. The job involves managing the sub-categories of the items in the shop. Also, the shop owner can add or remove items from his shop. The Shop Owner can view different reports that give details of the sales and orders specific to his shop. The Shop Owner can also decide to close shop and remove it from the mall.
Mall Customer
A Mall Customer can browse through the shops and choose products to place in a virtual shopping cart. The shopping cart details can be viewed and items can be removed from the cart. To proceed with the purchase, the customer is prompted to login. Also, the customer can modify personal profile information (such as phone number and shipping address) stored by the application. The customer can also view the status of any previous orders, and cancel any order that has not been shipped yet.

The following use-case diagram shows how each type of user interacts with the VSM application.

Use-case diagram

Database Schema

The figure below shows the database schema for the VSM application.

VSM database schema diagram

Conclusion

The Virtual Shopping Mall (VSM) sample application shows how design patterns can simplify enterprise development tasks, and demonstrates approaches you can use to implement common J2EE design patterns. If you're interested in other approaches, you can visit OTN to learn how Oracle's J2EE-compliant Business Components for Java (BC4J) framework provides off-the-shelf implementations of numerous design patterns you would otherwise have to code by hand. The article Simplifying J2EE and EJB Development with BC4J provides more information.

 

Questions or comments? Post a message in the OTN Sample Code discussion forum or send email to the author.

Using J2EE Design Patterns: About the Virtual Shopping Mall Sample Application
Author: Robert Hall, Oracle Corporation
Date: May 2002

This document is provided for information purposes only and the information herein is subject to change without notice. Please report any errors herein to Oracle Corporation. Oracle Corporation does not provide any warranties covering and specifically disclaims any liability in connection with this document.
Oracle is a registered trademark and Enabling the Information Age is a trademark or registered trademark of Oracle Corporation. All other company and product names mentioned are used for identification purposes only and may be trademarks of their respective owners.

Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.

Worldwide Inquiries:
+1.650.506.7200


 

Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy