1. CS491A Project Final Report
Web Technology has been popular since 1992. Numerous systems have been
developed to meet the increasing demands of websites. The CGI technology originally
used is still being used today and new ones keep emerging. It is still not easy for
developers and private companies to know which technology is the best fit. There is no
definite answer. In this project, three different web setups are built and a simple test of
web request response time will be recorded. The test results will provide some useful
information for developers and companies to choose the right configuration.
With so many different setups to choose from, when a developer or a
company wants to build an e-commerce site, choosing a good configuration is not
always an easy task. In this class, I will build three web application systems with
different combinations of operating systems, web servers, server side languages
and databases. The web site content is a generic e-commerce site which includes
product display, product search and a shopping cart. The reason building an e-
commerce site is that an e-commerce site includes most of the common
functionalities a web site would have, such as dynamic pages, search function and
database interaction. After all, web sites are mainly used for searching for
information and selling products. The programming involves displaying data
statically or on demand, getting data from the user, retrieving data from the
database and managing data in the database. My project includes all of these
There are several reasons I chose this project. I have done web
programming for more than five years, including two years for eBay and one and
half years for IdeaLab. The class requires us to build a project using a language
we are most familiar with. After experiencing so many real life web site projects,
2. building another one for this class is not a challenge. For class 437 software
engineering, I have already done a similar project. On the other hand, there are
other web programming technologies I have heard of or picked up pieces from
time to time but I have not had any chance to work on it seriously. I’d like to take
this chance to explore them.
The application will be run on a laptop with a Pentium III 700MHz and
128MB RAM. The first application will run on a Linux operating system and the
other two will be developed under a Windows system. After the first one is
completed, it will be erased to make room for application two and application
three. So at the end I will have two applications in one computer. After the above
development, I will do some comparison among them and do a simple
performance test. A rough idea of what technologies to use for building an e-
commerce site will be generated.
2. Technological Background
This project involves quite a lot of technologies, including operating systems, web
servers, databases and server-side languages. Each application has its unique
combinations. Some components have platform dependency. Some components have less
dependency and can be developed under different platforms. I have chosen three popular
configurations for this project. There is no doubt that there are many other ways to
combine it. It is beyond the scope of this project.
2.1 Operating System
Windows 2000: Microsoft Windows 2000 Professional is the most
reliable desktop operating system for business. Building on the power
of Windows NT and the ease of using Windows 98, Windows 2000 is
the best choice for work environments--big and small. Windows 2000
Professional offers the launching pad businesses need to benefit from
the productivity and Internet applications that they use most. It's
more reliable, secure, and manageable than Windows NT
3. Workstation because of its new file encryption system and application
Red Hat: Red Hat Linux is a platform for open source computing. It is
certified by top enterprise hardware and software vendors. From the
desktop to the data center, Red Hat couples the innovation of open source
technology and the stability of a true enterprise-class platform.
2.2 Web Server
IIS 5.0: IIS is an enterprise-level Web server that is included with several
versions of Windows. According to Netcraft Web Server Survey, as of April
2005, around 21% of the web sites on the Internet are using IIS. It can only be run
under a windows-based operating system.
Apache 1.3: Apache Web server has been the most popular Web server since
April 1996 because of its stability, efficiency, portability, security and small size.
It can run on Unix, Linux, Mac OS, Windows and numerous other platforms.
According to Netcraft Web Server Survey, as of April 20005, more than 68% of
web sites on the Internet are using Apache, thus making it more widely used
than all other web servers. Apache is commonly run under an UNIX like system
but it also supports windows-based systems.
2.3 Server Side Language
PERL/MOD_PERL: Perl is a stable, cross platform programming language and
it takes the best features of other languages. PERL supports both procedural and
object-oriented programming. Mod_perl is the marriage of Apache and PERL. It
is said that mod_perl brings together two of the most powerful and mature
technologies available to the web professionals today. It supports many operating
systems. It’s more common to be used under an UNIX operating system.
4. C# ASP.NET: ASP.NET was introduced in 2002. It takes advantage of
Microsoft’s .NET Framework, which provides thousands of classes that
deal with XML, text input, validation of user input, image processing and
more. It can be only used under a Windows system.
JSP/SERVLETS: Since the late 1990s Java servlets and JavaServer
Pages (JSP) have come into widespread use. It is said that web site
developers have been switching from CGI scripting languages to servlets
and JSPs. It supports many platforms. It’s common to be used under both
Windows and Linux.
MySQL: The most popular open source SQL database, is developed and
provided by MySQL AB. The MySQL software delivers a very fast,
multi-threaded, multi-user, and robust SQL database server. It is intended
for mission-critical, heavy-load production systems as well as for
embedding into mass-deployed software. It supports numerous platforms
and it’s very easy to install and upgrade.
SQL 2000: SQL Server 2000 offers a complete database and analysis
solution for rapidly delivering the next generation of scalable Web
applications. As a core component of Microsoft Windows Server System,
it dramatically reduces the time required to bring e-commerce and data
warehousing applications to market. SQL Server 2000 includes support for
XML and HTTP and also takes full advantage of Microsoft Windows
2000, including support for Microsoft Active Directory.
3. System Architecture
Red Hat Linux
5. Apache 1.3
Application 1 has been demonstrated as a powerful system to develop e-
commerce web sites. It’s one of the most mature web technologies. Amazon, one of the
largest e-commerce sites in the world, is using PERL. The PERL interpreter can be
embedded in Apache server and it can run 2000% times faster than CGI. Mason was
chosen as a template. Mason “Autohandler” technology make page inheritance easy and
component calls re-use codes. Those evolved and new features have beat the claims that
this older technology is out of date. MySQL is easy to use and its simplicity makes it
very suitable for web transactions. The production version still does not have a lot of
features that other commercial databases do, such as views, triggers and procedures etc…
This application has excellent performance using less powerful hardware. The difficulty
is to configure the whole system with all compatible versions of components due to its
open source characteristic. It takes experience and practice to install them correctly.
Window 2000 Professional /IIS 5.0
C# ASP.NET/Visual Studio .NET 2003
All packages from this application are made by one vendor, Microsoft. The
functionalities are streamlined, especially between Visual Studio .NET 2003 and SQL
2000. From .NET, database connection can be created and database information is
available by clicking the Tool menu. The installations are not difficult and most of the
time the default settings are enough. The instructions for using them are clear. This
application also supports page inheritance and code reuse. It has its unique <asp> tag and
it can reduce the amount of code to achieve field validation. Visual Studio .NET has a
6. very nice project editor as long as the computer is fast. The database procedure can be
called by C# providing parameters and reduce the amount of code in C# programming.
Application 2 runs slower than application 1 with the same hardware. It is slow to
open the project from Visual Studio .NET 2003 and it is slow when I try to see the result
from the browser. It would be much better used on a faster computer. From VB script
ASP to ASP.NET, Microsoft has dramatically changed its way to create web pages. Web
sites that used VB script ASP have to be totally rewritten to upgrade to ASP.NET.
Programmers who are good at VB script ASP have to learn one of the new languages,
such as VB.NET, C#.NET or J#.NET etc. The odd thing I found is that each page can
only have one web form. To perform a different function is through writing
“ImageClicked” event function in the same script. Traditionally, the web developers use
more than one form in one page to perform different actions. Also the user control label
can not be registered by the web project if it’s created dynamically, so all user control
labels have to be created in advance.
Since .NET was introduced in 2002, it has not been widely used but it is getting
more popular. C# has very similar syntax as JAVA. Microsoft promoted that it does not
hurt performance which language to use as long as it runs under .NET framework.
Apparently, C# was created to attract JAVA programmer to switch to C# programming.
PERL can be run under the .NET framework also.
Window 2000 Professional
This application has a similar installation and configuration as application 1 and
programming language’s syntax is like application 2.
7. The reason the installation and configuration is like application 1 because each
component needs to be installed individually and configured to work together, such as
changing configuration file setup, set class path and install DB driver to the correct
directory etc. It is easier than configuring application 1.
Application 2’s programming syntax is very similar to JSP/servlet. I would have
never known how similar they are until I tried them both. The functionality is very
similar also. The big difference is that C#.NET has a powerful editor and saves a lot of
typing work. Besides overall performance in a defined web system, it really depends on
preference when choosing between the two.
4. Design and Implementation Details
4.1 GUI Design
GUI design is not a concern for this project. The three applications will
use the same design. No image will be used for the web site. Most of the
pages are database driven. Each page maintains a similar look. It has a top
menu, left menu and bottom menu. The left menu has search function,
product display page and the link to advanced search. The top menu has a
link to the shopping car and the bottom menu provides the links to static
information pages which won’t be created for this project. The snapshots
of the pages for application one are in appendix D and application two and
three are part of my demo.
4.2 Project Work Steps
The first step of building the web application is to install all necessary
software and tools including operating system, web sever, database and
language, compatible editors and third party modules.
The second step is to do configuration and set up and get ready for
8. The third step is to design the web pages.
The fourth step is to design databases and implement them.
The fifth step is to implement database drive web pages with server side
The sixth step is do the testing and refinement.
The final step is to do a simple performance chart and analysis.
4.3 Database Schema
Two databases will be used. They are MySQL and SQL 2000.
5. Performance Evaluation
5.1 Experimental Setup
The performance evaluation is to test how fast the server responds
to the web request. Several same functionality pages have been selected
from application 2 and application 3. The tool “HTTP Analyzer” is used to
record response time.
5.2 Experimental Results
The detailed results are shown in the charts in the appendix. Ten attempts
were run for each language for each situation. The average results from
the charts are shown in the chart below.
9. Averages of All Charts
Time (sec) 1.500
Empty Cart Add to Cart Profile Search Category
As can be seen from the averages, C# and JSP/Servlet have similar
performance for empty cart page, add to cart and profile. There is a large
performance gap for search and category. These two tests use the SQL
database which might be affecting the results. As can be seen in the chart
below, SQL2000 is faster than MySQL 3.23.46.
SQL2000: 0.006 sec Average SQL Database
MySQL: 0.024 sec Average
0.015 MySQL 3.23.46
1 2 3 4 5
The limitation of this performance is that we have to make sure both setup
should have optimized coding. The performances of different versions of
operating system, web server and database may vary. It is not clear
whether more powerful hardware would make a big difference in
10. performance. A typical E-commerce site has concurrent multi-users. How
many users the site can support at the same time is very important also. It
requires complex testing environment and it’s beyond a 20-week project.
Choosing a good configuration for an e-commerce site is never easy.
This project tries to address this issue by building three different applications that
use different common combinations of operating systems, web servers, server side
languages and databases. The applications are all used to create a generic e-
commerce site which has product display, product search and a shopping cart.
These functions are common to most e-commerce web sites. These functions also
include the most common functionalities a web site uses such as dynamic web
pages, search function and database interaction.
The first application was built with a Linux operating system written in
PERL and served by Apache server. The other two were developed under a
Windows system. Application 2 is written in C# and runs under Window IIS and
Application 3 is written in JSP/servlets and served by Tomcat.
Three server-side web-programming languages were created and
improved to compete with each other. They are also influenced by each other. As
of April 2005, 69% of web sites on the Internet use Apache which is written in
PERL, JAVA and a small percentage in other languages. 21% of web sites are
windows based and they are most likely written in VBscript and ASP.NET
languages. It will be interesting to see how it goes in the future. Personally I have
no strong preference to choose among the three languages because they all have
similar features, such as object-oriented programming style, code reuse and
Two databases have been used for this application. I would definitely
choose SQL 2000 over MySQL. SQL 2000 has better performance than MySQL
11. and it has more features. The features comparison has been presented at my
Unfortunately, the performance test setup is very simple due to
insufficient time. The performance result is disputable due to limitations analyzed
in this report. It’s a large amount of work to setup three web applications and
write in three different languages for three working e-commerce shopping carts.
To get better performance results, I recommend production environment
hardware, such as 3.4GHZ CPU, 1-2Gbytes RAM. A large amount of data, such
as more than one hundred Mega bytes, would give more accurate performance
results for database transactions. Instead of writing a shopping cart, limit the
coding to product display, product search and user registration. This will give
more time to optimize the coding and conduct performance testing. I believe this
project could be a good starting point to further look into web applications in
Whitehead, Paul. Active Server Pages 3.0. IDG Books Worldwide, 2000.
Rolsky, Dave and Williams, Ken. Embedding Perl in HTML with Mason. O’Reilly,
Deitel, H.M., Deitel, P.J., and Goldberg, A.B. Internet & World Wide Web: How to
Program. Pearson Education, 2004.
Steelman, Andrea and Murach, Joel. Murach’s Java Servlets and JSP. Murach, 2003.
Hunter, Jason and Crawford, William. Java Servlet Programming. O’Reilly, 1998.
Nielsen, Paul. Microsoft SQL Server 2000 Bible. Wiley, 2003.
Wainwright, Peter. Professional Apache. Wrox, 1999.
Goodwill, James. Developing Java Servlets. Sams, 1999.
Dubois, Paul. MySQL. Sams, 2003.
Bekman, Stas; Cholet, Eric. Practical mod_perl. O’Reilly 2003
Meyne, Hank and Davis, Scott. Developing Web Applications with ASP.NET and C#.
12. Ruvalcaba, Zak. ASP.NET Website Using C# & VB.NET. Sitepoint, 2004.
Java vs. PERL
Java, c++, PERL
.NET vs. J2EE
Apache vs. IIS
Window vs. Linux
Appendix A. Functions
13. Each application has its own codes for each functionality.
1. product display
2. product quick search
3. product advanced search
4. shopping cart
Appendix B. Database Schema Definitions
CREATE TABLE [dbo].[Order_Items] (
[Order_Item_ID] [int] IDENTITY (1, 1) NOT NULL ,
[Order_ID] [int] NOT NULL ,
[Item_ID] [int] NOT NULL ,
[Category_ID] [int] NOT NULL ,
[Description] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,
[PricePerUnit] [money] NOT NULL ,
[Quantity] [int] NOT NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[Orders] (
[Order_ID] [int] IDENTITY (1, 1) NOT NULL ,
[Shopper_ID] [int] NOT NULL ,
[Total_Cost] [money] NOT NULL ,
[Shipping_Cost] [money] NOT NULL ,
[Sales_Tax] [money] NOT NULL ,