Académique Documents
Professionnel Documents
Culture Documents
A Thesis
Presented to the
Faculty of
San Diego State University
In Partial Fulfillment
of the Requirements for the Degree
Master of Science
in
Computer Science
by
Jie Zhang
Fall 2010
iii
Copyright 2010
by
Jie Zhang
iv
DEDICATION
vi
TABLE OF CONTENTS
PAGE
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xi
CHAPTER
1
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1
1.1.1
1.1.2
E-Commerce Category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.3
1.2
1.3
Thesis Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1
ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
J2EE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3
2.4
2.2.1
J2EE Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2
JSP Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.3
JSPRuntime Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WAMP Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.1
Apache Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.2
MySQL Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.3
PHP Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.1
Performance Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.2
2.4.3
Overall Summery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
vii
3.1
3.2
Html+Div+Css . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3
JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4
Xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5
Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2
System Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3
System Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.4
System Modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.5
4.6
Database Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Database Requirement Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.6.2
4.6.3
5.2
6.2
7
4.6.1
Function Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.1.1
6.1.2
6.1.3
6.1.4
CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
BIBLIOGRAPHY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
viii
LIST OF TABLES
PAGE
Table 4.1 Product Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 4.2 User Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 4.3 Indent Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
ix
LIST OF FIGURES
PAGE
Figure 2.1 WAMP multitier architecture diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
x
Figure 5.10 Back-end admin login module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 5.11 Back-end start up module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 5.12 Back-end system operation module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 5.13 Back-end navigation module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 5.14 Main statistics information module.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 5.15 Back-end search engin module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 5.16 Products list module.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 6.1 Add products test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 6.2 User registration test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 6.3 User shopping test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 6.4 Order management test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
xi
ACKNOWLEDGEMENTS
I am indebted to a number of people who have contributed to the successful
completion of my Masters program. First, I would like to thank my supervisor, Professor
Marko Vuskovic, for his guidance and valuable suggestions. In particular, I highly appreciate
the great amount of time he spent for my program and his high availability to students. My
thanks also go to Professor Kris Stewart, and Professor Jianwei Chen for taking their time
serving as members of my thesis defense committee.
Finally, I would like to express my profound gratitude to my parents who are living in
China, for their love and incredible support.
CHAPTER 1
INTRODUCTION
This chapter will give the introduction of E-commerce and its evolution.
2
and performance difference in several related metrics-iteration operation, arithmetic
operations, string operations, database operations and file operations.
CHAPTER 2
COMPARISON OF SEVERAL DIFFERENT
RELATED TECHNOLOGIES
The architecture of an e-commerce web system normally consists of three layers: UI
layer, Business logic layer and Database layer [6].
The following is several related technologies; we will analyze and compare them in
performance in several different benchmarks-iteration operation, arithmetic operation, string
operation, database operation and file operation. With the comparison result, we will draw the
conclusion of which specific technology combination is appropriate for specific scenario.
2.1 ASP.NET
ASP.NET is a Microsoft technology that is embedded in Web pages executed by the
server side. It is the process-based server programming language running in IIS. Unlike the
previous ASP interpreter immediately, but will first run the server program when compiled[7],
so the next time when it run will become faster. But when it is revised, it must be re-compiled;
the effect of implementation will be reduced.
2.2 J2EE
The following is the introduction of the J2EE technology.
4
then the results will be embedded in HTML code with the result returned to customer[10, 11].
The inserted Java code can operate database and build dynamic pages in order to achieve the
functionality required. JSP and Java Servlet, both are implemented in the server side, usually
returned to the client an HTML text, so long as the client browser will be able to browse.
6
access to data. Web server through the storage engine API[17] can interact with a variety of
storage engines. The following is the MySQL architecture (see Figure 2.3).
8
(b) JSP Test iteration cycle is 2000*2000, test result is 52 seconds, the following is the
code:
<jsp:useBean id = clockA scope = page class = dates.JspCalendar/>
<jsp:getProperty name = "clock" property = "time" />
<%
int m = 0;
int n = 0;
for (m = 0; m < 2000; m++) {
for (n = 0; n < 2000; n++) {
}
}
%>
<jsp:useBean id = clockB scope = page class = dates.JspCalendar/>
<jsp:getProperty name = "clockB" property = "time" />
(c) PHP Test iteration cycle is 2000*2000, test result is 57 seconds, the following is
the code:
<?
$Time = date("Y-m-d"). " " . date("H:i:s");
echo $Time;
echo "<br>";
for ($m = 0; $m < 2000; $m++) {
for ($n = 0; $n < 2000; $n++) {
}
}
$Time = date("Y-m-d"). " " . date("H:i:s");
echo $Time;
?>
10
11
12
13
14
This combinations development costs should be low, because it has the most powerful
desktop integration environment to support many functions, especially for small and medium
sized enterprise office automation network, enterprise portal sites.
LinuxUnix+ Apache + Tomcat + JSP + Oracle 11g
This combination is designed for medium to large enterprise information systems,
although Oracle requires higher hardware configuration, but is suitable for mass data storage.
Large enterprises often multiple databases, use J2EE to integrate them is appropriate, and it is
easily to scale up through the server clusters, in a timely manner to meet business clients
growing quickly. This combinations vulnerability is relatively high development costs, in
particular, involves some of J2EEs advanced features but not too mature.
From the above comparison results and analysis, we can draw the comparison
conclusion (See Figure 2.14) of these technology combination on some different features
15
CHAPTER 3
E-COMMERCE FRIENDLY USER INTERFACE
AND EXPERIENCE AND RELATED
TECHNOLOGIES
Improving the user experience, is very important to e-commerce website, user
experience includes from the impression of the website, the website features, website
usability, to website content, a combination of factors to improve the website environment
[24]. It can be said that the performance of the user experience will be directly related to the
value of e-commerce website.
3.2 H TML +D IV +C SS
DIV is an element of html, div + css is a page layout approach, this page layout is
different from the traditional table layout approach, and achieves the w3c separation of
content and presentation.
DIV element is used within the document for the bulk of the content structure and
background elements. DIV start and end tags are used for everything between the block[25],
in which the characteristics of the elements contained in the DIV tag attribute to control, or
through the use of style sheets to format the block to be controlled.
Relative to the conventional table, using DIV + CSS technology web, the website will
be friendlier to search engine. It also separate website content and style, so that the
adjustment of the page and style has become more convenient.
16
3.4 X ML
The difference between XML and HTML is: XML is used to store data, focusing on
the data itself. HTML is used to define the data, focusing on the data display mode[27].
XMLs simplicity make it easy to read and write in any application data, this makes
XML becomes the unique data exchange language, although different applications also
support other data exchange format.
3.5 A JAX
Traditional web applications allow users to fill out the form, as when the form is
submitted to the web server sends a request. Server receives and processes the coming form,
and then returns a new page. This approach will waste a lot of bandwidth, because the major
content of the two pages in HTML code are the same. Since each application needs to interact
with the request to the server, application response time depends on the server[28, 29]. This
has resulted in response time to the user interface is much slower than the local application.
AJAX applications will only send to the server and required data, using SOAP or other
web service interfaces based on XML, and JavaScript on the client side deals with the
response from the server[30]. Because the server and browser exchange significant reduced
data, so web server also reduces the processing time.
The greatest advantage of using Ajax is to update the entire page without the premise
of maintaining data. This makes web applications more rapid responded to user actions.
17
CHAPTER 4
SYSTEM DESIGN AND MODELING
This on-line store system provides convenient environment for users to search and buy
many different kinds of products. The system is divided into front-end side (user side) and
back-end side (Administrator side). There are registration, browse products, search products,
order products modules etc in the user side; there are user management, order management,
products management modules etc in the administrator side for admin to manage, update and
maintenance system.
18
2. Administration Management Side has the following modules:
Products Category Management: add, delete, update, query Products Management:
add, delete, update, query Member Management: add, delete, update, query Order
Management: add, delete, update, query order, and check order manifest, product delivery
status. Article Category Management: add, delete, update, query Article Management: add,
delete, update, query Reports Statistics: sales details
The following are the front-end user side model and back-end server side model (see
Figure 4.2 and Figure 4.3).
19
20
21
total order One user can buy products (1:M) One user relates to many orders (1:M) One
list relates to many orders (1:M) Based on the system function analysis, we can summarize
and get the following info: User, includes fields: user ID, user name, password, email,
phone, address, etc Products, includes fields: products ID, products category, products
name, price(store price, market price, promotion price), products quantity, products
introduction, etc Order List, includes fields: order ID, products ID, number of ordered
products, etc Order, includes fields: order ID, user ID, order time, etc
22
Table 4.1. Product Table
Field Name Data Type Length Not Null
ID
Int
10
No
Productsname
Varchar
40
No
Productsclass
Int
10
No
Author
Varchar
25
Yes
Publish
Varchar
150
yes
productsNo
Varchar
30
yes
Content
Varchar
4000
yes
Price
float
yes
Amount
int
10
Yes
Leav number
int
10
Yes
reg time
Datetime
No
Description
auto increprimary key
products name
products category
products author
publish agency
products number
content summary
65price
total amount
in-store amount
In-store time
Description
auto incrememberID
user name
Password
member level
Gender
Address
Telephone
post number
Email
registration time
registration ip
Not Null
No
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Description
auto incre
order number
memberID
submit order time
delivery time
total price
content
user ip
is pay off
Is delivered
23
CHAPTER 5
System Detailed Design
The system program files consist of front-end and back-end files. Front-end files and
back-end files both consist of UI files and logic files.
Front-end logic files (see Figure 5.1) are the php files with .php extension. Each php
file is used for specific module.
24
25
26
27
28
29
CHAPTER 6
SYSTEM TEST AND EVALUATION
Software testing provides manual or automated means used to run or test a system,
process, aimed at testing whether it satisfies specified requirements or expected results [37].
To provide high quality, software system should place emphasis on reliability and integrity
[38].
Capability Maturity Model (CMM) [39], points out that the improvement of software
quality pertains to defect prevention, technology management. The Capability Maturity
Model Integration (CMMI)[40, 41] emphasize that software improvement can be facilitated
by effective test analysis and bug fix.
Peeger [42] asserts that there are several types of evaluation techniques, such as
feature analysis, case study, and formal test. Brown and Wallnau [43] proposed that software
evaluations efficiency is depend on the evaluation staffs skills and experience.
30
31
32
CHAPTER 7
CONCLUSION
This thesis researched the e-commerce web application related issues. We compared
several related technologies-ASP.NET, J2EE and WAMP of their advantages and
disadvantages and performance based on several different benchmarks-iteration test,
arithmetic operations, string operations, database operations, and file operations. Through the
process of comparison, we get the comparison result of these technologies on some different
features, and we recommend to use WAMP for medium or small sized e-commerce
corporation or group to build their website.
We also designed and developed an on-line store system to be familiar with the
procedures of developing an e-commerce web system through the whole process of system
modeling design, system architecture design, UI design and system testing.
33
BIBLIOGRAPHY
[1] Marshall Brain. How e-commerce works.
http://communication.howstuffworks.com/ecommerce.htm, 2000. accessed Apr. 2009.
[2] M. Arlitt, D. Krishnamurthy, and J. Rolia. Characterizing the scalability of a large
web-based shopping system. ACM Transactions on Internet Technology, 28:5056,
2001.
[3] G. Gama, W. Meira Jr., M. Carvalho, D. Guedes, and V. Almeida. Resource placement
in distributed e-commerce servers. The Evolving Global Communications Network,
3:68, 2001.
[4] U. Vallamsetty, K. Kant, and P. Mohapatra. Characterization of e-commerce traffic.
Fourth IEEE International Workshop on Advanced Issues of Ecommerce and Web-Based
Information Systems, 3:167192, 2003.
[5] DigitSmith Embroidery and Screen Printing. Ecommerce definition and types of
ecommerce. http://www.digitsmith.com/ecommerce-definition.html, 2003. accessed
May. 2009.
[6] D. Menasce and V. Almeida. Scaling for E-Business. Prentice Hall, Upper Saddle River,
New Jersey, 2001.
[7] W3Schools. Asp.net tutorial. http://www.w3schools.com/aspnet/default.asp, 2002.
accessed Aug. 2009.
[8] Oracle. Java ee at a glance. http://java.sun.com/javaee, 2001. accessed Aug. 2009.
[9] Sue Spielman. J2ee design patterns.
http://onjava.com/pub/a/onjava/2002/01/16/patterns.html, 2002. accessed Aug. 2009.
[10] Scott McPherson. Java server pages: A developers perspective.
http://java.sun.com/developer/technicalArticles/Programming/jsp, 2000. accessed Feb.
2010.
[11] MassLight. Servlets and java server pages. http://j2ee.masslight.com/Chapter1.html,
2001. accessed Aug. 2009.
[12] Apache Software Foundation. Apache tomcat. http://tomcat.apache.org/, 2001. accessed
Aug. 2009.
[13] Wampserver. Wamp introduction. http://www.wampserver.com/en/presentation.php,
2004. accessed Apr. 2009.
[14] A. Mockus, R. T. Fielding, and J. Herbsleb. A case study of open source software
development: The apache server. In Proceedings of the 2000 International Conference
on Software Engineering, Limerick, Ireland, June 2000.
[15] Apache Software Foundation. The apache web server. http://www.apache.org, 2001.
accessed Jul. 2009.
34
[16] Biray Jr Turan. A web-based database application as an analysis tool for energy use and
carbon dioxide emission. Masters thesis, Halmstad University, 2009.
[17] The PHP Group. Mysql api. http://php.net/manual/en/book.mysql.php, 2004. accessed
Jan. 2010.
[18] Zend Technologies Ltd. Zend online documentation.
http://www.zend.com/en/resources/zend-documentation/, 2006. accessed Jul. 2009.
[19] R. Jain. The Art of Computer Systems Performance Analysis. John Wiley Sons, Inc,
Hoboken, New Jersey, 1992.
[20] Qing Wang. Workload characterization and customer interaction at e-commerce web
servers. Masters thesis, University of Saskatchewan, 2004.
[21] D. Menasce, V. Almeida, R. Fonseca, and M. Mendes. Business-oriented resource
management policies for e-commerce servers. Performance Evaluation, 42:224238,
May 2000.
[22] Website Optimization LLC. Response time: Eight seconds, plus or minus two.
http://www.websiteoptimization.com/speed/1/, 2001. accessed Jan. 2010.
[23] Hal Abelson. Basic string operations. http://philip.greenspun.com/tcl/strings.adp, 1999.
accessed Jan. 2010.
[24] Thomas Hilburn and Massood Towhidnejad. Software quality across the curriculum. In
Proceedings of the 15th Conference on Software Engineering Education and Training,
February 2002.
[25] W3Schools. Html div tag. http://www.w3schools.com/tags/tag div.asp, 2002. accessed
Jan. 2010.
[26] W3Schools. Javascript tutorial. http://www.w3schools.com/js/default.asp, 2001.
accessed Jan. 2010.
[27] W3Schools. Xml schema. http://www.w3.org/XML/Schema, 2001. accessed Oct. 2009.
[28] Ajaxmatters. Getting started with ajax.
http://www.ajaxmatters.com/2006/05/getting-started-with-ajax-using-java-tutorial/,
2006. accessed Sept. 2009.
[29] Greg Murray. Asynchronous javascript technology and xml (ajax) with the java platform.
http://java.sun.com/developer/technicalArticles/J2EE/AJAX, 2005. accessed Jan. 2010.
[30] Wikipedia. Ajax programming. http://en.wikipedia.org/wiki/Ajax, 2004. accessed Oct.
2009.
[31] Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns.
Addison-Wesley, Boston, Massachusetts, July 2001.
[32] Kees van der Sluijs and Geert-Jan Houben. A generic component for exchanging user
models between web-based systems. In Int. J. Cont. Engineering Education and
Lifelong Learning, 2006.
[33] OMG. Introduction to omgs unified modeling language.
35
http://www.omg.org/gettingstarted/what is uml.htm, 2006. accessed Oct. 2009.
[34] Randy Miller. Practical uml: A hands-on introduction for developers.
http://edn.embarcadero.com/article/31863, 2003. accessed Jun. 2009.
[35] Atlas. What is uml.
http://atlas.kennesaw.edu/ dbraun/csis4650/AD/UML tutorial/what is uml.htm, 2007.
accessed Jun. 2009.
[36] Quackit. Database tutorial. http://www.quackit.com/database/tutorial/, 2004. accessed
Feb. 2010.
[37] Mary Jean Harrold. Testing: A roadmap. In International Conference on Software
Engineering, Limerick, Ireland, June 2000.
[38] Jiantao Pan. Software testing, dependable embedded systems. Masters thesis, Carnegie
Mellon University, 1999.
[39] M. Paulk, C. Weber, and M. Chrissis. The Capability Maturity Model. Addison Wesley,
Boston, Massachusetts, 1995.
[40] CMMI. Cmmi(sm) for software engineering.
http://www.sei.cmu.edu/publications/documents/, 2007. accessed Mar. 2010.
[41] Daniel Rowley. Model-based software testing technology change management. Masters
thesis, Monash University, 2002.
[42] Peeger.S. Software Engineering Theory and Practice. Prentice Hall, Upper Saddle
River, New Jersey, 2001.
[43] A. Brown and K Wallnau. A framework for evaluating software technology. IEEE
Software, 13:4148, 1996.