yang

71
1 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)_____________________________________________ Web based contract generating application for ZEYA Import & Export Company XIANG YANG BSc Computing (with Industry) Session (2006/2007)

Upload: guruannamalai

Post on 01-Feb-2016

216 views

Category:

Documents


0 download

DESCRIPTION

relavent to health care system

TRANSCRIPT

Page 1: Yang

1

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)_____________________________________________

Web based contract generating application

for ZEYA Import & Export Company

XIANG YANG

BSc Computing (with Industry)

Session (2006/2007)

Page 2: Yang

2

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.

Page 3: Yang

3

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

Page 4: Yang

4

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

Page 5: Yang

5

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

Page 6: Yang

6

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 company’s 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.

Page 7: Yang

7

CHAPTER 1 PROJECT INTRODUCTION

1.1 Aim:

The project analyses the current inconveniences of generating an import & export business

contract, and then suggest a possible solution based on computing technique to make the

processes more efficient, secure, and easier to be maintained.

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.

1.3 minimum requirements:

1. Develop a web based application for “ZEYA Import & export CO.LTD” what will make the

customer go through all the processes of making a contract online, and keep it efficient and

secure.

2. Build an appropriate database for manage these contracts

3. Produce a report of how the project has been carried out.

Further research and work to be carried out on this project, time permitting may

Include:

• 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

Page 8: Yang

8

needs of all types import and export business company.

• Produce a user manual to support the use of the application

1.4 Time Schedules:

A table outlining the project schedule and milestones for each time period:

Dates Task Milestones

10-10-06 -

21-10-06

Identify Minimum Aims and

Requirements

Submit 21-10-06

22-10-06 -

27-11-06

Background Reading Background Reading

Summary section

22-10-06 -

27-11-06

Research existing solutions Summary section

14-11-06 -

27-11-06

Methodologies Methodologies section

28-11-06 -

09-12-06

Mid project report Submit 09-12-06

10-12-06 - 22-01-07 Christmas break and exam period

23-01-07 -

05-02-07

Requirements Analysis Report

30-01-07 -

05-03-07

Design of solution Design section

20-02-07 -

09-04-07

Implementation of

deliverable product

Implementation section

06-03-07 -

19-03-07

Progress meeting Submit 17-03-07

10-04-07 - User testing of User testing section

Page 9: Yang

9

16-04-07 solution

03-04-07 -

30-04-07

Evaluation Evaluation section

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 hasn’t 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.

(APPENDIX A CONTAINS THE GANTT CHART)

1.5 Relevance to degree program:

For the business analysis, I practiced the knowledge and skills that I have learned from the

business school (LUBS2150/LUBS2550).Creating a business report about the import and export

business give me a great chance to utilize these skills by studying the business requirements and

contract processes.

Within BSc Computing (Industry) I have studied three database modules including ‘Database

Principles and Practice’ and most recently ‘Advanced Databases’ (DB11/ DB21/ DB31).

Creating a web application with content management functionality should enable me to utilize

these skills by applying a database behind my web application. Development methodologies and

requirements gathering have also been studied in various Information System modules including

Is11, as well as a ‘Software Project Management’ module (SE24). My programming skills in

java and HMTL have also been aptly tested in many modules including ‘Object Orientated

Programming’ (SE20) and ‘Human Computer Interaction’ (SY33/SY23), and will be further put

to the test in this project.

Page 10: Yang

10

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.

Page 11: Yang

11

CHAPTER 2 background reading

2.1 Introduction:

This chapter will report on the background reading carried out to find a solution to the user’s

problem. It investigates and studies the user’s problem, and researches what would constitute a

usable web application. It also researches the language of development, web server, database and

server-side technology that may need to be utilized to devise an appropriate solution to the

problem. It discusses advantages and disadvantages of each technology to solve the problem and

presents justification for the chosen technology.

2.2 researching related existing products:

Through searching on the internet search engine, for instance, Google is apparent that

there are only a few web pages that are associating with the topic “contract generator”,

and none of them can solve the problem for my customer. This situation can be predicted.

According to my research and feed back from interview, contract is a very “personal”

step in the import & export business trading. Unlike e-bay and similar trading system, the

import & export business is usually much bigger (amount of trading products, total price,

etc.). There is a result of comparison between an E-bay trading record and exporting

business.

E-bay Exporting business

products Dog chew Dog chew

Amount 1 pack 20,000 pack

Kind 1 20

Is the product feature is the

same from the last time

Yes NO

Total price 1 pound 16050 pound

Size 1 delivery box 2 container

Is the delivery approach is

the same from the last time

Yes No

Do the customer require

delivery date

Some times, but not strict Yes, and have to be on time

Will the price change Some time All the time

Page 12: Yang

12

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 customer’s requirements and be truly useful to deal with the problems, the contract generator

has to be “personal”.

2.3 development tools:

2.3.1 JavaScript:

JavaScript is the most popular client side scripting language and like all scripting languages can be

embedded within HTML. It is an object orientated programming language that is freely available

and can be used to add interactivity to web pages. It is open source and a cross platform system

supported by both Windows and Linux servers, thus making it a realistic choice for my project.

Rather than the script being processed on the server, all processing is carried out in the client’s

browser. All major browsers like IE, Mozilla, Firefox, Netscape and Opera will sufficiently be able

to process these scripts without the need for a JavaScript application. JavaScript is also able to

detect which browser the user is using and load a page designed particularly for that browser. This

is beneficial as it will ensure all customers from different parts of the world who may use various

web browsers would view the best possible version of the website.

From an advanced point of view JavaScript is a language I have some experience of using (from

sy23). It has a similar syntax t of Java, so that it should therefore speed up the learning process.

JavaScript’s main draw back is that it requires an API (Application Programming Interface) to

connect java programmes to a database, which is unfriendly to some web browsers and fire wall. It

is also true that JavaScript is in decline and being replaced by languages such as PHP and Perl etc

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 (Microsoft’s version of

JavaScript).

Page 13: Yang

13

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

2.4.1 MySQL database

MySQL is a free open source software, widely available and with good technical support. It is

supported by many Operating Systems including Windows, Linux and Mac and can be used with

both Apache and Windows web servers. It can also handle medium amounts of data and provides

Page 14: Yang

14

appropriate security through user authorisation and access privileges.

MySQL merges perfectly with PHP, Perl and ASP making it ideal for managing the content of a

web application. These server side scripts can therefore be used to interact with a MySQL database

to retrieve and add information to a database. Furthermore, MySQL is a database to which I have

had some experience using in both DB21 and DB31 computing modules. This experience could

prove vital during the development stage.

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.

2.4.3. MS SQL Server

MS SQL server is a platform dependant database management system that runs only on ISS

servers, which I had some experience in the coursework of DB 21 as well. It is designed for large

databases and handles multiple users. Database queries in it are easy to use and extremely well. It is

also easily maintained through the Enterprise Manager GUI. The disadvantage of MS SQL is that it

is not open source and expensive to purchase.

2.5 Web server

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.

2.6 MY CHOICE: JSP + MYSQL + apache

It is highly liked that I will use JSP rather than PHP or ASP. The most benefit for using JSP in my

project is that JSP inherits most of the advantages from java: easy and efficient to developing web

site. In addition, it supports using component “java bean” to provide support for long-term

persistence (can be recursively read or written to capture their publicly available state), and further

reduce the development time. For the database software, although I personally prefer MS SQL

Page 15: Yang

15

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.

2.7 Database structure

In order to deal the considerable data (products in each contract, the contract itself and the customer

details), the database structure should be carefully designed.

In this project, the data table of customer, products and the contracts are required to be related to

each other. In this way, user can query any data related to the key data easily.

For example, if the company manager wants to analyse the products of customer A, then, the

system is able to select all the products that ordered by customer A in the history. Another useful

example would be that the system is able to select all the contracts that contains product A, when

the company manager wants to do some marketing.

The best way to design these relationships is to use entity relational diagram.

An entity relationship diagram helps illustrate the conceptual design of the database showing high

level abstractions, relationships and cardinalities between each relation. Its main advantages are:

• 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.

In the diagram there are two main special entity types:

Associative entities (also known as intersection entities) are entities used to associate two or more

entities in order to reconcile a many-to-many relationship.

Page 16: Yang

16

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.

Page 17: Yang

17

CHAPTER 3 Methodologies analysis

3.1 INTRODUCTION

In order to design a useful web based application of generating the Import & export business

contract, it is necessary to demonstrate how the new components may be implemented and

evaluate the usage of them to the customers of ZEYA Import & export CO.LTD.

“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.

3.2 Project management

There are three General Paradigms:

• The Waterfall Approach:

After each stage in the life cycle is complete it is “signed-off and development

goes on to the next stage. No two stages can run asynchronously.

• 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.

Page 18: Yang

18

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.

• Different technology require different techniques.

• Every individual is unique.

• Every team is unique.

• Your external needs vary.

• Project categories vary.

The advantages and disadvantages of some relative methodologies are researched and reported as

follow:

3.2.1 Rapid Application Development:

Application Development refers to the developing of programming applications and differs from

programming itself in that it has a higher level of responsibility, including for requirement

capturing and testing. Rapid Application Development (RAD) was a response to non-agile

processes developed in the 1970s, such as the Waterfall model. The problem with previous

methodologies was that applications took so long to build that requirements had changed before

the system was complete, often resulting in unusable systems. Starting with the ideas of Barry

Boehm and Scott Shultz, James Martin developed the Rapid Application Development approach

during the 1980s at IBM and finally formalized it by publishing a book in 1991.

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

Page 19: Yang

19

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.

3.3 Chosen Methodology

In this project, since it is for business, use the requirements from the customer would be the most

important. Getting the requirement wrong would seriously reduce the usability of this application

and even cause a failure to the business. In addition, with the deeper understanding of this

application by both the developer and the customers, requirements may change frequently during

the project.

Page 20: Yang

20

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.

Page 21: Yang

21

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 user’s 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.

4.2 processes of generating an import & export business contract:

Based on my research and the interview result from the manager of ZEYA Import & export

CO.LTD, the following are the general processes of generating the import & export business

contract and the containing of each step:

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.

• inner packing: none; inner box; inner ploy 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

Page 22: Yang

22

and becoming the reference for further negotiation.

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.

• Invoice: contains product information and all the price information.

• There will be a confirmation from the customhouse (which is not concerned by my project)

(A contract example is attached at the end of the report)

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

can’t 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

Page 23: Yang

23

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.

4.4 Functional requirements

According to the requirements from the manager of ZEYA Import & export CO.LTD, and those

problems are represented above, the web based application should have following factions.

1. Allows user to enter and modify the details of the offer.

2. After the sales person confirmed the offer, the well structured contract will be generated

automatically.

3. The detail of the contract can be changed at any time before the final decision.

4. Details of the contract can’t be changed after the final decision.

5. Details of the contract can be printed out on an A4 size paper.

6. The entered details of the contract will be saved to the database after modification.

7. 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.

( the contract out put has been attached in the appendix H)

4.5 Non-functional requirements

• Easy to use

• The processes need to be as efficiency as possible

• Easy to modify any details on the contract

• 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

Page 24: Yang

24

4.7 Use case and the class structure analysis:

Based on the analysis of the customer requirement, the use cases of the two main kinds of

users are decided. All the use cases are separated into to different level. By the book,

there are 3 different levels: “must do”, could do and may do. Must do is represent the use

cases that is required by the customer, which are usually the basic functions of the web

application. “Could do” are the functions which would increase the performance of the

web application, but will take time and increase the cost of development. “May do” are

some functions would slightly improve the convenience for customer, but only be added

into the system if there are spare times and spare development cost.

(An UML diagram of the use cases is attached in the appendix C)

Class diagram would help developer to design the application system. It shows all the

classes in the application in detail (components and method), and also describe the

relationships between each classes.

(An UML diagram of the class diagram is attached in the appendix C)

4.8 Threat analysis:

4.8.1 Security development approach

Security issue is also an important part of this project. The details of the contract, the customer

details and the products information are all high level privacy of the company. In order to avoid

divulge the business information, a comprehensive secure protection are needed. And for

achieving it, a suitable security development approach should be integrated with the development

of the project from the very beginning till to the final step.

But, obviously, the approach that just adds the security part into steps of project development is

not good enough. (Analyse requirements�design the solution� implement functionality�add

security features � fix bugs� ship product).

The development approach used by Microsoft group has been studied for improving the approach

to design my project.

“SECURITY from Day One” Microsoft’s Approach used in my project:

1: Concept: Consider the security questions during interviews of getting the customer requirement.

Finish the threat analysis before move on to the design part.

2: Design complete: review the security problem and the security functions

Page 25: Yang

25

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 attacker’s aspect and try to attack the system.

5: ship: Security audit; learn and refine the system.

6 post ship

4.8.2 The security problem from the customer requirement.

1: Not all the user of the web site can generate a contract. Customers should be investigated and

accepted by the manager form the company before they get the right to generate the contract.

2: Both administrator and customers need to login to the system every time. And there should be

a checking (username and password are preferred) for each log in.

4.8.3 Vulnerability: SQL injection

SQL injection is a technique that exploits a security vulnerability happening in the database layer of

an application. The vulnerability is present when user input is either incorrectly filtered for string

literal escape characters embedded in SQL statements or user input is not strongly typed and

thereby unexpectedly executed.

In this project, SQL injection should be clearly avoided from the log-in system

4.9 Conclusion

The incontinence of the current contract generating processes is can’t 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.

Page 26: Yang

26

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 product’s 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.

5.2.1 Database Schema

All the details in this database are based on my understanding of the company requirements and

the feed backs I got from the customers. Almost all of them will synchronize with the input data

on the web application interface. The database schema is listed at follow:

Page 27: Yang

27

� 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))

� Log_in(id varchar(30) not null, password varchar(30))

� sell (order_id varchar(30) , product_id varchar (30))

� generate( order_id varchar(30) , id 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

The foreign key is underlined

Page 28: Yang

28

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:

user Customer

id …

lastname

firstname

id

… lastname

Promote

to

do

Log-in admin

Controlled

by

generate

p.contract

c.contract

sell

products

id

Saved as

Order_id

product_id

User_id id

passowrd

Shipmentdate ….

… ctns quality product_id passowrd

insurance Order_id

firstname

Order_id

Page 29: Yang

29

The entity relationship diagram shows the basic database structure.

“Customer” is a table that inherit from “user”. They have exactly the same entities. Customer is

the high level user, who is directly promoted by administrator. Only the users in the customer

table have the right to generate contract. Both customer and user can be offered further authorities

in future, and their authorization is clearly separated by this database structure. It will be much

more convenient for the developer to do the future improvement.

On the other hand, there are two types of contract data in the database. Customer and

administrator can only review and change the “c.contract”( the contract which are processing).

But based on the customer requirement, for the “p.contract” (already made a final agreement),

they can be only reviewed but modified. In order to achieve this, “p.contract” is a table that

inherit from “c.contract”. When a contract is during discussing, its data would be saved into the

“c.contract” table, and then the data is transferred into the “p.contract” as reference after the

agreement has been made.

Since there are several products sell in one contract and these products may be sold at other

different contracts (N: M), one extra table “sell” is created for storing the relation ship between

each contract and products. The table “generate” is created by the same reason, and it stores the

relation ship between each contract and customer. This middleware table will be useful when

query some particular products from the specific contract.

Page 30: Yang

30

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.

5.3 Form Design

The online form is the data entry interface that will allows web site users and web site

administrators to add and amend data stored in the database. According to the research result that

is discussed in the previous chapters, the forms on the web site provides an easy way for the user

to update the database by hiding the coding and avoiding the need of any prior or special

knowledge from the user. Additionally, unnecessary complication of these forms such like

graphics would be also mostly avoided. To conclusion, these forms would provide the user with

an easy mechanism to manage the database and allow the user to effortlessly control the functions

of the web application. Appendix D contains designs of some of the forms, with a statement to

describe which generic requirement it fulfils, which kind of user will implement them and the

tables in the database that will be affected.

5.4 Web interface for contract generator

The coding structure of JSP is like “java embedded in the html”. As the result, CSS (Cascading

Stylesheets ) is still the main approach to design the layout.

Page 31: Yang

31

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.

Page 32: Yang

32

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)

5.6 The process of generate the contract

By following the principle of usability, all the options of the processes should be clearly

out lined on the interface, and customer can go back to any process by simply click the

buttons.

All the processes are designed through activity diagrams. The diagram shows all the links

between each step. It also points out the options or an alternative way of process.

(All the activity diagrams are attached in the appendix C)

Page 33: Yang

33

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;

Page 34: Yang

34

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.

6.3 Database connection

Database connection is widely used in this project, it interacts with the interface closely (store the

data entered from the interface and shows the data inside to the interface.)

The following java bean will make the web application connect with the MYSQL database

package com;

Page 35: Yang

35

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>

Page 36: Yang

36

<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>

6.4 List Products

There is important function of the contract generator that is list the products details with in a

required contract, so that these details can be reviewed or modified by customers. These products

details should be placed in a structured and constant form. In order to achieve this, another java

been is needed:

Products_list.jsp

<h3><center> your products details in this contracts </center> </h3>

<%//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>

Page 37: Yang

37

</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>

(The out put of this page is attached in appendix F)

Page 38: Yang

38

6.5 SECURITY

The basic one is to check if the user’s 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; }

Page 39: Yang

39

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();

6.6 User manual

A user manual was written after completion of the testing phase to help support the use of the

administration facility. It is link on the web page, and it will help to guide user to finish the

contract generation process, even it is the first time for the user to use.

Page 40: Yang

40

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.

7.2 Testing group

Myself, of course, is the first tester of the project.

Some of my friend, who have no idea what the import & export contract is.

In order to evaluate the solution, some key customers of this company have been invited to test

the contract generator web application.

These customers are involved into the development at the very beginning. They have already

given a feedback to the first prototype and the initial application which just had the key functions.

The reason for them to involve much is because they are the main business partners of ZEYA

Company, which means, in future, they will be the main users of my web application. Therefore,

their feed back is the best criteria to evaluate my project.

They tested the web application separately, and each of them at least went through the contract

generating process once.

7.3 Effectiveness of testing

The testing process involved both a user inspection and user testing of the application to evaluate

if it meets the system requirements and solves the problem. It was also designed to identify any

errors along the way so that corrective action could be taken to solve them. As listed in 7.2 in this

chapter, there are three kinds of tester and the approach for them to test is different.

� 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.

Page 41: Yang

41

� 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.

7.4 meeting user requirement

ZEYA company requirements of the web application were agreed early in the development life

cycle. The requirements gathering phase identified 7 functional requirements or CSFs (Critical

Success Factors) that needed to be incorporated in a web application for it to be successful in

solving their problem. There were also four non-essential requirements desired and one more

additional requirement from the feed back of the customer.

7.4.1 Functional requirement

Allows user to enter and modify the details of the offer.

This was achieved through the integration of the database and the user interface. The user is able

to add, edit and delete contract details stored in the c.contract table. User feed back are also

shown that it is very connivance for user to edit the details of the contract, buttons for each option

are always shown on a clear place and the guide for each process is easy to follow.

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,

Page 42: Yang

42

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.

Details of the contract can’t be changed after the final decision.

This was achieved by the database structure. Once a contract have made the final agreement, all

the contract detail will be erased form the c.contract and transferred in to the p.contract. Because,

JSP code for edit contract only loads data from the c.contract, as the result, a finished contract is

not able to edit anymore.

Details of the contract can be printed out on an A4 size paper.

Because the contract will be automatically generated in to an A4 size form, so it can be printed on

an A4 size paper directly.

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 hasn’t 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 haven’t

found a good approach to solve it.

7.4.2 Un-functional requirement

Easy to use

This was achieved by following the principle of usability. As we decided in the design part, this

web application does not require users to have any special ability to finish the process. On the

other hand, all the option are clearly listed out in the interface and the contract can be created by

simply clicking buttons and entering related data into the text-field of the interface. In addition,

Page 43: Yang

43

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.

The processes need to be as efficiency as possible

According to the statistic from the entire user’s record, the average time for a new user to finish

the whole process is 25 minutes and the average time for normal user (used the system about 3

times) is only 10-15 minutes.

According to the result, this web application is efficient, and this result is accepted by the ZEYA

company manager.

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 hasn’t 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

haven’t 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.

7.5 meet the minimum requirement

All three minimum requirements specified in section 1.3 of this report have been successfully

met.

Develop a web based application for “ZEYA Import & export CO.LTD” what will make the

customer go through all the processes of making a contract online, and keep it efficient and

secure.

As covered in this chapter, the web application about generating contract has been successfully

developed. Although it hasn’t covered the entire requirement asked by the ZEYA company, but it

is still can finish the contract generating process.

Page 44: Yang

44

Build an appropriate database for manage these contracts

A well structured has been created based on the project analysis. As the evaluation of it covered in

this chapter before, this database will help the interface to achieve the use cases, and achieve the

customer requirements.

Produce a report of how the project has been carried out.

The detail of how the contract generator is created is covered in the analysis part, the design part

and the implementation part of this project report.

7.6 Effectiveness of methodology

The methodology followed to develop a solution to the problem identified was the RAD(Rapid Application Development ) This was also to be combined with prototyping to

gain the users thoughts on the progress of the development early in the production

process. The RAD model with iterative feedback was chosen for its advantages in

providing faster development life cycle and keeps the project development stick tight

with the customer requirement. It also encouraged greater user involvement than other

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

customer’s 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

Page 45: Yang

45

the ZEYA Company and added as an additional requirement.

Finally, the user’s acceptance of the final application in the evaluation phase can prove that the

chosen methodology is a right choice.

7.7 Time management and schedule By following the methodology RAD, the development of the web application has been separated

into several small sections. Because of this benefit, the time schedule about the “design of

solution” and “Implementation of deliverable” hasn’t been affected by the course work a lot.

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 haven’t waited until the very

last to rush the work.

7.8 Possible improvements

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

what’s 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,

Page 46: Yang

46

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.

Page 47: Yang

47

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

1. Nielsen, Jakob, (2003), Usability 101: An Introduction to Usability,

http://www.useit.com/alertbox/20030825.html [3rd February 2006]

2. Thomason, Larisa, (2004), Web Site Usability Checklist,

http://www.netmechanic.com/news/vol7/design_no4.htm [18th April 2006]

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

Page 48: Yang

48

5. Holzschlag, Molly E, (1998), The Art if Interface, in: Web by Design: the complete

guide!, pp. 77-83, Sybex

6. Nakano, Russell, (2002), Web Content Management: a collaborative approach,

Addison-Wesley

7. Netcraft (2005), November Web Server Survey 2005-

http://news.netcraft.com/archives/2005/11/07/november_2005_web_server_survey.ht

ml [5th

December 2005]

8. Maxfield, Wade, (2001), MySQL and PHP from Scratch

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

11. Colburn, Rafe, (2003), Sams Teach Yourself CGI in 24 Hours

12. Dubois, Paul, (2003), Migrating from Microsoft Access to MySQL, version 1.01,

http://www.kitebird.com/articles/access-migrate.html [6th December 2005]

13. Jepson, B, PostgreSQL vs. MySQL: building better databases,

www.webtechniques.com/archives/2001/09/jepson/ [6th

Decemeber 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

Page 49: Yang

49

17. JSP web development technique and examples( Chinese book)

Page 50: Yang

50

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.

Page 51: Yang

51

Appendix A

The project gantt-chart diagram of the time schedule

Page 52: Yang

52

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

Page 53: Yang

53

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 don’t like it is that they

prefer something classic, so that they can even predict what contains in each section of

the web page.

logo

Company name and some graphics

Ad

vertisem

ents

Log

in an

d acco

unt m

enu

Bottom navigation

Page 54: Yang

54

Appendix C UML All the UML has been done and sent to the manager from the ZEYA Company. I didn’t

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.

Page 55: Yang

55

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.

Page 56: Yang

56

Page 57: Yang

57

The flow for user to log in

If the user is not a customer yet, then this is the flow for the user to register.

Page 58: Yang

58

After logged in , the flow for customer to edit their details

Page 59: Yang

59

The flow for web-site administrator to edit the customer details

Page 60: Yang

60

After customer log in successfully, the flow for them to review and edit contract details

Page 61: Yang

61

Page 62: Yang

62

The main process: flow for a log-in customer to generate new contract

Page 63: Yang

63

The flow for the administrator edits the user detail.

Page 64: Yang

64

Appendix D DESIGN FORMS

Administration page for edit users

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.

Edit user detail

Promote user

Delete user

Back to the main page

Page 65: Yang

65

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.

Page 66: Yang

66

This is the log in page for users.

APPENDIX H CONTRACT OUT PUT By following the user requirements, the out put contract should be an A4 size form.

The following forms are an example of the final out put.

Page 67: Yang

67

Page 68: Yang

68

Page 69: Yang

69

Page 70: Yang

70

Page 71: Yang

71