logo

Design and Implementation Document for Chat Application

   

Added on  2023-05-28

12 Pages1244 Words459 Views
 | 
 | 
 | 
Chat Application
Design and Implementation Document
[Name]
Design and Implementation Document for Chat Application_1

Table of Contents
1.0 Application design.....................................................................................................................2
2.0 Software Development..............................................................................................................3
2.1 Server Design.........................................................................................................................3
2.2 Client Design..........................................................................................................................4
3.0 Application Walkthrough...........................................................................................................6
4.0 Software Testing......................................................................................................................10
TEST CASE 1: SUCCESSFUL LOGIN....................................................................................................10
TEST CASE 2: Invalid Login Details...................................................................................................10
TEST CASE 3: CHECK IF THE APPLICATION PERSISTS DATA..............................................................11
TEST 4: Test Various Modes of Chatting..........................................................................................11
Chat between : Admin and Department......................................................................................12
Test Group Chat...........................................................................................................................12
Design and Implementation Document for Chat Application_2

1.0 Application design
The application developed is a Client/Server chat application, that allows clients to chat with
each other, while also allowing a given client to send a message to all other clients. The
server uses threads to manage client connections. Clients are required to first register with the
server; the registration details of a client are persisted in an xml file, which acts as the
database for the application. A client is only required to register once. Before chatting, a
client has to login. The server receives a client's login request which has a username and
password. The server then opens the xml file which contains list of registered users and their
credentials, and verifies if the client's credentials are correct. Each client connected to the
server can see all other connected clients. By selecting a another client, one can directly chat
with only the given client.
The General flow of the Server start up is as follows;
Figure 1.0 General operation of the server
The client has a more detailed graphical user interface. When a client is started, it checks for
the server and automatically creates a connection to the server. The connection is performed
by the ClientSocket class which also listens for any messages forwarded by the server.
Design and Implementation Document for Chat Application_3

2.0 Software Development
2.1 Server Design
The server is implemented using five classes;
ChatServer: this is the graphical user interface for the GUI, which creates a simple
interface to show connection status.
ServerThread: the class creates the threads that control each client connection
Message: an object that holds the received message or message to be sent
Database: this class interacts with the XML file, which acts as the database for this
application. The file stores details of registered clients.
SocketServer: this class performs the bulk of the processing for the server. It creates
the server and listens for client connections using threads.
Figure 2.0 Server class UML diagram
Design and Implementation Document for Chat Application_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents