Skip to main content

Chatting Application | Demo Project | Learn Java

How to make a simple chatting application Java Web?

REQUIREMENT

Simple chat application.
Users can register their names to the application.
After login, the user can find any registered friend and start a chat.
If a user had previous chat with a selected friend, it should load in chat view.
Sent messages and received messages must show without affecting the chat page.

ASSUMPTIONS for DEMO PROJECT

Usernames do not duplicate.
Register different names, login, and chat with others.
No need of sending pictures, videos, etc. Just create a text message chat.
This demo project is not about user registration, login, file uploading… etc.
This demo project is about chatting between two users and how to keep and update chats using a data structure.

IMPROVEMENTS

Develop better user registration and login system with generating unique user ids to avoid duplicate issues.
Develop privilege management for users.
Develop chat that can send images, videos too.

OPTIONAL

Do not use MYSQL or any other DBMS for this development.
Use Java classes and Lists to create custom data structures to keep chats between users.

SIMPLE EXPLANATION of DATA STRUCTURE CREATED for DEMO PROJECT

Create a java class users that keeps a list of users.
Create methods for add users, check if a user exists and get all users.
Create a java class ongoing chat that keeps a list of chats between users.
Create a java class chat template that can identify who’s chat, chat with, and the chat.
When a user starts a new chat, create a new chat template and add it to the ongoing chat list.
IF the user is continuing a chat, find the chat template related to the user from the ongoing chat list and update it.

DEVELOPMENT

Try to understand the requirement and develop your own project.
Better recover your knowledge of Java Web, JSP, Servlet, AJAX...etc before develop.
Try to make your own data structure. If it is that hard, use a DBMS first.
Learn how to make your own data structure and apply it to your project.

SCREENSHOTS of DEMO PROJECT








That’s all !!!
Make your own project and practice. Memorize the main steps and keep thinking while developing.
Follow the demo project given. The project is made using an IDE called Netbeans.
Find and copy JSPs, servlets/ java classes if you use another IDE.
The demo project is basic and clear. You can apply this to any of your projects.
Hope you enjoyed, learned something new, and helped for better work.
Thank you for reading. See you with another practice.

Download demo project here

Comments

Popular

Tkinter Login System | Demo Project | Learn Python

Python practical Requirement Simple user registration and login application. Three interfaces minimum Sign-in: This is the main interface. Enter email and password, then log in. And the option to create accounts for new users. Sign-up: This interface is used to register new users. All user details are saved in a text file. You can build your own structure to save data. Dashboard: This interface will pop up when the user sign-in is successful. This interface has a menu bar with submenu items and a simple text file. You can customize this as your own. All registered users are saved in a text file called “users”. Read the text file when the user is sign-in and write when the new user sign-up. Interfaces This is the main interface of the program also the sign-in interface. Enter email and password and press the sign-in button. The dashboard will be pop up if login is successful else show an error message. This is the interface when the user wants to create a new account. This inter...

How to get a proper Affidavit in Sri Lanka?

What is an Affidavit? An affidavit is a written statement by a person under an oath or affirmation. An affidavit is administered, signed, and sealed by a registered lawyer, the high court, and the ministry. An affidavit includes a related person's personal details, family details, document details, and a comparison of each document detail.  An affidavit includes an oath or affirmative statement to each document's comparison is true and it states about the same person even if there are some differences. An affidavit includes several signs and seals at the bottom of the statement. 1. Related person's signature. 2. The lawyer's name, signature, and seal. 3. The ministry's signature, and seal. The lawyer,  1. Should be registered in the high court. 2. Should have a valid seal. 3. Should able to issue high court receipts. The lawyer should meet all the requirements above to certify a valid affidavit What is the routine of collecting a proper affidavit in Sri Lanka? First...