E-Commerce Case Study (using .net 3.5, sql server 2008, multi tier architecture)
The Project Plan and Design.
Modeling Tool – UML.
UML is a language that represents how a system or application will behave, how it will interact with the user and other components within the system, and how it will process data. To complete this chapter, you do not have to be a UML expert; however, you will need some fundamental knowledge of UML. Since including a complete reference or tutorial on UML is outside the scope of this publication, you can read more about the basics of UML at the Object Management Group site (http://www.uml.org).
1.) Activity Diagrams
A common diagram used within UML is an activity diagram, which represents the flow of the business logic of your system. The activity diagram will detail a specific task, or scenario, and how the system will accommodate the individual scenario. It will give a high-level view of th operation and is like a common flowchart.oject Plan and
Table 7-1. Activity Diagram Symbols and Objects
Symbol/Object Description
Solid black circle Demonstrates the initial state of the activity
Arrow Shows the flow of action between different activities
Oval/rectangular Presents a specific action state
Diamond Represents a decision that proceeds in one way or another
Black circle/clear edge Demonstrates the final state of the diagram
Figure 7-1 shows the Search Activity diagram.
Figure 7-2 shows the Shopping Cart activity diagram
Figure 7-3. Checking Out activity diagram
Figure 7-4. Processing Abandoned Shopping Carts activity diagram
Figure 7-5. Account Registration activity diagram
Use Cases
The use cases you will be designing and using for the purposes in this chapter will be slightly different from the activity diagrams. More specifically, the use cases will show a macro-level view of the system and how users will interact with it.
Use cases are typically diagrams that outline the usage requirements for the system. They
are helpful in that they show a high-level view in which different elements of the system interact.
Contained within a use case are several elements:
Actors: Represent a person, organization, entity, or external component of the system and
are drawn as stick figures
Associations: Represent situations that are present when an actor is involved with a use case
System boundaries: Provide a specific scope of the use case
Packages: Aid in organizing the use cases into specific groups
Figure 7-6 shows the use cases for case study.
Class Diagrams
In this section, you’ll model the common objects used with the e-commerce system. These are, of course, individual classes and are certainly not going to be the only classes that the finalized system will contain. They will be the most common objects or classes that the system will use or be based upon. As a result of first identifying and then modeling these common objects, you will have your first blueprint of the database; you’ll use this blueprint to design from in the following chapter. Table 7-2 lists the common classes.
Table 7-2. Common Objects
Common Class Description
EndUser Describes all users within the system
EndUserType Describes the classification of the users and their associations
Product Describes what is being sold
ProductCategory Describes the categories in which products can be classified
Orders Contains the information about what the customer purchase
OrderDetails Contains the details about an individual order
Address Contains address information for any other related object
ContactInformation Contains contact information for any other related object
ShoppingCart Contains the information about the products the customer chooses to purchase
CreditCard Contains the information for payment
From each of these common classes, I will provide a class diagram that will depict each of the attributes and properties within the class. These classes will not have any methods or functions because they are simply objects that will contain detailed information about the overall system objects. Let’s now explore the classes.
Figure 7-7. EndUser class diagram
Figure 7-8. EndUserType class diagram
Figure 7-9. Product class diagram
Figure 7-10. ProductCategory class diagram
Figure 7-11. Orders class diagram
Figure 7-12. OrderDetails class diagram
Figure 7-13. Address class diagram
Figure 7-14. ContactInformation class diagram
Figure 7-15. ShoppingCart class diagram
Figure 7-16. CreditCard class diagram