Acknowledgements

I would like to thank the following people for their contribution to this research project:

§ My supervisors, Dr George Wells and Dr Greg Foster, for their support, guidance, and advice.

§ My team member, Farisai Mabvudza. I thank him very much for his help and support throughout the year and most importantly, for his friendship.

§ The lecturing staff of the Computer Science Department for always being approachable.

§ The Honours class of 2002 for their friendship and help.

§ My parents for their everlasting support.

§ And most importantly of all, I would like to thank God for everything in my life.

Abstract

E-commerce is one of the major concerns playing on the minds of business individuals the world over. Inspired by the success of mass-market on-line e-commerce sites such as Amazon.com, this report presents a feasibility study into developing such a site at an institutional level.

An analysis of the various technologies used and investigated includes Java, JSP, JDBC and the Apache Tomcat web server. The objective of the analysis is to determine the benefits of using these technologies towards the development of e-commerce endeavours. The deployment of an Internet based webshop application, which facilitates the sales of memorabilia; named RUM (Rhodes University Memorabilia) was developed and implemented. In this report both the physical and the logical component elements of RUM are explored so as to provide an insight into the inherent problems of creating such a system, as well as the overriding benefits derived from the creation of such a system.


Contents


CHAPTER 1 – Introduction 1

1.1 An Introduction to E - commerce 1

1.2 Advantages of E - commerce 2

1.3 The Project 3

1.3.1 Motivation 3

1.3.2 Objectives 4

1.3.3 Scope 4

1.3.4 Division of Work 4

1.3.5 Deliverables 5

1.3.6 Thesis Overview 6

CHAPTER 2 – The Design of RUM and its Architecture 7

2.1 Designing for Scalability 7

2.1.1 Analysing Web Application Requirements 7

2.1.2 Determining Web Application Functionality 8

2.1.3 Choosing Web Architecture 8

2.1.4 Designing the Web Application 8

2.1.5 Conclusion 9

2.2 The RUM Infrastructure 9

2.2.1 A Brief Overview 9

2.2.2 Limitations of the 2-tier Architecture 9

2.2.3 Greater Flexibility with the n-tier Architecture 10

2.2.4 Maximum Efficiency with the 3-tier Architecture 10

2.2.4.1 The 3-Tiered Approach 12

2.3 Technologies used in the implementation of RUM 13

2.3.1 .NET vs. J2EE 13

2.3.2 Java 15

CHAPTER 3 – THE Client Tier (Front-end) 17

3.1 Architectural Approaches for Web Design 17

3.1.1 Servlet Centric Approach 17

3.1.2 Page Centric Approach 18

3.1.2.1 Page View Design 19

3.1.2.2 Page View with Bean 20

3.2 The Thin Client Approach 21

3.2.1 Thin Client versus Thick Client 21

3.2.1.1 Performance 22

3.2.1.2 Maintenance and Cost 22

3.2.1.3 Resource Requirements 23

3.3 Applets versus Form Elements 23

3.4 Design of Visual Content 24

3.5 Discrepancies between Netscape Navigator and Internet Explorer 27

3.5.1 RUM’s Multi-Platform Compatibility Problems - Web Page Cosmetics 27

3.5.2 Web Page Scripting 29

3.6 Technologies used in the RUM Client Tier 29

3.6.1 Browser 29

3.6.2 Hypertext Mark-up Language (HTML) & Cascading Style Sheets (CSS) 29

3.6.3 JavaScript 30

CHAPTER 4 – Application Server Tier (Middle tier) 32

4.1 Session Tracking 32

4.2 Security in RUM using SSL 33

4.3 Technologies used in the RUM Application Server Tier 33

4.3.1 JavaServer Pages (JSPs) 33

4.3.1.1 Advantages of JSPs 34

4.3.1.2 JSP Vs. Common Gateway Interface (CGI) 35

4.3.1.3 JSP Vs PHP Hypertext Pre-processor 35

4.3.1.4 JSP Vs. Active Server Pages (ASP) / ASP.NET 35

4.3.1.5 JSP Vs. Pure Servlets 35

4.3.1.6 JSP Vs. Server-Side Includes (SSI) 36

4.3.1.7 JSP Vs. JavaScript 36

4.3.1.8 JSP Vs. Static HTML 36

4.3.2 JSP Tags 36

4.3.2.1 Declarations 37

4.3.2.2 Scriptlets 37

4.3.2.3 Expressions 38

4.3.2.4 Directives 38

4.3.2.5 Comments 39

4.3.2.6 Actions 39

4.3.2.7 JSPs and Enterprise JavaBeans (EJBs) 40

4.3.2.8 jsp:useBean Tag 41

4.3.2.9 jsp:setProperty Tag 41

4.3.2.10 Jsp:getProperty Tag 42

4.3.3 The Web Server 42

4.3.3.1 Apache Tomcat Web Server 43

4.3.3.2 How JSP Requests are handled by the Tomcat Web Server 44

4.3.4 JavaMail 44

CHAPTER 5 – Data Tier (Back-end) 46

5.1 Technologies used in the RUM Data Tier 46

5.1.1 Microsoft Access Database (MS Access) 46

5.1.2 Structured Query Language (SQL) 46

5.1.3 The Java Database Connectivity (JDBC) and the JDBC Driver 47

CHAPTER 6 – The Practical Implementation of RUM 49

6.1 The RUM Infrastructure 49

6.1.1 Client tier 49

6.1.2 The Middle Tier 50

6.1.3 Data Tier 50

6.1.4 The Interaction between the three tiers 51

6.2 The Design of the RUM Website 51

6.2.1 Flow Diagram showing a user’s typical shopping process traversal in RUM 52

6.2.2 RUM’s Design Concepts 53

6.2.3 Logging into RUM 54

6.2.3.1 Registering as a new user 55

6.2.3.2 Existing user logging into RUM 57

6.2.3.3 Forgotten password 59

6.2.4 Product Categories - Stationery 59

6.2.4 Checkout Process - Shopping Cart 62

6.2.5 Checkout Process - Shipping Details 64

6.2.6 Checkout Process - Delivery Details 65

6.2.7 Checkout Process - Payment Details 66

6.2.8 Checkout Process - Confirmation Details 67

6.2.9 The Context Sensitive Help System 70

6.2.10 Logging out of RUM 72

6.2.11 Security in RUM using SSL 72

6.2.12 An Overview of the JavaBeans used in RUM 73

6.2.12.1 ConnectionBean 73

6.2.12.2 CountryBean 73

6.2.12.3 CustomerBean 73

6.2.12.4 EmailBean 74

6.2.12.5 OrderBean 74

6.2.12.6 ShoppingCart 74

6.2.12.7 ProductBean 74

6.2.12.8 ProductDisplay 74

6.2.12.9 SearchBean 75

6.2.12.10 Result 75

6.2.12.11 ValidationBean 75

6.3 Implementation Problems 75

CHAPTER 7 – Conclusion and Possible Enhancements 77

7.1 Conclusion 77

7.2 Possible Enhancements 77

7.2.1 Automatic Stock Control 77

7.2.2 Implementing Connection Pooling 78

7.2.3 Implementation of real time credit card transaction processing 78

7.2.4 Dynamic recommendations 78

References 79

Appendix A : RUM’S File Hierarchy 82

Appendix B : Installing and Configuring RUM under Windows 83

1. Copying the Files 83

2. Setting up the Environment Variables 84

3. Configuring RUM 84

Appendix C : Glossary 86

RUM Poster 92


CHAPTER 1 – Introduction

1.1 An Introduction to E - commerce

The Internet is not a ‘faddish technology’. It is a new communications platform, which can connect people and organizations together in any way the individual components require. The Internet will twist, turn, re-evaluate, and re-engineer every single logistic process that affects our lives [Reynolds, 2000].

“E-commerce can be defined as the attainment of a business vision supported by advanced information technology to improve efficiency and effectiveness within the trading process” [Wayner, 1997]. In its simplest form, it allows a product catalogue to be hosted on a web server so that potential customers can visit the site, see what is on offer and then place orders. Amazon.com [www.amazon.com] is the leader of this industry. It is famous for bringing the concept of e-commerce into the mainstream. It epitomizes e-commerce survival and is arguably one of the most famous retailers [Reynolds, 2000].

E-commerce is changing rapidly, and its trends can come and go just as quickly. Stipp [2001] states the point that “the recent decline of new media stocks, the demise of dot-com companies, and the slow growth of the Internet as advertising medium have raised questions about the future of the new medium, especially as a viable business. Analysts have also revised their optimistic projections and are forecasting much slower growth than anticipated just a year ago”.

However, despite the setbacks e-commerce is still surviving (Figure 1.1).

1.2 Advantages of E - commerce

Online shopping offers many advantages for webshop owners and customers:

Advantages to a webshop owner:

§ The owner is able to sell to any country over the world.

§ Customers chooses products on their own and orders via email or by form submission, thus cutting costs for the owner.

§ Always up to date - products and prices can be easily maintained and can be up to date.

§ Easy maintenance - updates are easily done.

§ Number of products - thousands of products can be offered without much more costs.

§ Product categories - you can freely define any number of product categories and subcategories.

§ Orders - all orders and communication takes place via email.

Advantages to a customer:

§ User-friendly interaction.

§ Customers are able to shop around the clock without leaving the house.

§ Secure transactions via a secure server. Payments can be made via credit card.

§ User profile - customers have the possibility to generate an individual profile.

§ Confirmation via email - immediately after ordering the customers receive an email confirmation about the order.

It is known that a major shift towards e-commerce is happening, so all that has to be done is to work out how to make the most of this wealth of new opportunity [Reynolds, 2000]. Successful on-line shops are usually large-scale commercial endeavours. The implementation of such a system outside the arena of well-known e-commerce businesses such as Amazon.com [www.amazon.com] is feasible, beneficial and practically achievable. The author will attempt to enlighten this fact with the implementation of an innovative online webshop known as RUM (Rhodes University Memorabilia).

1.3 The Project

1.3.1 Motivation

At present, memorabilia at Rhodes University is currently being bought by means of traditional purchasing methods. A catalogue with photographs and a brief description of the various memorabilia available for sale is sent to all Rhodes alumni. The order form enclosed within the catalogue is then completed by the customer and sent to the Alumni Department at Rhodes via the postal service or it is delivered physically. Obviously there are various problems inherent with this method of service.

Firstly, there is a chance that the catalogue may never reach the respective alumni, due to alterations of their postal address or, because of the unreliable postal services. The mail may never reach its destination. Secondly, brochures need to be reproduced when prices change or when new products are made available. Thirdly, it is naturally unsafe to send credit card information via postal services, as there is a likelihood of the postal mail being intercepted by malicious individuals. Fourthly, communication, whether due to erroneous orders, or merely additional inquiries between the two parties is expensive and also is prolonged, as the customers have to wait for their orders to reach the university before they are processed. Finally, customers do not get instant feedback and so are not aware of their order status.

Existing students can only purchase memorabilia during the Alumni department’s office hours. Moreover, promotion of memorabilia at Rhodes occurs through ‘word of mouth’ and so is not prominent. There is a need for the Alumni Department to effectively let prospective customers know about the memorabilia available for sale, and at the same time resolve the other issues mentioned above.

The solution to this is an online shop for the purchase of memorabilia. The webshop, which would be available at any time, will potentially attract the attention of existing Rhodes students and alumni, who are currently unaware about this service. They will be able to shop from the comfort of their homes and can efficiently search the central repository of memorabilia available, locate the exact item that they are looking for and purchase it online via a secure server.

1.3.2 Objectives

There are two primary objectives to this project. The first objective is the deployment of a Internet based application for the sale of memorabilia. It has been built using the latest web technologies, with Java Server Pages (JSPs) as the main underlying technology in order to rapidly develop and easily maintain, information-rich, dynamic web pages. The second objective is this research report detailing the results of the investigation of Java related technologies that are used in the development of the above-mentioned system.

Customers interact with the system using an interface accessible via the Internet. They can register with the system resulting in the creation of their user profile, which they can alter at any time. Thereafter, they can browse the central repository of memorabilia available by category or using the search engine provided. Purchases can then be made by following each of the steps involved in the checkout process, which assures that personal details are handled with the utmost security via a secure Apache Tomcat web server. The order information is then emailed to the Alumni Department for processing and customers also receive an email confirming their order. The prototype system will from hereon be referred to as RUM, an acronym for Rhodes University Memorabilia.

1.3.3 Scope

RUM’s functionality is very similar to that of famous webshops like Amazon.com. The developers have not explored issues such dynamic recommendations of products to enforce customer relationships by means of advertising and marketing memorabilia. Automatic stock control matters and connection pooling are also not focused on. Since RUM is not required to be as large and complex as Amazon.com, the above-mentioned features have not been implemented as they are beyond the scope of this project and have not been highlighted explicitly, except as possible future enhancements of the system. Section 8.1.4 consists of a detailed description of the possible enhancements that can be made to this system.

1.3.4 Division of Work

By working in a team, a solution can often be reached quicker and with more efficient results than working alone as there is a larger pool of ideas and solutions available to choose from. Two heads are better than one when it comes to finding the best solution. Since this project is a small to medium scale e-commerce endeavour, which cannot be completed by a single person in the time allotted, the author has decided to work with another individual to find the best solution to this project. The division of work for the project is highlighted below. It must be noted that a number of tasks have overlapped throughout the duration of this project; hence, a clear division of work could not be allotted, so certain tasks had to be undertaken by both members of the team.

The Author (Uma Rudraraju) : Front-end

§ Development of RUM user interface using Hyper-Text Mark-up Language (HTML), Cascading Style Sheets (CSS), JavaScript and Java Server Pages (JSP).

§ Form Validation and Error Handling.

§ Context sensitive help system.

§ Development of the supporting JavaBeans for the above tasks.

§ Documentation for the above mentioned tasks of the project.

Team Member (Farisai Mabvudza) : Back-end

§ Database setup and validation.

§ Linking the RUM interface to database using Java Database Connectivity (JDBC) and the Tomcat web server.

§ Implementation of security features into RUM.

§ Product search engine.

§ Development of the supporting JavaBeans for the above tasks.

§ Documentation for the above mentioned tasks of the project.

1.3.5 Deliverables

The primary deliverable is this research report, which highlights the design and implementation concerns pertinent to the functionality of this system, which can also be used in the future to assist in the deployment of a dynamic, database-driven web site environment. Additionally, the development of RUM, a small to medium scaled e-commerce application for use by anyone intending to purchase memorabilia from Rhodes University through the Internet.