Chapter 3: Creating the Online Book Store Application


A Unified Modeling Language (UML) static structure diagram depicts a software system decomposed into subsystems in the form of classes, interfaces, and packages. The classes and interfaces in a static structure diagram map to source files in the .NET framework, whereas packages map to namespaces in the .NET framework.

This chapter describes the UML static structure diagram that models the Online Book Store application in terms of classes and packages. It explains how the Online Book Store application utilizes the classes that Microsoft Visio creates from a UML static structure diagram to provide functions for an end user to log on, select books, and place an order.

Architecture of the Online Book Store Application

The Online Book Store application consists of two projects:

  • OnlineBookStore

  • BookStoreAdministrator

The OnlineBookStore project constitutes the Online Book Store Web application, which enables an end user to browse for books online, add books to a shopping cart, and place an order for the books in the cart.

The BookStoreAdministrator project constitutes the Book Store Administrator application, which enables the administrator of the application to add and update information about the books available for sale. The BookStoreAdministrator project also enables the administrator to view and update the orders that customers place using the Online Book Store Web application.

Figure 3-1 shows the architecture of the Online Book Store application:

click to expand: this figure shows interaction between different components of the online book store application, such as uml static structure diagram, the .net skeleton code, the bookstore database, the book store administrator application, and the online book store web application.
Figure 3-1: The Online Book Store Application Architecture

The OnlineBookStoreUMLModel.vsd file provides the UML static structure diagram for the Online Book Store application. The UML static structure diagram in the OnlineBookStoreUMLModel.vsd file shows the OnlineBookStore package and the ViewCart, BookStore, CustomerInfo, Login, BookObject, PlaceOrder, and ShowMessage classes in that package, as shown in Figure 3-2:

this figure shows the onlinebookstore package and the classes that it contains.
Figure 3-2: The UML Static Structure Diagram

These classes provide the .NET skeleton code, which you need to customize according to the requirements of the Online Book Store application. To create .NET skeleton code from OnlineBookStoreUMLModel.vsd file:

  1. Open Microsoft Visio.

  2. Open OnlineBookStoreUMLModel.vsd file.

  3. Select UML->Code->Generate.

  4. Select the Target Language as Visual Basic.

  5. Specify the Project Name as OnlineBookStore.

  6. Select the Template as ASP.NET Web Application and Click OK.

The OnlineBookStore project consists of the following files:

  • Login.aspx : Provides the Login class that defines the Login page, which enables an end user to specify login credentials and log on to the Online Book Store Web application. The Login page also enables a new end user to register and use the application.

  • BookStore.aspx : Provides the BookStore class that defines the Book Store page to display books sorted into various categories. In addition, an end user can add books to the shopping cart using the Book Store page.

  • CustomerInfo.aspx : Provides the CustomerInfo class that defines the Customer Registration page. A new end user can provide the necessary information to register for the Online Book store Web application.

  • ViewCart.aspx : Provides the ViewCart class that defines the View Cart page. An end user can view the books ordered and the total amount for the books in the shopping cart using this page.

  • PlaceOrder.aspx : Provides the PlaceOrder class that defines the Place Order page. An end user can provide credit card information and order the books in the shopping cart using this page.

  • ShowMessage.aspx : Provides the ShowMessage class that defines the Order Confirmation page to display the Order Id of the orders placed by an end user.

  • Global.asax : Provides the Global class that defines the application and session-specific methods .

The BookStoreAdministrator project consists of the following files:

  • frmBooksCategory.vb : Provides the BookCategory class that defines the Books Category window where the administrator can add, delete, and update book categories.

  • frmBooks.vb : Provides the Books class that defines the Books Information window where the administrator can add books to the available book categories.

  • frmModifyBook.vb : Provides the ModifyBook class that defines the Modify Book Information window where the administrator can modify information for a book.

  • frmViewBooks.vb : Provides the ViewBooks class that defines the View Books Information window where the administrator can view information on available books sorted by book categories.

  • frmViewOrders.vb : Provides the ViewOrders class that defines the View Orders window where the administrator can view and update the orders placed by registered end users through the Online Book Store Web application.

  • frmViewOrderInfo.vb : Provides the ViewOrderInfo class that defines the View Order Information window where the administrator can view the number of books ordered by an end user.

  • frmApplicationManager.vb : Provides the ApplicationManager class that defines the Application Manager window where the administrator can browse through the Book Store Administrator application.

  • Shared.vb : Provides the Shared module that establishes a connection with the BookStore database and invokes the Application Manager window.

Figure 3-3 shows the class diagram for the Online Book Store application:

this figure shows the classes applicationmanager, bookcategory, books, modifybook, viewbooks, vieworderinfo, and vieworders, as well as the shared module in the bookstoreadministrator project. this figure also shows the bookobject, bookstore, customerinfo, global, login, placeorder, showmessage, and viewcart classes in the onlinebookstore project.
Figure 3-3: The Class Diagram for the Online Book Store Application



NET InstantCode. UML with Visio and Visual Studio .NET
NET InstantCode. UML with Visio and Visual Studio .NET
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 49

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net