You are on page 1of 56

‫العربية السعودية‬i ‫المملكة‬

Kingdom of Saudi Arabia


Ministry of
n Higher Education
‫وزارة التعليم العالي‬
Qassim University ‫جامعة القصيم‬
College of Computer ‫كلية الحاسب‬
Information Technology Department ‫قسم تقنية المعلومات‬

Build a Real-time Distributed


Chatting Application

Students:
Mashael Al-Zaidi 291200400
Ghadeer Al-Jumah 291201169
Muneera Al-Qedeem 281202548

Supervisor:

Dr. Husam ALHamad


ii

Table of Contents

Table of Contents --------------------------------------------------------------------- ii


List of Figures ------------------------------------------------------------------------- iv
List of Tables -------------------------------------------------------------------------- v
Certificate ------------------------------------------------------------------------------ vi
Dedication ----------------------------------------------------------------------------- vii
Acknowledgement -------------------------------------------------------------------- viii
Abstract -------------------------------------------------------------------------------- ix

CHAPTER ONE

INTRODUCTION ----------------------------------------------------------------------- 1

1.1 Introduction ------------------------------------------------------------------ 1


1.2 Project Scope ---------------------------------------------------------------- 2
1.3 Problem Specification ------------------------------------------------------ 3
1.4 Goals and Objectives ------------------------------------------------------- 4
1.5Motivation -------------------------------------------------------------------- 5
1.6 System Requirement -------------------------------------------------------- 5
1.7 Project Plan and Schedule -------------------------------------------------- 7
1.8Outline of the Project -------------------------------------------------------- 8

CHAPTER TWO

LITERATURE AND METHODOLOGY ----------------------------------------------- 10

2.1Introduction ------------------------------------------------------------------- 10
2.2 Current Systems ------------------------------------------------------------- 10
2.3 Proposed System ------------------------------------------------------------ 13
2.4 Feasibility Study------------------------------------------------------------- 13
2.5Methodology ------------------------------------------------------------------ 15
iii

CHAPTER THREE

SYSTEM ANALYSIS AND DESIGN -------------------------------------------------- 18

3.1System Analysis -------------------------------------------------------------- 18


3.1.1 Requirement Collection --------------------------------------------- 18
3.1.1.1 Interview outline -------------------------------------------- 19
3.1.1.2 System Service Request ------------------------------------ 20
3.1.1.3Questionnaire ------------------------------------------------- 21
3.1.2 Requirement Studied ---------------------------------------------------------- 22
3.1.3 Requirement Structured ----------------------------------------------- 23
3.1.4 DFDs -------------------------------------------------------------------- 23
3.2System Design --------------------------------------------------------------- 29
3.2.1ER-Diagram ----------------------------------------------------------- 30
3.2.2Database Schema (Mapping) for ERD ----------------------------- 31
3.2.3Class Diagram --------------------------------------------------------- 32

CHAPTER FOUR:

SYSTEM IMPLEMENTATION -------------------------------------------------------- 37

4.1 Programming Languages --------------------------------------------------- 37


4.1.1 Why Using ------------------------------------------------------------ 38
4.1.2 Why Using ------------------------------------------------------------ 39
4.2 Implementation -------------------------------------------------------------- 40
4.2.1 Introduction ----------------------------------------------------------- 40
4.2.2Sample of Forms ------------------------------------------------------ 41
4.2.3 Sample of Reports---------------------------------------------------- 41
4.2.4Pseudo Codes ---------------------------------------------------------- 41

CHAPTER FIVE:

SYSTEM EVALUATING AND TESTING --------------------------------------------- 42


iv

5.1 Testing Plans ---------------------------------------------------------------- 42


5.2 Types and Steps of Testing ----------------------------------------------- 43

CHAPTER SIX:

THE CONCLUSIONS ------------------------------------------------------------------ 44

6.1Conclusion -------------------------------------------------------------------- 44
6.2 Future Work ------------------------------------------------------------------ 44

Appendix ------------------------------------------------------------------------------ 45
A:System Installation ----------------------------------------------------------- 45
References----------------------------------------------------------------------------- 45
v

List of Figures

Figure 1: Gantt chart of Project Plan ----------------------------------------------- 8


Figure 2: Interview Outline---------------------------------------------------------- 19
Figure 3: System Service Request -------------------------------------------------- 20
Figure 4: The statistics result for the public customer --------------------------- 21
Figure 5: The statistics result for the public customer --------------------------- 21
Figure 6: The statistics result for the public customer --------------------------- 22
Figure 7: Context free diagram ----------------------------------------------------- 24
Figure 8: DFD level 0 diagram ----------------------------------------------------- 24
Figure 9: Server listener ------------------------------------------------------------- 27
Figure 10: Client connect ------------------------------------------------------------ 28
Figure 11: Services ------------------------------------------------------------------- 29
Figure 12: Server program----------------------------------------------------------- 30
Figure 13: ER diagram --------------------------------------------------------------- 31
Figure 14: Mapping for chatting system ------------------------------------------- 31
Figure 15: User authentication and session establishment sequence------------32
Figure 16: Manager use case -------------------------------------------------------- 33
Figure 17: User use case ------------------------------------------------------------- 34
Figure 18: Service application use case ------------------------------------------- 35
Figure 29: Architecture view -------------------------------------------------------- 35
Figure 20: Logical view-------------------------------------------------------------- 36
Figure 21: Application icon --------------------------------------------------------- 41
Figure 22: Application chat --------------------------------------------------------- 41
Figure 23: Application log in ------------------------------------------------------- 41
vi

List of Tables

Table 1: Programming language ---------------------------------------------------- 36


vii

Certificate

It is certified that project report has been prepared and written under my direct
supervision and guidance. The project report is approved for submission for its
evaluation.

Dr. Husam Al Hamad


viii

Dedication

To our parents, our families, our friends, to all whom gave us their time, love and
support.

Ghadeer AlJumah , Mashael AlZaidi, Muneera AlQedeem


ix

Acknowledgement

We would like to thank God for all the blessings that we have. Our families, our
friends, thank you for your support, patience and love which have been a source
of inspiration for us.
We would also like to thank our supervisor Dr.Husam Al Hamad for his help and
for his directions for this project.

Ghadeer AlJumah , Mashael AlZaidi, Muneera AlQedeem


x

Abstract

This project focused on creating a chatting application with communication


environment. The objective of our project is to build a chatting system to
facilitate the student-staff communication to obtain an effective channel
among the students themselves and between them and their staff. For the
application itself, this system can serve as a link to reach out for all students
and staffs. The design of the system depends on socket concept where is a
software endpoint that establishes bidirectional communication between a
server program and one or more client programs while designing the database
used for this system was made with ERD and normalization process.
Languages that will be used for the development of this system: Java
Development Kit (JDK): is a development environment for building
applications and components using the Java programming language. HTML:
Stands for Hyper Text Markup Language and Extensible markup
language are the predominant markup languages for web pages.
1

CHAPTER 1

INTRODUCTION

1.1 Introduction

Important applications in our lives now, with widespread use of the Internet is
the chat, because of the use in many sectors, scientific, educational, training, and
social networking. To understand the idea of the chat, you must understand two
main concepts in the work Chatting:
1. Client-server computing or networking
2. Socket
Client-server computing or networking is a distributed application architecture
that partitions tasks or workloads between service providers (servers) and service
requesters, called clients. Often clients and servers operate over a computer
network on separate hardware. A server is a high-performance host that is a
registering unit and shares its resources with clients. A client does not share any
of its resources, but requests a server's content or service function. Clients
therefore initiate communication sessions with servers which await (listen to)
incoming requests [1].

Socket is an IP & port Number, where if it gives you two can be called the
socket. Because the availability of IP and port can contact the remote.
That is when there is a server and client must be socket programming (software)
communicate using IP & Port number .The programming of those applications is
the type of programming is called Socket Programming [2].
2

1.2 Project Scope

This project can be mainly divided into two modules:


1. Server
2. Client

This project is mainly depended on client/server model. The client requests the
server and server responses by granting the clients request. The proposed system
should provide both of the above features along with the followed ones:
SERVER: The server should be able to perform the following features:
The first and foremost problem is to find the server. We should identify the
program in the server which processes the client's request. Administrator Client
who will be acting as a super user.

Creating of private room with the password facility to enable private chats with
the users online. The server is always waiting for clients requests .The clients
come and go down but the server remains the same.

CLIENT: The client should be able to perform the following features:


Should be able to send message to anybody in the room with clients unique chat
name created in the server for chatting purpose. Should be provided with the
drawing tools like free hand, rectangle, oval , line and also sending text message
over the room. In all the network applications, we find two sort program where
the first i.e., server sends the information and the second i.e., client receives the
information [3].

The model used for this project is the single server – multiple client models. The
following specifications must be implemented:
1. The server and client are two separate programs.
2. Multiple clients must be able to connect to a single server.
3. All input and output is via I/O Interface (GUI is Required)
3

4. Client:
 Client must be able to choose a nickname on connection.
 Client must show when another client connects or disconnects with
the server.
 Client must be able to send messages to the server before arriving
in other client.
 Client must be able to receive messages while writing.
 Client must be able to print out any messages received from the
server.
5. Server:

 Server must be able to print information in the event of the


following cases: (connect, disconnect, send and receive messages).
 The server does not allow for more than one client to get the same
nickname.
 Server must be able to return messages again to all clients
(including source).
 Client connected and disconnected with the server does not crash
the server.

1.3 Problem Specification

Represent online chat, a large area of the packet data that is exchanged between
users of these web, but many users do not see the Internet only way to get to the
other by means of various communication offered by various Internet sites, such
as your e-mail, forums, and programs Instant (chatting alternators), and chat
sites, and although the chat, a means of communication are only a fraction of the
possibilities that can be provided by the internet, but it is considered the main
motive behind the connection of more than 25% of the users of the network.
4

Despite the effort made by Staff, to interact with the students during the lecture,
but the time the lecture Limited, reduces the chance of participation and
discussion with students. So there pressing need for system Communication
electronic between students and staff. The idea of creating chatting be the most
important electronic means. That help to enrich the discussion and
communication, which will help to increase communication between students on
the one hand, and between students and the university on the other hand, which
will help to save the effort and time, and reduces the administrative burdens for
staff member, contributing to the different viewpoints between the students.

1.4 Goals and Objectives

Our project aims to build chatting system helps communication between students
one hand, between students and staff members on the other hand, where the
project aims achieve following:

1. Easy to better access to staff members.


2. Increasing degree participation students in the courses.
3. Improve ability of students on production information and ability to
handling with complex problems.
4. Increase level students' interest in content courses through interaction
with staff member.
5. Overcome limits space and time in learning operation.
6. Save time and effort.
7. Reduce the load on staff members.
8. Contributing to the different viewpoints of the students.
9. Provide great opportunity to identify miscellaneous sources of
information different ways.
5

1.5 Motivation

There are many motivation for our project include the following:
1. Does current system of communication between students and staff
members.
2. The difficulty of communication between students and staff members
Because of time constraints.
3. Development of spirit cooperation and open dialogue between students
with each with staff members.
4. Required for graduation degree.

1.6 System Requirement

The system requirement can be classified into two categories:


1. Hardware Requirement
2. Software Requirement

Hardware Requirement:
1. CPU 4 processor or higher.
2. Memory 2 GB or higher.
3. Hard disk 160 GB or higher.
4. Network card.
5. Windows operating system.

Software Requirement:
The system will be created using Java and Netbeans , HTML5, PHP, CSS, AJAX
and MySQL. The first reason for this is because the author has been using Java
and Netbeans extensively during his course. The second reason for using Java as
the main programming language is because the problems the author is attempting
to solve involve databases and Java has some good API’s (such as JDBC) to
handle database connectivity. Also, Java is an object orientated language which
6

will make it easier for him to create separate interfaces for each layer and
prototype in his design which will mean they do not explicitly rely on each other.

- Programming languages:
 PHP: A language called (Server Side Scripting Language), and it means
that it is translated on the server and not from the user's computer. Need
an interpreter to understand what the code is doing. Therefore, the
translator.
programPHP-5.3.8-nts-Win32-VC9-x86 is used.
 HTML5:Stands for Hyper Text Markup Language and Extensible markup
language are the predominant markup languages for web pages.
 CSS : Stands for Cascading Style Sheets Styles define how to display
HTML elements. Styles were added to HTML 4.0 to solve a problem.
External Style Sheets can save a lot of work. External Style Sheets are
stored in CSS files .
 MySQL: It is a database system used on the web. Basically, a MySQL
database allows creating a relational database structure on a web-server
somewhere in order to store data or automate procedures.

 Java Features:

1. Platform Independent : The Write-Once-Run-Anywhere ideal has not


been achieved (tuning for different platforms usually required), but
closer than with other languages.
2. Object Oriented : Java is object oriented throughout i.e. there is no
coding outside of class definitions, including main(). There is an
extensive class library available in the core language packages.
3. Robust: Exception handling built-in, strong type checking (that is, all
data must be declared an explicit type), local variables must be
initialized.
4. Automatic Memory Management: Automatic garbage collection -
memory management handled by JVM
7

5. Security:
 No memory pointers.
 Programs run inside the virtual machine sandbox.
 Array index limit checking
6. Good Performance: Interpretation of byte codes slowed performance
in early versions, but advanced virtual machines with adaptive and
just-in-time compilation and other techniques now typically provide
performance up to 50% to 100% the speed of C++ programs.
7. Dynamic Binding: The linking of data and methods to where they
are located is done at run-time.
8. Threading: Lightweight processes, called threads, can easily be spun
off to perform multiprocessing.
9. Built-in Networking: Java was designed with networking in mind
and comes with many classes to develop sophisticated Internet
communications [8].

Java Environment:
Java environment includes large number of development tools and hundreds of
classes and methods. The development tools are part of the system known as
Java Development Kit (JDK)and the classes and methods are part of the Java
Standard Library (JSL), also known as the Application Programming Interface
(API) [4].

After this detail we summarize the project requirements from following software

1.7 Project Plan and Schedule

Following table shows the steps involved in the work of the project:
8

Fig 1: Gantt chart of Project Plan

1.8 Outline of the Project

This project is organized into six chapters as illustrated in the previous Gantt
Chart of the project plan and schedule. First chapter is a preparatory chapter
where the project is introduced and the project scope is defined. The main
problem is specified and clear goals and objectives are identified and listed. The
motivation behind this project is shown and the system requirement. In this
chapter also a Gantt chart of the project plan and schedule is presented.

Chapter two is for literature review the proposed methodology of this project. It
9

starts by reviewing existing chatting systems and describing the proposed one. A
feasibility study is then conducted and the methodology and approach of this
project are explained.

Chapter three is the core of this project as it covers the system analysis and
design. In the analysis section, system requirements are collected and
questionnaires are prepared and analyzed. The requirements are then evaluated
and structured and Data Flow Diagrams are prepared. In the system design
section, Entity Relationship Diagrams are established and mapped.

Chapter four is for system implementation where the proper programming


language is selected. Details of implementations are illustrated such as sample
forms and reports in addition to Pseudo codes. Chapter five briefly touches upon
system evaluation and testing as this iterative process is essential to examine
whether the application is delivering the required output.

Chapter six concludes this project by summarizing the overall process and
methodology that took place through the course of developing this work. Also it
briefly describes the recommended future work that could be carried out to
complement this project and further develop and expand it.
10

CHAPTER TWO

LITERATURE AND METHODOLOGY

2.1 Introduction

To study the system being built will require us to study and analyze current
systems, in order identify the problems and difficulties with existing system.
Included major steps involved in this stage to identify needs users and a study
current system to verify the problem. Study of current systems are also benefit to
know expected performance by the new system in order meet user requirements.
also analysis this information that has been collected and evaluated to help us in
build our project.

2.2 Current System

Most chat rooms use the current connection by sending messages. Some chat
rooms feature the ability to use audio and video to communicate and upload
images almost instantly. Most chat rooms require registration and a password.
Extent chat rooms allows for recording such as those run by colleges (and usually
allows for current and former students only registration). It all depends on who is
running the chat room, which monitors, if anyone. As an example Yahoo has a
long list of chat rooms by topic. Also Pogo site is a popular site allows people to
chat while playing games online [5].To use the chat rooms, the user must first
11

register and choose a user name, and will be introduced at the talks. Username is
usually not the legal name of the person. Once the user enters the chat rooms (by
typing your user name and password), and he could see a list of people who are
already in the room. To talk with these people, the user must write a message in
the text box. Once the user clicks on the key "enter", you can see anyone else his
or her message. Then other people may respond, and the development of the
conversation. Sometimes, people walk in chat rooms and just read messages
without taking part in the conversation [5]. Each chat room may also own
abbreviations, such as "DF" for "a good friend of mine." More chat rooms to the
FAQ section that explains the rules and shortcuts. However, there are rules of
etiquette that are valid in all chat rooms. It is considered rude in a chat room to
write all the letters, which is like yelling at someone. Users should never attempt
to monopolize the conversation, or insult someone personally cut another user. It
is also of the lack of manners stray off topic.

Example chat rooms:

 Yahoo chat rooms:

Considered chat rooms are a great place to meet and communicate with friends
who share your interests. You'll find chat rooms for a world of topics from
entertainment to sports, to politics and pop culture. Liven up your chats with
emoticons, custom fonts and even voice. It is the largest known chat, Software in
the world Yahoo chat program, and the most popular programs among the
people, in the following lines we will talk on the main advantages and
disadvantages of these rooms.

Advantage :

1. Classification chat rooms, offers the possibility to meet people from


all over the world that share common interests on topics such as music
and entertainment, politics and religion in safe and non-threatening
environment.
12

2. You can communicate directly with people and it can save you time.
(group meeting and so on.)
3. You can participate in an online community where there is no
judgment based upon appearance.

Disadvantage:

1. When choosing a user name is not linked to any real information


about the person used as a mobile. Anonymity can make it be difficult
to know whether other chat being honest. Which makes chat rooms
and a possible means to other predators.
2. Because of the popularity owned by making them more chats way to
spread data or other malware software.
3. Another disadvantage is that the content that appears in the chat may
not be controlled or filtered of any way. Pictures or bad words.

 Skype chat rooms :

Skype one of the powerful Software chat, but more what characterized The
voice chat and that use voice over IP (VoIP) protocol to allow people from all
over the world to communicate. Skype allows individuals to talk for free to
other Skype users, but requires that individuals pay to get credit when you call
land-lines and cell lines[9].Skype become very popular way of communication.
Listed below are some advantages and disadvantages of Skype.

Advantages:
1. Communication free.
2. Can call all over the world.
3. Cheap to use.
4. Group voice communication.
5. Send and receive message and files.[10]

Disadvantages:
13

1. No constraints on the registration of the account only the user name does
not repeat. Example, we can register the same e-mail for more than a
name.
2. The special box for messages are poor in utilities such as shapes and
symbols.
3. Communication group disadvantage that he is being failed after a period
time of communication[10].

2.3 Proposed System

The project aims to create a chat room for communication and exchange of ideas
within the university to serve students to exchange views and the ideas with each
other. also between students and staff members and enrichment the dialogue
about the courses. What we want to do is create a chat room to be secure and
convenient for all participants. Equipped with the following benefits:

1. System will be a two separate applications server and client.


2. System's ability to connection multiple clients on a single server.
3. Graphical interface GUI system for ease of use.
4. Client can Login through the nickname of the connect.
5. Client can navigate through listed groups through the server.
6. All clients messages are passed through the server as a kind of control.
7. Clients can print the messages received from the server.
8. The server must print out information when an event happens (connection,
disconnection, chat).
9. The server does not allow multiple clients to get the same nickname.
10. The server must echo chat messages back to all the clients (including the
source).
11. Clients connecting and disconnecting with the server must not disrupt the
server.
14

2.4 Feasibility Study

There are three feasibility studies: Technical, Economic and Behavioral or


Operational. Feasibility is the most successful system projects are not necessarily
the biggest or most visible in a business but rather those that truly meet user
expectation[6].

FEASIBILITY CONSIDERATION:

ECONOMIC FEASIBILITY:
Economic analysis is most frequently used method for evaluating the
effectiveness of candidate system. More commonly known as cost and benefit
analysis[6]. Since our project is requirement to obtain a bachelor's degree, it will
not be the work of a feasibility study.

TECHNICAL FEASIBILITY:
Technical feasibility centers on the existing computer system(hardware,
software, etc.) and to what extent it can support the proposed addition. For
example, if the current computer is operating at 80% capacity-an arbitrary
ceiling- then running another app. could overload the system or require
additional hardware[6]. Through our work will be on 24 hours straight, so you
must consider the quality of the devices used to carry these hours of work, as
well as must be a good securing system When drop of the server to provide
server standby can replace him.

BEHAVIORAL FEASIBILITY:
People are inherently resistant to change, and computers have been known to
facilitate change. An estimate should be made of how strong a reaction the user
staff is likely to have towards the development of computerized system[6].
15

STEPS IN FEASIBILITY ANALYSIS:

1. Form a project team and appoint a project leader .


2. Prepare system flowcharts.
3. Enumerate potential candidate system.
4. Describe and identify characteristics of candidate system.
5. Determine and evaluate performance and cost effectiveness of each
candidate system.
6. Weight system performance and cost data.
7. Select the best candidate system.
8. Prepare and report final project directive to management[6].

2.5 Methodology (SDLC)

The Systems Development Life Cycle (SDLC):

Like Nitrogen & Production cycle ± a Software system is just like a cycle which
passes the following stages like:

1. Planning phase.
2. Analysis phase.
3. Design phase.
4. Development phase.
5. Testing Phase.
6. Implementation & Maintenance phase.

The planning phase:

It is the process is to understand why should the system should be built and
determine its requirements. It also includes a feasibility study from the different
perspectives and the technical and economic, and feasibility aspects of the
organization[11].Through our project, has been studying technical requirements
of project from hardware and software. These requirements have discussed in
16

chapter1. Since our will install on devices the university, will there is no
additional cost on the project. also software required him Free.

The analysis phase:

This phase includes activities such determine and analysis problems, and even
forecasting potential problems that may arise in future with regard the system.
The deliverables / products of this phase will drive how the system will be built
and guide the developers' works[11].The basic requirements for this project can
be decided according to the needs of the users who will use this application.
Some basic requirements have been listed here:

 Access to the project should be protected from unauthorized users. So, any
attempt to access the project must go through some login process. It is for
both types of users, that Is administrators and common chat users.
 The project must provide user interfaces to create a new user, search a
specific user, update the information of any existing user, and delete any
existing user.
 The project must provide an interface having a list of members of Instant
Chat. The application must also show the online or offline status of the
existing users.
 Only administrators must have a right to maintain the list of existing
members of Instant Chat by adding or deleting members from it.

The design phase:

It is the most creative and challenging phase of system development. It deals


with converting input into output. It contains output design, input design, file or
database design and processing design[11].The user interfaces of this project are
categorized into various modules. These modules are:

o Admin Module
o User Module
17

The development phase:

The development phase involves writing the source code based on the required
functionality adhering the coding standards, code optimization, etc. It takes its
primary input from the design elements described in the software design
phase[12]. The development of this project involves creating windows forms,
class files, and user controls in Java . The code files are covering: connecting to
Mysql Server database, sending requests lo the server and responses to the
clients, executing queries. firing trigger, filtering data, and reflecting changes in a
database.

The Testing Phase:

After the designing and developing phases, the application is tested for any
logical flaws and functionality of all operations[12]. The project is also tested lo
ensure that all methods and modules designed and developed are functioning
properly, along with the navigation links provided in all the user interfaces,
finally, the project is tested to ensure that all the requirements listed during the
requirements analysis phase are being fulfilled.

The Implementation and Maintenance Phase:

Finally, the project Is Implemented In a distributed environment, where it is used


by users logged In from different computer nodes on a network[12]. The project
is maintained thereafter if any requests for changes are forwarded by the users.
18

CHAPTER THREE

SYSTEM ANALYSIS AND DESIGN

3.1 System Analysis

Analyzing the system is very important process. For this purpose there are
various tools available in the market that can be used. The most popular and
commonly used tools for data are Data Flow Diagram (DFD), Entity
Relationship Diagram, and System Flow Charts. The main points to be discussed
in system analysis are:
 Specification of what the new system is to accomplish based on the
user requirements.
 Functional hierarchy is showing the functions to be performed by the
new system and their relationship with each other.

3.1.1 Requirement Collection

Requirements collection is a necessary part of our project. Understanding


completely what a project will transport is critical to its accomplishment. This
may look very easy but common it is needed attention to this area. Many projects
start with the barest headline and list of requirements, only to find later the
problem not been properly understood. The contents of the statement of
requirements should be stable or change relatively slowly. Once we have created
our statement of requirements, ensure the user and all others understand that this
and only this will be delivered.
19

Finally, ensure we have cross-referenced the requirements in the statement of


requirements with those in the project definition report to ensure there is no
mismatch. [13]

3.1.1.1 Interview outline

Interviewing is one of the primary ways to gather information about an


information system and a good system analyst must be good at interviewing
therefore no project can be conducted without interviewing.

We interviewed the targeted audience using the following interview guide line
shown in (Figure 2):

Interviewee Group of Students Date: January 12, 2013

Interviewers Muneera Al-Qdeem Ghadeer Al-Jumah Mashael Al-Zaidi


To collect information about the system requirements for the chatting
Objectives
system
Location Qassim University

Questions Answers
What do you know about the
Q1 I know it is an informal way of communication
chatting system?
What are the things that you
I would like to see a chatting system that is stable
Q2 like to see on the chatting
and fast
system?
Is the chatting system between Yes it could be very useful if staff will allocate time
Q3
students and staff useful? for it just like office hours
What would you prefer, the Traditional communication is more formal but
Q4 traditional communication or chatting system is preferred because it is fast and
the chatting system? very convenient

Can we use the chatting system Yes we can if the system is easy to use and if both
Q5 to help students and staff users (staff and students) accept it as a primary way
communication? of communication

Fig 2: Interview Outline


20

3.1.1.2 System Service Request

For this project a System Service Request (SSR) was submitted to develop a
software system that request to search the information into the database.
A Service Request is characterized by the fact that the change can be made under
strict, well-defined procedural control and is therefore (virtually) risk-free[3].
Providing access to services for a new member of staff and relocating PCs are
two typical examples.
A service is provided by the System to its user. There is two important services
to admin and user.
Figure 3: illustrates the SSR of the system.

Fig 3: System Service Request


21

3.1.1.3Questionnaire

List of a research or survey questions asked to respondents, and designed to


extract specific information. Around fifty (50) individuals have participated and
submitted their responses to this questionnaire online.
In the next figures (Figure 4), (Figure 5), (Figure 6) the result representation of
some questions presented in the questionnaires and the link for these statistics
ishttp://www.survs.com/survey/YI9UKXLA03

Fig 4: The statistics result for the public customer

Fig 5: The statistics result for the public customer


22

Fig 6: The statistics result for the public customer

3.1.2 Requirement Studied

When setting a chatting system, many requirements come to mind. These


requirements can be divided into several groups according to their importance:

 Requirements hard (if you break one of these, then a agenda is not
applicable):
- Server must be able to manage multiple users at the same time.
- Nickname through registration must be unique.
- A names of groups also are unique.
- An administrator can. blocks user within this group.
 Some requirements for soft (a not be broken, but still possible schedule):
- A possibility a print session.
- A user a possibility follow up previous conversation if
interrupted re-connect.
- Possibility of providing some a tools that help the user through
writing a such a font color font size etc..
23

- Any staff member will be able to enter the chatting system


using his own unique ID and password. Once he is in, he will
have a list of courses and fields that he is responsible for and can
creature his own room, participate in existing rooms or go to
one-to-one private chatting rooms with students or other staff
members. Their main role will be to answer questions and share
information with other participants.
- Students will also have unique IDs and passwords that they
should use to enter the chatting system. Once they are in, they
will be able to create their own rooms, participate in existing
rooms or go to one-to-one private chatting rooms with other
students or staff members. Students will be able to get answers
to their inquiries quickly and from the right staff member.
- Chat Manager is a privileged user where he can control the
chat and help users (staff and students) resolve any system
related issues. A chat manager can delegate some of
his privileges to other active users to help in managing the
chatting system. Chat managers are usually IT staff and they
have their own unique IDs and passwords as well.
- Groups: group name. Can contain multiple students or staffs.

3.1.4 DFDs

Through DFD, our project illustrates the flow of data elements from the data
source external or internal data store to store internal data or external data sink,
through an internal process. A DFD has no information about the timing of
operations, or whether it will work in sequence or in parallel. Therefore quite
different from Flowchart, which shows the flow controls through an algorithm,
which allows the reader to determine what will be implemented processes, in
what order, and under any circumstances, but not any kind of data will be input if
24

the output of the system, nor where the data comes from and go to, nor where the
data will be stored.

Context Diagram:
The following figure shows the free context of the work of the project.
Figure 7: illustrates the context diagram of the system.

Context-Flow Diagram

Display data
Chatting System User

Send Data / receive Data

Configurable Data Report

Manager

Fig 7: Context Diagram

Level 0 Diagram:
Zero level shows the details of the operations that must be done through our, as is
evident in the following
Figure 8: illustrates the level 0 diagram of the system.
25

Authentication &
Request/Send
5.0 Data

Prepare Data
& Connection
Server User

Configuration
Of connect

Display data
4.0

UserId/Password Authenticate 9.0


Information Procedure
Prepare Data To
Connection/
Display
D2 Authentication Data Authentication

3.0

Connect
Server System
Data Transmit
Connection

2.0 7.0

Content To Student
Distribute Student
Management data Data

Request Configurable
Data /Send Data

Record/Request 1.0 Record/Request

Information Server Application information


Procedure

D1 groups Data D2 Authentication Data


Report

Configurable
Data

Manager

Fig 8: level 0 Diagram


26

3.1.5 Flow chart


A data flow shows the flow of information from its source to its destination.
Through Our work we are divided into three sections section aluminum is a
teacher and a user second and the third represents the administration, as shown in
the following:

 Server Flow chart description

Through flow charts following we will divide operations into three sections
1. Server Listener:
This step on the part of the server, which makes him the ability to send
and receive data to clients through a joint Port.
2. Client connection:
This step on the part of clients, participants in the send and receive from
the server.
3. Services:
which operations are allowed to do during the exchange of data between
clients through the server.

1. Server Listener

Begins the following figure, Configuration the name and port which are
common through sending and receiving data from both sides of the clients.
When firing this port the server to become be able on pass data whether the
send and transferred on both sides. It is then the server needs to array stores the
quantity of data coming from clients.

Figure 9: illustrates the server listener of the system.


27

Start

Configuration Name Server and


Port

Create Listener on a port

Create Array Socket Server of


multi-Client

Server is Ready

Fig 9: Server listener

 Client Connect

The following figure illustrates of client side for connection on the server of it is
needs the name and port of server, through which can send or receive data from
the client side through this server but it will require accept from server side.

Figure 10: illustrates the client connect of the system.


28

Start

Configuration Name and Port of


Server

Create Connect to Server

else

Requirement
Accept From
Server
r

Yes

Client Connected

Client is Connected

Fig 10: Client connect

 The Services
Third part where the service is performed by server to receive and send data, and
so server can transfer data on both , needs to fire so called socket. It is a program
records the client information sender and receiver and required data between .
And fire the server new socket for each client its private socket continues with
him until end the session.

Figure 11: illustrates the services of the system.


29

Start Multi-Client

Create New Socket for Client

Receipt data and ID Client

Convert data from binary to


text

Send Data by ID Client

repeat
Parser Data by
ID -Client Convert data from
text to binary

Go to
Preparation

Preparation of Service

Fig 11: Services

3.2 System Design

Our project depends on socket concept where is a software endpoint that


establishes bidirectional communication between a server program and one or
more client programs. The socket associates the server program with a specific
hardware port on the machine where it runs so any client program anywhere in
the network with a socket associated with that same port can communicate with
the server program.

A server program typically provides resources to a network of client programs.


30

Client programs send requests to the server program, and the server program
responds to the request.

Figure 12: illustrates the server program of the system.

Fig 12: Server program

One way to handle requests from more than one client is to make the server
program multi-threaded. A multi-threaded server creates a thread for each
communication it accepts from a client. A thread is a sequence of instructions
that run independently of the program and of any other threads.
Using threads, a multi-threaded server program can accept a connection from a
client, start a thread for that communication, and continue listening for requests
from other clients[14].

3.2.1 ER-Diagram

Through this review relations Relation databases during the group of the work
program and the most important tables used in log table for users in the table of
Users' of groups for users in the table Group User.

Figure 13: illustrates the relation diagram database of the system.


31

grpID
Username UserID UserID

Password

1 N
Have
Users GroupUser
Gender

Birthday
GroupCode
Courses

Fig 13: Relation Diagram Database

3.2.2 Database Schema (Mapping)

Tables of the database must be set from the ERD. The mapping of tables has a
different way to use but here we refer to the mapping. It should create a table for
each entity and table of the relationship that combines attributes them available
in the event and the primary key for each entity joined together to make the
primary key of the table know the details of the relationship in the following
figures:

Figure 14: illustrates the mapping for chatting system.

GroupUser

grpID UserID GroupCode

Users

UserID Username Password Gender Birthday Courses

Fig 14: mapping for Chatting System


32

3.2.3 Class Diagrams

Development of Class Diagrams

Our System has three major classes. The first one is a server application in
the application server and allows the server to create a connection, send
packets, get the connection status and record all users' requests.
In the second of which the client must be implemented in the user's
application and allows it to send a request to connect to, and after
determining ordinary messages. Each of the messages from the server and
the user interface and the implementation of the message and allow the
message types are:

 GoAuthority: Send Password and user name to verification .


 REGetAuthority: request to resend our user name and password
when there is an error while checking in previously.
 GetLstGroup: request a list of groups for users.
 LstUser: request a list of users participating in the group.
 OKLstUser: the list has been sent by the server.
 Okmsg: message was sent from a user in the class.
 Connected: the verification of user data has been accepted is
connected.

3.2.4 System Models & UML

 Sequence Diagrams:

Authenticate the user to be successful and to establish a session, the client must
follow a plan to negotiate security can involve one or more round trips of the
request and response. In each round trip, the server and client security codes
exchange. Exchanging security codes will continue until either the client or the
33

server determines that the authentication has failed or both sides decide that
authentication is complete. If authentication fails, then the client connection
drops, and refers to an error. If authentication is successful, then it can be
ascertained from the application of a protocol to the identity of the participants as
much support authentication protocol can accomplish[13].
In the graph that follows the sequence, with requests for shares straight line
stands for requests that the client must send. Requests with the dotted line arrows
stand for client requests may be sent. Server must respond to each client's request
that you receive.

Figure 15: illustrates the User authentication and session establishment sequence.

Client Server

Negotiation request

Negotiation Response

Request 1Operation

Operation Response 1

Request 2Operation

Operation Response 2

Request nOperation

Operation Response n

Fig15: User authentication and session establishment sequence

The diagram illustrates the sequence of events during protocol negotiation and
session establishment process. After the completion of the initial exchange of
commands, you should not be repeated through the exchange of contact itself,
otherwise the client server cut off by closing the underlying transport connection.
34

Must use the parameters returned in the response when creating new groups
during the same connection.

 Use Case Diagrams

1. Manager: able to login and create new users, create new group, Add
authentication.

Figure 16: illustrates the use case of the system.

Create New
group Include

login
Include
Create New
user
Include
Update

Add
Extend
authentication
Browse
Extend

Fig 16: Manager Use Case

Use case above is showing the tasks performed by the Manager which are: login,
create new group, create new user, add authentication update and browse task.

2. User: able to login, Browse groups in which registered, Browse time the
meeting, Participate in a lecture and Send an queries.
Figure 17: illustrates the user use case of the system.
35
Browse of
group
Include

Send Include
anmessage
login
Include

Downloadfile
Include

Participatein a
lecture

Fig 17: User Use Case

Use case above is showing the tasks performed by the Teacher, review the
groups that have been registered with them, sending queries to the teacher of
group, download files, private lessons, participate in a lecture.
3. Services-Application System: Interface to the user in order to identify the user
client/server. Thus it will be able to create new users and new group and create
new socket for client, receipt data and id client, convert data from binary to text,
parser data by id-client, send data by id client
Figure 18: illustrates the service application use case of the system.
Create New
Socket for
Client

Receipt data
and ID Client

Convert
data from
binary to
text
Parser Data
by ID -Client

Send Data by
ID Client

Fig18: Service Application Use Case


36

 Architectural View
The chart below shows how the system will be deployed on the physical level, on
the hardware.
Figure 19: illustrates the architecture view of the system.

Chatting System

java.net.Socket

java.sql.*

Database
(MS Access)
Fig1
Fig 19: Architecture view

 Logical View
The diagram below shows how the system will be divided logically into
segments and layers. Each piece is depicted in the form of a box (with a smaller
box in the top left corner, almost like a folder) and can be a group or a user
interface.
Figure 20: illustrates the logical view of the system.

Start/Manager-user ManagerGUI
Users GUI Group GUI
GUI

New Writing& Parserdata


clientconnectionma directingmessages
nagement

Database Helper Tools


Connections

Fig 20: Logical View


37

CHAPTER FOUR

SYSTEM IMPLEMENTATION

4.1 Programming Languages

The Languages used for the development of the chatting system are:

1. HTML5 (stands for Hyper Text Markup language- version 5)


HTML5 is a markup language for structuring and presenting content
for the World Wide Web and a core technology of the Internet. It is the
fifth revision of the HTML standard .Its core aims have been to
improve the language with support for the latest multimedia while
keeping it easily readable by humans and consistently understood by
computers and devices.

2. AJAX(stands for Asynchronous JavaScript and XML)


AJAX is a technique for creating fast and dynamic web pages. It
allows web pages to be updated asynchronously by exchanging small
amounts of data with the server behind the scenes. This means that it
is possible to update parts of a web page, without reloading the whole
page.

AJAX is based on internet standards, and uses a combination of:


- XMLHttpRequest object (to exchange data asynchronously with a
server).
- JavaScript/DOM (to display/interact with the information).
- CSS (to style the data).
38

- XML (often used as the format for transferring data).


AJAX applications are browser- and platform-independent.

4.1.1 Why usingHTML5

Many reasons could make us use HTML5, and here are the most five
reasons to mention:
 It is the future
With all the big players embracing HTML5 already, it looks a fairly
safe bet that it will be the future. How will it exactly pan out, no one
quite knows (or when), but at some point it will land as a standard and
is the next logical step.

 It can help to correctly index your content in search engines


This well may not be the case now, certain tags will help such as
Microformats, but Google search engines are getting smarter and
smarter.

 It can help accessibility


As with Web Standards, just by producing a site that uses CSS for
presentation, it does not mean you’re accessible. HTML5 is the same
story, just by coding in HTML5 doesn’t mean your site is more
accessible. Instead, it’s another arrow in your bow to help make your
site become more accessible.

 It has bundles of new features


HTML5 doesn’t just allow you to mark-up documents with meaningful
semantic tags, it also offers new functionality. These aren’t all in
HTML5 spec per se but part of the new movement towards funky new
web applications, hence why they are mentioned. From watching
videos without having to have a plug in, native form features, the
39

canvas, application caches so information can be stored offline to


geolocation. Whilst these are in no way the finished article, there is no
harm being ready to embrace them.

 It is right now the present


All major modern browsers now support the syntax and so the business cost
of embracing HTML5 is next to zero.

4.1.2 Why using AJAX

There are many reasons that made us make use of AJAX, and some of
these are because it has the following characteristics:

Continuous Feel: Traditional web applications force you to submit a


form, wait a few seconds, watch the page redraw, and then add some
more info, But Ajax offers a smooth ride all the way. There are no page
reloads in AJAX, you're just interacting with the browser and the it is
responding. The server is only telling the screen what changed rather than
having it redraw the whole screen from beginning over and over.

Real-Time Updates: As part of the continuous feel, Ajax applications


can update the page in real-time. Currently, news services on the web
redraw the entire page at intervals, e.g. once every 15 minutes. In
contrast, it's feasible for a browser running an Ajax application to poll the
server every few seconds, so it's capable of updating any information
directly on the parts of the page that need changing. The rest of the page
is unaffected.

Graphical Interaction: Flashy backdrops are abundant on the web, but


the basic mode of interaction has nevertheless mimicked the 1970s-style
form-based data entry systems. Ajax represents a transition into the world
40

of GUI controls visible on present-day desktops. Thus, you will


encounter animations such as fading text to tell you something's just been
saved, you will be able to drag items around, you will see some static text
suddenly turn into an edit field as you hover over it.

Language Neutrality: Ajax strives to be equally usable with all the


popular languages rather than be tied to one language. Past GUI attempts
such as VB and Swing tended to be married to one specific programming
language. Ajax has learned from the past and rejects this notion. To help
facilitate this, XML is often used as a declarative interface language.

4.2 Implementation

4.2.1 Introduction

Users can access the system from any computer, laptop, mobile or tablet, the
important part is that the device runs a web browser.
The system is formed from two parts:
- The first is the client application, which namely is the website
(used by students and staff).
- And the second is the server that serves and replies to the
clients.

So the following environment characteristics should be available for the


system to work properly:
- Operating system: Any Operating System.
- Web browser: Any modern web browser that supports
HTML5.
- Internet Connectivity: Broadband Internet connection with an
appropriate bandwidth.
41

4.2.2 sample of forms

System of three users of the Manager, staff and students. Manager is


administrator for basic data entry. Staff official for management the room
and follow-up inquiries, student works within the room to send inquiries
and discussion with staff.

Figure 21: illustrates the application icon.

Fig 21 : application icon

Fig 22 : application chat

Fig 23 : application log in


42

CHAPTER FIVE
SYSTEM EVALUATING AND TESTING

5.1 Testing plans:

System testing is the process of performing a variety of tests on a system to


explore functionality or to identify problems. System testing is usually
required before and after a system is put in place. A series of systematic
procedures are referred to while testing is being performed. These procedures
tell the tester how the system should perform and where common mistakes
may be found. Testers usually try to "break the system" by entering data that
may cause the system to malfunction or return incorrect information.

So, this could mean two things depending on an SDLC model. The first type
of testing is the actual testing by users. This is usually done in models
wherein implementation does not go with pre-testing with users. On the other
hand, there are also testing that uses professionals in the field. This testing is
aimed in cleaning the software of all the bugs altogether. For software that is
set for public release, the software is first tested by other developers who
were not in charge in creating the software. They will weed out the bugs and
suggest fixes if every they find one. Once this stage is completed, it is time to
test the software not just to the developers but to actual users.
43

5.2 Types and Steps of Testing:

The following steps are important to perform System Testing:

 Step 1: Create a System Test Plan.


 Step 2: Create Test Cases.
 Step 3: Carefully Build Data used as Input for System Testing.
 Step 4: If applicable create scripts to Build environment and
To automate Execution of test cases.
 Step 5: Execute the test cases.
 Step 6: Fix the bugs if any and re test the code.
 Step 7: Repeat the test cycle as necessary.

5.3 Test report details:

Every test of the actual-testing or unit-testing is documented in a test report.


Test reports include the following data:

 Name and email address of the tester.


 Date and time at which the test was performed.
 Scope of test.
 Test environment including operating system and type of test
client.
 Test plan i.e. the list of test cases giving method/use case and input
parameters used.
 Test log listing the outcome of the test case executions (manual
testing or automated testing).
 Summary of test results.
 Recommendation for action when errors had been encountered.
44

CHAPTER SIX

THE CONCLUSIONS

6.1 Conclusion

The project dealt with all the steps required for the analysis and design of the
system from collecting the required information, and the questionnaire and to
clarify the objectives from this system and its beneficiaries ,also dealt steps How
will the system , and that clarification through drawings flowchart, DFD and
ERD, which will help is clearly in the application of the system in the second
phase of development of the project, which will be chatting system development
using Java. Which will deal the programming stage and test the system by users
beneficiaries from this application.

6.2 future of work


1. Make a mobile version for the application to allow students and staffs to
access through their mobiles.
2. Add the download link for our application to Qassim University website
to be available for all.
45

REFERENCES

[1] Ian V. Sandoval CLIENT/SERVER TECHNOLOGY, ,2005


[2] Waleed Farah,DEVELOPING A CHAT SERVER,Fall 2000
[3] Rahman, M. M., Development of Dialogue Based Object Oriented Client/
server Applications On the Internet: An Online Interviewing System, AIT
Masters Thesis CS- 98-17, 1998.
[4] Berson, Alex., Client-server architecture. McGraw-Hill, 1994.
[5]Chat Rooms,
http://en.wikipedia.org/wiki/Chat_rooms,2002
[6] Kendall & Kendall,Systems Analysis and Design
,Sixth Edition,2005 Pearson Prentice Hall
[7] McGraw-Hill Osborne Media ,The Complete Reference JAVA 2 fifth
edition, 2002
[8] Ian Darwin, Publisher: O'Reilly, Java Cookbook (e-book), First Edition June
2001
[9]Disadvantages of Using Skype ,http://www.ehow.co.uk/ list_5907068_ disad_
vantages-using-skype.html
[10]Advantages and Disadvantages of Skype ,http://wadams6.blogspot.com
/2011/02/movie-platoon.html
[11] System Development Life Cycle (SDLC) Methodologies ,http:// www .slepi
.net/blog/system-development/system-development-life-cycle-sdlc-
methodologies.html
[12] Ishaya. G et al (2010) towards an efficient information systems development
process and management: A review of challenges and proposed strategies,
software engineering and publications
[13]Software Engineering, 8th Edition, Sommerville , ISBN: 0321313798 , June
4, 2006
[14] Socket Communications, http:// www.oracle.com/ tech network/java/socket-
140484.html
46

[15]Programming with JAVA, Java Development Kit, Safari Books Online is a


digital library
http://my.safaribooksonline.com/book/programming/java/9788131720806

[16] This document was prepared by National Center to Improve the Tools of
Education, U.S. efface of Special Education Programs.
http://idea.uoregon.edu/~ncite/documents/techrep/tech01.html

You might also like