Beruflich Dokumente
Kultur Dokumente
The candidate confirms that the work submitted is their own and the appropriate credit has been given where reference
has been made to the work of others.
I understand that failure to attribute material which is obtained from another source may be considered as plagiarism.
(Signature of student)_____________________________________________
SUMMARY
The aim of this project was to produce an interactive web application that could be used
by ZEYA import & export Business Company to help with the management of the
contract data and simplify the process of generating a contract.
Usability was a central focus of the project as the application needed to be easy to set up
and maintain by users with little or no technical expertise. Research into different
development methodologies identified the Rapid Application Development as the most
suitable development model to follow throughout the development.
For precisely requirement analysis and get the best evaluation of the web application,
users are highly involved into the development process. In another words, this web
application is made from the feed back of the users.
ACKNOWLEDGEMENTS
I would firstly like to thank my Supervisor DR Raymond S K Kwan for his time commitments
and guidance throughout this project. The guidance was extremely valuable and has had a
significant impact on the quality of this report.
The same, I would like to thank my Assessor Dr PM Hill for her productive feedback from the
mid-project report. The feedback really opened my eyes to the extensive work required to achieve
a good mark and motivated me to put more time and effort into this project.
I would also like to thank the customers of the company who involved throughout the
development for their participation and the enthusiasm they showed for this project.
A final thank you goes to my room mate Sanjeeva, who helps me for checking my English
spelling and structure with in this project
Catalogue
SUMMARY......................................................................................................................................2
ACKNOWLEDGEMENTS .............................................................................................................3
PROJECT TITLE: ..........................................................................................................................6
PROBLEM INDENTIFICATION: .................................................................................................6
CHAPTER 1 PROJECT INTRODUCTION ..................................................................................7
1.1 Aim:.....................................................................................................................................7
1.2 objectives: ...........................................................................................................................7
1.3 minimum requirements:.....................................................................................................7
1.4 Time Schedules: ..................................................................................................................8
1.5 Relevance to degree program:............................................................................................9
1.6 Methodologies:..................................................................................................................10
CHAPTER 2 background reading ................................................................................................11
2.1 Introduction:.....................................................................................................................11
2.2 researching related existing products: .............................................................................11
2.3 development tools: ............................................................................................................12
2.3.1 JavaScript: .............................................................................................................12
2.3.2 Pre Hypertext Processor (PHP) .............................. Error! Bookmark not defined.
2.3.3 ASP .........................................................................................................................12
2.3.4 JSP..........................................................................................................................13
2.4 Database............................................................................................................................13
2.4.1 MySQL database....................................................................................................13
2.4.2 PostgreSQL ............................................................................................................14
2.4.3. MS SQL Server .....................................................................................................14
2.5 Web server........................................................................................................................14
2.6 MY CHOICE: JSP + MYSQL + apache..........................................................................14
2.7 Database structure............................................................................................................15
2.8 Usability ............................................................................................................................16
CHAPTER 3 Methodologies analysis ............................................................................................17
3.1 INTRODUCTION ............................................................................................................17
3.2 Project management .........................................................................................................17
3.2.1 Rapid Application Development: ..................................................................................18
3.2.2 Evolutionary Development .............................................. Error! Bookmark not defined.
3.2.3 Prototyping ....................................................................................................................19
3.3 Chosen Methodology ........................................................................................................19
Chapter 4 Analysis .........................................................................................................................21
4.1 Introduction:.....................................................................................................................21
4.2 processes of generating an import & export business contract: ......................................21
4.3 The current inconveniences within the processes of generating the contract. ................22
4.4 Functional requirements ..................................................................................................23
4.5 Non-functional requirements ...........................................................................................23
4.6 Additional requirement in the feed back from the customer interview: .........................23
4.7 Use case and the class structure analysis: ........................................................................24
4.8 Threat analysis: ................................................................................................................24
4.8.1 Security development approach.............................................................................24
4.8.2 The security problem from the customer requirement. ........................................25
4.8.3 Vulnerability: SQL injection .................................................................................25
4.9 Conclusion ........................................................................................................................25
Chapter 5 Design............................................................................................................................26
5.1 Introduction......................................................................................................................26
5.2 Data...................................................................................................................................26
5.2.1 Database Schema ...........................................................................................................26
5.2.2 ER-Diagram...................................................................................................................28
5.3 Form Design......................................................................................................................30
5.4 Web interface for contract generator...............................................................................30
5.5 The administrator interface .............................................................................................31
5.6 The process of generate the contract................................................................................32
Chapter 6 Implementation.............................................................................................................33
6.1 Introduction:.....................................................................................................................33
6.2 interface ............................................................................................................................33
6.3 Database connection .........................................................................................................34
6.4 List Products.....................................................................................................................36
6.5 SECURITY .......................................................................................................................38
6.6 User manual......................................................................................................................39
CHAPTER 7 EVALUATION.........................................................................................................40
7.1 Introduction ......................................................................................................................40
7.2 Testing group ....................................................................................................................40
7.3 Effectiveness of testing......................................................................................................40
7.4 meeting user requirement.................................................................................................41
7.4.1 Functional requirement .........................................................................................41
7.4.2 Un-functional requirement ....................................................................................42
7.4.3 Additional requirement from the customer. ..........................................................43
7.5 meet the minimum requirement.......................................................................................43
7.6 Effectiveness of methodology ...........................................................................................44
7.7 Time management and schedule ......................................................................................45
7.8 Possible improvements .....................................................................................................45
Chapter 8 Summary.......................................................................................................................47
References ......................................................................................................................................47
PROJECT TITLE:
Web based contract generating application for ZEYA Import & Export Company
PROBLEM INDENTIFICATION:
At the present time, information management and dissemination is an important issue for all
business and organization. The World Wide Web has revolutionized how information is managed
and distributed by providing an on line portal to share information. Most of the Business
especially the long distance business such as Import& export business around the world has
already taken advantage of this. In order to gain the most chance to business, they are putting
their products on the web page; list their company web site link at the top of the search engine
and commercial web site as many as possible.
However, for some small company, with the more and more business they get, generating contract
is becoming a serious problem and a main factor to constraint the companys evolution.
According to the work experience I gained from the ZEYA Company, generating a contract is a
very complicated, reduplicative and boring process. It is also the most important and rigorous
processes in the whole business. A single mistake (like a digit in the price) may bring a significant
financial loss. It usually takes considerable time to generate the contact by their general process
which may limit the amount of business that this company capable to handle at the same time,
and even more badly, it is easy to make mistake.
Therefore, I believe that a web application would improve this situation and enlarge the business
opportunity.
1.2 objectives:
1. Research the current processes of generating the overseas business contract with the
company manager.
2. Research and discuss the problem and inconvenience of going through these business
processes.
3. Research and choose a development methodology to follow.
4. Establish a list of user requirements for how to improve this process.
5. Research the need for a web application amongst generating a contract
6. Design a web based application to incorporate the requirements of the user.
7. To implement the web based application design for ZEYA Import & export CO.LTD.
8. Evaluate the application in terms of usability and meeting the user requirements.
Further research and work to be carried out on this project, time permitting may
Include:
Dates
Task
Milestones
10-10-06 -
21-10-06
Requirements
22-10-06 -
Background Reading
27-11-06
22-10-06 -
Background Reading
Summary section
Summary section
Methodologies
Methodologies section
Submit 09-12-06
27-11-06
14-11-06 27-11-06
28-11-06 09-12-06
10-12-06 - 22-01-07
23-01-07 -
Requirements Analysis
Report
Design of solution
Design section
20-02-07 -
Implementation of
Implementation section
09-04-07
deliverable product
05-02-07
30-01-07 05-03-07
06-03-07 -
Progress meeting
Submit 17-03-07
User testing of
19-03-07
10-04-07 -
16-04-07
solution
03-04-07 -
Evaluation
Evaluation section
30-04-07
Collate and write the report
Submit 03-05-06
The above table shows the final project schedule. I split the project up into a series of small
sections and specify time periods for each section to commence and finish. This schedule is
affected by the coursework and examination tasks. But fortunately, the time schedule hasnt been
changed for collision.
Also, the time schedule considered about my final year schedule, and I was trying to make it even
and reasonable. For instance I decided that I would spend more time in semester two on the
project than semester one (Will Design and implement and evaluate the whole web application on
semester two) because I have only 3 module to finish at semester two but 5 in semester one.
Another thing is I left a gap in the development of this project over the Christmas period to
review for 5 examinations at the beginning of January. The work then recommenced after these
examinations.
This project would not only utilize the skills learnt from this university but expand this
knowledge to include interactive features.
1.6 Methodologies:
According to the background reading about the project methodologies, RAD will be the main
methodology of this project and prototyping will also be used in some of the key processes.
10
Exporting business
products
Dog chew
Dog chew
Amount
1 pack
20,000 pack
Kind
20
Yes
NO
Total price
1 pound
16050 pound
Size
1 delivery box
2 container
Yes
No
Some time
11
frequently
According to this form, the differences between the import & export business and the E-bay are
quite clear. The trading products in e-bay usually have a constant feature and trade with small
amount. Therefore, a general trading platform can be created and applied to trade almost all kinds
of products. However, import & export business is usually trading a large amount of products,
and each product is made to base on the customer requirement. As the result, in order to meet all
the customers requirements and be truly useful to deal with the problems, the contract generator
has to be personal.
2.3.3 ASP
Active server pages (ASP), it is a technology that enables user to make dynamic and interactive
web pages. ASP uses server-side scripting to dynamically produce web pages that are not affected
by the type of browser the web site visitor is using. The building language of ASP is VBScript,
although user can still use other scripting language such like Jscript (Microsofts version of
JavaScript).
12
The extension of the ASP page is .asp instead of .html. When the ASP page is requested by a
browser, the web server knows to interpret any ASP code contained within the web page before
sending the HTML to the Brower. By this way, all the ASP code is running on the web server and
none of them will ever be passed to the web browser. Which mean any web pages containing ASP
can not be run by just simply opening the page in the web browser. The page must be requested
through a web server that supports ASP. As the result, ASP web pages is very efficient to execute
and no client-side constraints. Besides, it provides security as ASP code cannot be viewed from the
browser and clever ASP programming can reduce network traffic.
The biggest drawback of ASP is that, it runs most under windows servers that is much expensive
and ASP is not really a good choice if cross-platform compatibility is required unless you have 3rd
part software.
2.3.4 JSP
In response to ASP, Sun Microsystems gave the world Java Server Pages (JSP). Obviously, it is
entirely based in java programming language, supports the same modularity, reusability,
platform-independence, and access to java APIs as Java. Therefore it offers developers the
advantages of developing in java in a more relaxed script-like environment. Unlike ASP which
relies primarily on Microsoft technology, JSP is designed to be platform and server independent
(support any web server, including Apache, Netscape and IIS), created from a broader community
of tool, server, and database vendors.
JSP is efficient, convenient (server engines typically have build-in infrastructures to handle
parsing/decoding HTML from data, reading/setting HTTP headers, session tracking),
portable( write once, it can be run anywhere through the server) and free.
There are two main disadvantages of it:
1. Need for a server engine.
2. high learning curve: need the java skills( since I am learning java, so it is not a problem for
me )
2.4 Database
13
2.4.2 PostgreSQL
According to the experience I had in sy23 with using prostgreAQL, it is difficult to me to use than
MySQL and it is slower. It is an open source, platform independent database management system
similar to MySQL, but less widely used. It is designed for large databases and includes more
advanced features than MySQL such as the use of triggers.
Apache:
A public-domain open source web server, which is developed based on the NCSA http web server
at 1995. Apache is now maintained by an open community of developers and it is free. It is the
server that used in the exercise of the school computing, and I had a lot of experience from the
coursework associate with it.
14
server, however it is not free software, and I may be able to use it out of the university, I decide to
use MYSQL database instead.
Besides, I personally had some experience with java, java script and JSP languages, and all these
languages and ,MYSQL software have already been well installed in the school of computing
computers. There for, choosing them will save a lot of time for me to install and get use to them, so
that the total project time can be saved. Time is money, which means the cost of the development
can be reduced as well.
It maps well to the relational model. The constructs used in the ER model can easily be
transformed into relational tables.
It is simple and easy to understand with a minimum of training. Therefore, the model can
be used by the database designer to communicate the design to the end user.
In addition, the model can be used as a design plan by the database developer to implement
a data model in specific database management software.
15
Subtypes entities are used in generalization hierarchies to represent a subset of instances of their
parent entity, called the super type, but which have attributes or relationships that apply only to the
subset.
There are three types of relationship that can be modelled: one-to-one (1:1); one- to- many (1: M);
and many-to-many (N: M). A 1:1 relationship is where one instance of an entity relates to exactly
one instance of another entity. A 1: M relationship means an instance of one entity can relate to
multiple instances of another entity. A N: M relationship (many to many relationship) means
multiple instance of one entity can be relate to multiple instances of another entity.
In this project, a single product can be sold in many contracts; conversely, a single contract can
contain many products. Here the cardinality for the relationship between contract and product is M,
and the cardinality between product and contract is N. Many-to-many relationships cannot be
directly translated to relational tables but instead must be transformed into two or more
one-to-many relationships using associative entities. As the reason, there would be some
associative entities created in my database system in order to deal with the many to many
relationships.
Also, the database needs to be normalized, in order to get the precise structure and increase the
database reaction speed. Normalisation is to say that if the same field was stored in two tables, we
might forget to update the data in both tables. Therefore, in a database with out normalization,
when the table of data are increasing by the future requirement, it will cost a lot of time and money
to change a single field. Esen Ozkaran states that normalization should be a reversible process to
maintain consistency, so that if you return to the original form of the database you can do so
without losing or altering any data.
2.8 Usability
As the interface is a part of my project and it is the middle ware that links the customer with the
application, usability is an important factor that has to be well considered. The importance of
usability should not be underestimated in what is becoming an increasingly competitive business
environment. If a user can not effectively operate your website they will simply stop using it. The
knowledge of increasing the usability of my interface would be based on my study from the GI11.
16
Methodology is collection of procedures, techniques, tools and documentation aids which will
help system developers in their effort to produce a new information system said by Sha Avison.
Without using methodology, system is often poorly designed and hard be accepted by the users.
Also, it is difficult to estimate project completion dates and software development projects almost
always overran. Methodologies provide a more systematic approach to software development. It
helps developer defining task more clearly and offering a greater management for controlling the
project. With it help, developer would avoid waste and schedule overruns.
As the result, this project will also follow a methodology and all the methodologies will be
studied and compared in order to find the best methodology for my project.
Iterative Development :
The activities are interleaved. An initial system is developed rapidly from high
level specifications. This is refined, with customer input, in subsequent iterations.
Component Based
It Assumes use of some pre-built components, development focuses on architecture and
integration of components rather than building from scratch.
17
However, there is no one methodology fit for all the software development, based on the
following reasons, it has to be flexible:
Each methodology has their own advantages and disadvantages under conditions.
The advantages and disadvantages of some relative methodologies are researched and reported as
follow:
Compare this new approach to the normal waterfall model, it requires faster speed of
development and increased quality. The speed increases can be achieved using a variety of
methods including, rapid prototyping, virtualization of system related routines, the use of CASE
tool and other techniques. The system is divided up into a number of components or time boxes
that are developed separately. Time boxes basically specify a development start time and end time.
Within each of these time boxes functionality is added to the system very quickly until the end of
the time box is reached, which cannot be extended nor additional resources allocated. The first time
box will therefore implement all the high level user requirements first to ensure the main
functionality of the system is implemented. The second and third time boxes will then proceed to
implement lower and more detailed user requirement. About The quality, as defined by RAD, is
18
both the degree to which a delivered application meets the needs of users as well as the degree to
which a delivered system has low maintenance costs. RAD increases quality through the
involvement of the user in the analysis and design stages. Some systems also deliver advantages
of interoperability, extensibility, and portability.
But, every thing has two aspects. RAD reduced Scalability, and reduced features. Reduced
scalability occurs because a RAD developed application starts as a prototype and evolves into a
finished application; reduced features occur due to time boxing, because the implementation of
the time boxing can not be extended, features are pushed to later versions or discarded in order to
finish a release in a short amount of time.
3.2.3 Prototyping
Compare with waterfall approach, Prototyping involves the user more than the Waterfall model and
like the Evolutionary Development and RAD it also allows for changes in requirements, thus
reducing the projects risk of failure.
Usually developer will provide number of prototypes to let the user comment on, and then enhance
the one they like the best.
This approach indeed dramatically reduces the risk of getting the requirement wrong, but while
that, the develop time will be wasted by implementing things that user decide not to use.
Obviously the advantages of this approach are user is involved more during the development, and it
is easy to gain the trust from the customer. However its drawbacks are also significant. Because
there are no clearly defined stages management, it made more difficult to control the development
process and it could take some time for the user and developer to both agree on a set of
requirements. At what point would you need to say enough is enough and implement the system?
will become a confusing problem.
19
For these reasons, due to the time limit, the RAD with prototyping some key features to the
customer (e.g. interface) will be good structure to develop my project.
Iterative and in time feedback from the RAD will significantly reduce the project risk and lead the
project to fit the customer requirements mostly. Additionally, the development will also try to
utilize the advantages of prototyping by integrating it within the implementation stage of the
Waterfall model to receive feedback from the user on design and required functionality of the
system.
20
Chapter 4 Analysis
4.1 Introduction:
In the section2, the result of the background research which is carried out by the developer will be
discussed. The current approach of generating the import & export business contract will be
examined, highlighting any downfalls, and providing justifications regarding the production of a
new system. It investigates the users problem in greater depth and researches what constitute a
usable web based application. It also studies the requirements from some important customer of
ZEYA Import & export CO.LTD that may need to be special concerned with in building the
application.
1. After the overseas customer confirmed with the products they want, they will send an offer with:
a. Product_id;
b. Name of the product;
c. Product specification (which includes size, Wight, colour and special magnitude for each
product);
d. Packing information,
Packing of product: there are only limited kinds of packing: PVC bag+head; POLYBAG;
Printed bag; Blister pack; Opp bag+header; PE bag.
amount of carton
e. Unit price
f. Price condition: FOB SHANGHAI or CNF or CIF
g. Price
h. Minimum amount
The information will be reorganised into a contract structure by the employee in the company
21
2. After customer confirmed about all the information, they will sign a business contact with the
company and decide a contract_id.
3. Contract usually contains three pieces, which are:
Sale confirmation: contains all the product information, packing information and price
information.
Shipment: contains product information, amount, and quantity, price per pack and total
price for each product.
There will be a confirmation from the customhouse (which is not concerned by my project)
4.3 The current inconveniences within the processes of generating the contract.
1) After the sales person in ZEYA Import & export CO.LTD received the offer from customer),
they need to copy down all the information from the email/fax. And type them in to a excel file.
Usually, different customer has different type for sending offer, which means sales person needs
to spend a lot of time to find the right information from the offer and this kind of information
cant be learned from previous customer. As the result, the working time has been increased and
it is very hard and taking a long time for a new employee becomes an experience sales person.
2) Currently, company Discusses with customer about the detail on phone or through email.
However, there are enormous detail within each contract (e.g. changing in the price of the
products, the feature of the products, the amount and packing type, etc.), and even more badly,
these processes are iterative. Therefore, discussing it on phone will be an annoying work that the
sales person needs to talk with the customer on phone for long time and taking mass information.
Obviously, time is wasted and there is a great chance to make mistake. Email is also not a best
way to negotiate, as an asynchronous communication tools, it takes too long to finfish the
discussion and it is impossible to make sure that the customer received the emails on time,
nevertheless it is good for company to save it as evidence, and reduce the chance to make
mistake.
(3) Since the system of the company does not contain a database, the information is usually saved
22
in a folder which will be copied several times later and transfer to different computer as backup.
It caused a very low secure data protection and it is not easy to maintain.
(4)As customer is the god in a business, all the features of the products are flexible, so even a
single product from different customer may have variable features. For the good of the business,
it requires any new modification from the previous offer will be announced to both customer and
the sales person in the company as soon as possible. This problem will be discussed at the
database design section.
Easy to use
Secure
4.6 Additional requirement in the feed back from the customer interview:
Once the contract has been modified by either the customer himself or the
manager from the ZEYA Company, an email should be sent to notice the other
one
23
24
3: Test plans complete: data mutation and least privacy tests. Also do some external review :Use
tools such like splint to review the old defects, secure coding guidelines and test the check-in
functions and
4: code complete: security push: stand in the attackers aspect and try to attack the system.
5: ship: Security audit; learn and refine the system.
6 post ship
4.9 Conclusion
The incontinence of the current contract generating processes is cant be neglected, and
none of the existing web application could fully solve all the requirements from my
customer. According to the feed back from interviewing the company manager and the
key customers of this company, a comprehensive analysis about the features of the final
product has been studied.
25
Chapter 5 Design
5.1 Introduction
Followed the methodology I have chosen at the analyzing stage, I quickly designed a prototype,
which contains the screen shot of the web page, the description of some important features and
the core buttons would be put on the pages. Then I send them to the customers and the manager
of the ZEYA Company with a shot report attached to introduce how to use this web application
and the functions it has. (The initial design is in the appendix B). After that I modified and
improved my work according to the feed back I received from users and repeat the process again.
This section will document how to use the software I chose to design the web application and
integrate the interface with the database behind. In addition, the data base structure and some
additional functions designing will also be reported.
5.2 Data
The products data, customer details, and the contracts will be stored in a MYSQL database
because it is freely available (this has been discussed in the analysing part), compatible with
chosen language JSP and the tomcat server. In addition, since all the relative software has been
installed and well set on both LINUX and WINDOWS operation systems in the school of
computing desktops, MYSQL is very convenience to set up, and can be designed at any where in
my department. In order to determine the structure of the database, a data store which is fulfil the
customer requirements need to be firstly defined. An entity relational diagram could be used to
represent the comprehensive structure of the database after the creation of the table schemas to
outline the information to be stored. Off course, this database will also consider about the further
incoming details.
26
User( id varchar(15) not null, firstname varchar(15) not null, lastname varchar(15) not null,
tel_number1 varchar(30) not null, tel_number2 varchar (30), companyname varchar(50) not
null, country varchar (30) not null, address varchar(100) primary key (account_id))
Customer ( id varchar(15) not null, firstname varchar(15) not null, lastname varchar(15) not
null, tel_number1 varchar(30) not null, tel_number2 varchar (30), companyname varchar(50)
not null, country varchar (30) not null, address varchar(100) primary key (account_id))
Products (product_id varchar (15) not null, product_name varchar (30) not null,
productspecification blob, quantity varchar (15) not null, unitprice float not null, ctns float
not null, l float not null, w float not null, h float not null, gw float not null, primary key
( product_id))
Ccontract (order_id varchar (30) not null , telnumber varchar (30) not null, shippingDate
varchar (30) not null, from varchar(50) not null, to varchar (50) not null , insurance Boolean,
meansOfTransport varchar (50), dateOfFianlDesision date, primary key (order_id))
Pcontract (order_id varchar (30) not null, telnumber varchar (30) not null, shippingDate
varchar (30) not null, from varchar(50) not null, to varchar (50) not null , insurance Boolean,
meansOfTransport varchar (50), dateOfFianlDesision date, primary key (order_id))
Admin (username varchar (30) not null primary key, password varchar (30))
Each entity in the database should also have a unique identifier to identify specific instances of
each entity. In this example of the customer table this could be a customer_id because the web
application will check every input id and make sure that it is unique. This will help when using
SQL to query the database. An ER diagram also helps to model the relationship between each
entity
27
5.2.2 ER-Diagram
Base on the conception of the ER diagram we discussed in the chapter 2, the ER diagram below
shows the relationships between each entity in the project in detail:
Order_id
lastname
Order_id
insurance
id
id
lastname
id
firstname
Shipmentdat
e
firstname
user
Promote
to
c.contract
generate
Customer
Order_id
do
Saved as
sell
Controlled
by
product_id
admin
Log-in
id
products
p.contract
User_id
passowrd
passowrd
product_id
quality
ctns
28
29
The tables in the proposed database structure are related together through the use of the primary
keys and foreign keys, emphasised in the database schema. Each table in that database includes a
primary key to uniquely identify each record in the database. This is necessary as records can
have the same value for fields such as product_id. In order to form a relationship between two
tables the joining tables must also contain the primary key of the table it is forming a relationship
with. This key is usually referred to as a foreign key. Using primary keys and foreign keys in this
way will enforce referential integrity by ensuring no record can be added to a table unless the
foreign key in that relation points to a valid record in the other relation.
30
The above picture shows the main lay out design of the web site which contains the contract
generator. The company logo is placed clearly on the top left and the company name with some
graphics would be placed right of it. Web-site navigation is contained in a long bar that appear at
the top where blow the company name and given more emphasis by blending into the graphic.
Bottom navigation is created to hold links such as contract us and about us. In my project, in
order to follow the concepts of usability, all the pages have the same constant lay out. All the
information will be shown on the main content area and it has a fixed size so that it will not break
the web page architecture.
(A detailed design of those pages required to meet the generic set of user requirements are
contained in appendix F.)
5.5 The administrator interface
The administration interface is only intended for a limited number of users in control the content.
In this case, the manager from the ZEYA pet company is the only one administrator. Therefore,
the design of the layout would be as simple as possible and only emphasis on practicality.
31
The picture above is the main page of the administrator interface. Obviously, in order to
increase the usability, there are only buttons on the page which links to the main user
cases for the administrator.
(More administrator interfaces are described in the appendix F)
32
Chapter 6 Implementation
6.1 Introduction:
The implementation section of the project is the development of the designs produced
during the design phase, documented in section 5 above. By showing a series of screen
shots, code snippets and descriptions, this section will represent how to carry out the
design and makes the some of the key functions in the design part come true.
6.2 interface
JSP is just like java embedded in HTML, so that we can first develop the web page using
HTML skills and then integrate it with the java code and change the extension of the file
into .jsp
External .CSS
As we discussed in the analyzing part, CSS is the main technique to control the out put of
the web page. In order to unify the web page feature and the future development, I use
external CSS. External CSS is placing CSS in a separate file allows the web designer to
completely differentiate between content (html) and design (CSS). CSS code is saved
with a .css file extension, and then referenced in the HTML using the <link> instead of
<style>. By using external style sheet, designer can change the out put of all the pages by
modify one file.
These are part of my CSS file (business.css).
body {
background-color: #FFFFF0;
font-family: Arial, Verdana, sans-serif;
font-size: 18px;
color: #00008B;
}
a { font-family: Arial, Verdana, sans-serif; font-size: 18px; color: #483D8B; text-decoration:
underline}
a:hover { font-family: Arial, Verdana, sans-serif; font-size: 18px; color: #A52A2A;
background-color: #FAEBD7}
h1 { font-family: Arial, Verdana, sans-serif; font-size: 32px; color: #A52A2A }
h2 { font-family: Arial, Verdana, sans-serif; font-size: 24px; color: #A52A2A }
hr{ color:brown; background-color:tan; width:90%; height:2px; }
table {
font-family: Arial, Verdana, sans-serif;
font-size: 18px;
color: #00008B;
margin-top: 0px;
margin-right: 0px;
33
margin-bottom: 0px;
margin-left: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
.note {
font-family: Arial, Verdana, sans-serif;
font-size: 14px;
color: purple;
font-weight: bold;
}
Then, when need it, load it in the beginning of the html page.
<html>
<head>
<title>Document Title</title>
<link REL="StyleSheet" TYPE="text/css" HREF="business.css">
</head>
<body>
<h1 ALIGN="center">log-in </h1>
Then the log-in will met the style of h1 in the business.css file.
package com;
34
import java.sql.DriverManager;
import java.sql.SQLException;
import com.mysql.jdbc.*;
public class ConnectManager {
public static java.sql.Connection getConn() throws InstantiationException,
IllegalAccessException, ClassNotFoundException,SQLException{
String driverName="com.mysql.jdbc.Driver";
String userName="root";
String userPwd="txj999";
String dbName="business";
String tableName="user";
String
url="jdbc:mysql://localhost/"+dbName+"?user="+userName+"&password="+userPwd;
Class.forName("com.mysql.jdbc.Driver").newInstance();
java.sql.Connection conn=DriverManager.getConnection(url);
java.sql.Statement statement =conn.createStatement();
return conn;
}
}
This java bean represent how to connect to the database, it contains all the database information
such like the name of database driver, and username and password. It can be used at any time
when the web application needs to connect with the database. If the connection requirement (such
like the password) has been modified, we only need to change the code in the java bean.
The following jsp is an example to show how to use this java bean to connect the database:
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030" import="com.*" import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
35
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
</head>
<body>
<%
java.sql.Connection con=ConnectManager.getConn();
out.print("connection successed");
con.close();
%>
</body>
</html>
<%//code following are create a form header to describe the information would be shown in this column
%>
<tr>
<td align= center>product id</td><td align= center>product_name</td>
<td align= center>product_description</td>
<td align= center>price</td><td align= center>w</td>
<td align= center>l</td><td align= center>h</td>
<td align= center>packing type</td>
36
</tr>
<%
// save all the products detail into vector as cache
Vector vector = new Vector() ;
Vector=db_products.list_products();
Size=vector.size();
%>
<%
// load the products detail from the vector and display them in the browser
<for i = 0 ;I <vector.size() ; i ++)
{
products= (products ) vector.elementAt (i);
%>
<tr>
<td align=center><font size=2>
<% //print the information get from the database and place them in a form at a constant place
out.print(product.getProduct_id());%><.font></td>
<td align=center><font size=2>
<%out.print(product.getProduct_name());%><.font></td>
<td align=center><font size=2>
<%out.print(product.getProduct_description());%><.font></td>
<td align=center><font size=2>
<%out.print(product.getProduct_price());%><.font></td>
37
6.5 SECURITY
The basic one is to check if the users input username password is correct. So we use the
following bean to connect the database and check the input username and password with the one
stored in the database
Log-in bean
public class UserManager {
public static void checkuser(User user)throws Exception,SQLException{
java.sql.Connection conn=ConnectManager.getConn();
java.sql.Statement statement = conn.createStatement();
Statement stmt = null;
ResultSet rs = null;
try {
stmt = conn.createStatement();
rs = stmt.executeQuery("SELECT accountname FROM user where
name=\'"+user.accountName+"\' and password=");
// Now do something with the ResultSet ....
if ( rs!=null) {out.print username or password is incorrect}
}
finally {
if (rs != null) {
try {
rs.close();
} catch (SQLException sqlEx) { // ignore }
rs = null;
}
if (stmt != null) {
try {
stmt.close();
} catch (SQLException sqlEx) { // ignore }
stmt = null; }
38
Now, in order to avoid SQL injection we discussed in the analysis part, we need to improve the
code:
Instead of :
Connection con = (acquire Connection)
Statement stmt = con.createStatement();
rs = stmt.executeQuery("SELECT accountname FROM user where name= '" + userName + "';");
Use the following:
Connection con = (acquire Connection)
PreparedStatement pstmt = con.prepareStatement("SELECT * FROM users WHERE name = ? ");
pstmt.setString(1, accountName);
ResultSet rset = pstmt.executeQuery();
39
CHAPTER 7 EVALUATION
7.1 Introduction
In this chapter, it will describe the feed back from the testing of the solution and evaluate if it is
successful. It discusses the success of the solution in the meeting the user requirements and
usability principles. It will also evaluate the chosen methodology and the development process.
Additionally, this chapter will analyse how this project can be improved and some alternative
solutions.
For myself: test all the functions and the entire possible requirement.
For my friends: some prepared tasks have been given them one for each, and they tried to
carry out the task with out any help.
40
For the customer: free test, most of them chose to test it by creating a new contract with
realistic data.
In conclusion converging both testing groups worked extremely well as both gained useful results
that were similar thus making them more reliable and trustworthy.
After the sales person confirmed the offer, the well structured contract will be generated
automatically.
This function was achieved by using JSP. When the customer conformed the offer, the java code
embed inside the JSP will generate a contract form in a required A4 size automatically. The
architecture of the contract is constant, and it is given by the company manager. The content of
the contract will be based on the data that is loaded from the database.
The detail of the contract can be changed at any time before the final decision.
This was achieved by using the edit function in the customer main page. After the customer log
in the system successfully, there will be an option button on web page. By clicking this button,
customer will be required to select one current contract that need to be edit. And then all the
contract details will be loaded from database by JSP code and shown on the browser. After that,
41
customer is able to review and change any details of the contract, and all the changes will be
saved into the database and rewrite the previous data.
The entered details of the contract will be saved to the database after modification.
This was achieved by JSP code. The interface in linked with the MYSQL database, and once the
customer confirmed a modification, the data associates with it will be saved into the database.
If the product is selected by the same customer with similar features, the details of the
products will be generated automatically so the user would not take time to enter them
again.
This requirement hasnt been achieved in the final solution yet. According to my analysis, it
need to read the input from the interface instantly and saved into vector, and compare with the
data in the vector with the data in the database. If the data in the database is similar with the
data in the vector, then the program will list the similar product as an option for customer to
decide. If the customer accepted it, then all the details of the product will be loaded from the
database and placed into the interface. The implementation of it is quite complex, and I havent
found a good approach to solve it.
42
there is a clear guide on the web page to help user go through the process.
The conclusion of the customer feed back about the usability: The buttons for each function are
clearly placed on the interface. It takes only a little time for the user to get use to the application.
With the guide on the web page, the entire customer could finish the process of generating a
contract even for the first time.
Secure
This was achieved by the login checking. Besides, by following the security development
approach, some of the vulnerabilities have been avoided, such like the SQL injection.
7.4.3 Additional requirement from the customer.
Once the contract has been modified by either the customer himself or the manager from the
ZEYA Company, an email should be sent to notice the other one
This requirement hasnt been achieved. It requires a automatically email system that will send a email
to the related customer or manager of the company once the data of the contract ha been modified. I
havent found a feasible solution for it.
Alternatively, I created an email button on the web page, so that the user can send emails through it.
43
The methodology followed to develop a solution to the problem identified was the RAD
methodologies and allowed some changes in user requirements during the development.
The RAD model proved to be the correct development approach. With developing this project, I
have to study 7 other modules at the same time. As the result, I have to finish some course works
of these modules and this will interrupt my project development. By using RAD, I can quickly
finish some functions of my project and send to the customer for feed back, and I was able to do
the coursework while I was waiting for the customer feedback. With this short development life
cycle, I can manage my time more flexible. The decision to include iterative feedback proved
vital in the development process. Although there was no basic user requirement changes during
the development process, but I have got a lot of valuable suggestion about my web application
especially the interface from the customer. For example, the requirement that an email should be
send to notice the other side of the business right after the contract details is changed is one of my
customers suggestion. He made this suggestion after he looked at my prototype of the web
application. At last, this requirement has been agreed by the entire user and even the manager of
44
The final schedule allocates an extension of 2 weeks for the background reading and delays the
requirements gathering stage by 4 weeks. The reason for this change is because I arranged an
interview meeting with the key customer of the ZEYA Company in UK, in order to insure its
success, more preparation time were needed. To allow for these changes to take effect without
causing the delay of the mid report, research existing solution was allocated only 2 weeks
instead of the initial 4.
Although the project development did exactly follow the time schedule, however, it is helpful to
plan to design my project. At least, by using this time schedule, I havent waited until the very
last to rush the work.
Firstly, the improvements of this project would be achieving the unfinished functional
requirement: If the product is selected by the same customer with similar features, the
details of the products will be generated automatically so the user would not take time to
enter them again. And the additional requirement from the customer: Once the contract
has been modified by either the customer himself or the manager from the ZEYA
Company, an email should be sent to notice the other one.
Another improvement to the functionality would include allowing the user to do statistic of the
past contract. An example would be, by some simple processes, user can get a statistic about
whats the totally amount of dog chew they have traded with the ZEYA Company, or what is the
increasing percentage of the shipping prices.
The most important improvement for this web application would be adding a video talk function.
According to the research, the best way to negotiate business is talking face to face. However,
45
face to face talking is very difficult in long distance business. Therefore, enable to negotiate on
the video and decide the details of the contract through the current functions would be a great
improvement.
Finally, it would be very difficult for this web application to generate a different type of contract (for
example: computer business contract). With the development of the ZEYA Company, there will be
more types of import and export business trading operating. There fore, I would be a good idea to
Incorporate the list of generic requirements in to the web application produced for ZEYA Import
& export CO.LTD to make it customizable and appropriate for the needs of all types import and
export business company.
46
Chapter 8 Summary
The aim of this project is to reduce the contract generating time for ZEYA import &
export Company, and my project is a web application which is trying to achieve this goal.
The development focused primarily on the usability of such an application, under strict
usability guidelines, and the functionality needs of the user. It was recognized early in the
project that a usable solution must utilize a database to drive the content of the
application and that this must be updated through an online administration facility.
The contract generator are successfully met most of the user requirement and did
improved a lot of the contract generating efficiency. The user testing and evaluation of
the application did affect much for the improvements and expansion. The application
could be developed further to include additional functionality and allow the user greater
control, and then brings benefits for the business.
References
3. Brink, Tom, Gergle, Darren, Wood, Scott, (2002), Usability Evaluation, in:
Usability for the web: designing websites that work, pp. 405-441
4. Nielsen J, (1999), Site Design, in: Designing Web Usability, 1st ed, pp. 188-193
47
5. Holzschlag, Molly E, (1998), The Art if Interface, in: Web by Design: the complete
guide!, pp. 77-83, Sybex
ml [5 December 2005]
9. http://en.wikipedia.org/wiki
10. Jones, Russel, A, (2000), Behind the Scenes How Active Server Pages Work, in:
Mastering Active Server Pages 3, pp. 4-32, Sybex
12. Dubois, Paul, (2003), Migrating from Microsoft Access to MySQL, version 1.01,
http://www.kitebird.com/articles/access-migrate.html [6th December 2005]
14. Avison, David, Shah, Hanifa, (1997), Information System Development life cycle,
in: The Information Systems Development Life Cycle: A first course in Information
Systems, pp. 67-87, McGraw-Hill
15.www.wikipedia.org
16. Avison, David, Fitzgerald, Guy, (2002), Methodologies, in: Information Systems
Development, Methodology, Techniques and Tools, 3rd ed, pp. 347-433, McGraw-Hill
48
49
Personal reflection
Choosing a project title can be very difficult task. I believe that I was very lucky so that I can do
some thing I am interested in.
No matter how many excuse I found for myself and how tight time schedule I made at the very
beginning, I still left things after the mid mark. As the result, I had a busy second half term. The
professors who suggested us do the project in the front was right. I believe that if I do it everyday,
no matter it is 3hours or 20 minutes, the life for me in this semester would be much easier.
After finish the project, I have to say, RAD the chosen methodology was a right choice. The
process of it makes me well interacted with my customer.
Advice to new final year student
Because I have more modules to study at the first semester, I split the project into 30%/70%.
However, actually, it was not correct. I always find more things to research and study when I was
getting deep into this project. Therefore, to my opinion, 70%/30% is more reasonable. Because in
this way, you may save more time for unknown work (there must be a lot), and then you can have
a better time management for your final year project.
50
Appendix A
The project gantt-chart diagram of the time schedule
51
Appendix B Design
The architecture above shows how the initial design of the web application interface is. It has
been evaluated by the manager from the ZEYA Company, and acquired general acceptance.
Design2
52
logo
Advertisements
Bottom navigation
This is another initial design for the web application web page. Log in, account menu and
some products advertisements are placed at two sides. And the web-site navigation will
be placed along the top curve.
This design with a more fashion design was also agreed by the manager of the ZEYA
Company. How ever, it has been rejected by some of the main customer in UK.
According to the feed back from the customer, the reason they dont like it is that they
prefer something classic, so that they can even predict what contains in each section of
the web page.
53
Appendix C UML
All the UML has been done and sent to the manager from the ZEYA Company. I didnt
start coding and building up the database system before I received the feed back.
These diagram shows in detail that how this contract generator is structured and how it
will help the user go through the process.
54
This user case diagram shows the main user cases for the customer, and separates the user case by
different requirement level as we discuss in the analysis part.
Class diagram shows the classes of this web application in detail and represent the relationships
between each class.
Deployment/component diagram describes the components that integrate the whole system. And
middleware that links them with each other.
Following activity diagram will shows a comprehensive process of how the contract generator
works.
55
56
If the user is not a customer yet, then this is the flow for the user to register.
57
58
59
After customer log in successfully, the flow for them to review and edit contract details
60
61
The main process: flow for a log-in customer to generate new contract
62
63
Like what designed is the design part, form is very simple web page, which may just contend
several buttons. However, because the administrator is the only user of it, so the usability is the
only evaluating criteria.
64
Appendix F Interfaces
The following pictures are the screen shot for some the final web application interface:
This page shows the contract edit page. The page structure is followed the design in the
design chapter. The form in the main content is loaded from the database, and the add ,
delete button at the bottom of the form is to add or delete the selected products, and the
edit button on the right hand side, is for storing the changes into the database.
65
66
67
68
69
70
71