Introducing DexChat!

View of the sourceforge page of the project
Announcing the launch of my first ever application that stands a slight chance in this world full of such stuff, I'm feeling a bit proud at the attention I'm receiving. The secret? DexChat! That's the name of the app I created. And as the name suggests, it is meant for chatting. Read on to find out more. Many of you must be thinking that what is this app with a weird name like that? This is a small Java application, or rather, two applications, that are meant to facilitate sending and receiving messages directly from one computer to another. The main thing, the whole process does not involve any sort of connection to any third party. You send the message, and it is then received by the Dexchat application on the other computer. Another thing, the project is opensource now. That is to mainly develop it further and transform it into a product that is hassle free and easy to use and configure. And if you want to help us develop it further, feel free to mail me and I'll be sure to reply! Now all that follows is technical stuff. If you want to download it, get it from sourceforge. You'll find documentation and guide on the page itself. Please try to spare some time and write a review or recommend(only if you find it good).

Under the hood:

Resources:

  1. Netbeans IDE 7.1
  2. Swing API
  3. JRE

Flow of control:

  1. Client app sends a message to a server listening on a specified port containing the Username and the message typed by the user.
  2. Server app receives the message and adds it to a string in a specified way of formatting or performs a special action if requested.
  3. Server app then sends the string to the Client app to display it in the chat-box.
The last step is repeated every time a client connects. This same principle is used to refresh the chat-box. Whenever the client sends "refresh" (case insensitive), the server interprets it differently and instead of adding it to the string of messages, it just returns the string of messages(updated) to the client for displaying. Similarly there are several server commands that are implemented this way.

Server commands:

  1. cmd_delchat sets the messages string to "" or simply speaking, deletes the messages.
  2. cmd_gettime returns the time on the server or host machine.
  3. cmd_uptime returns the time at which the server was started.
  4. cmd_getmsg returns the number of messages sent in the session.
  5. cmd_getmsgcur returns the messages sent since last cmd_delchat command.
  6. cmd_online returns the number of online users.
  7. cmd_disconnect is to display a message that the specified user has gone offline.
  8. cmd_connect is to display a message that the specified user has come online.
  9. refresh is used to refresh the chat-box.

Bugs and problems:

  1. The Server app becomes unresponsive to input once the "Start server" button is pressed. Then it only acts to the thread that implements the networking commands. It has to be exited forcefully to shut down the server.
  2. There have been occurrences when the client is unable to connect to server and it hangs. It happened when either the port number or the password was incorrect.
  3. I have not been able to add an automatic refresh function. Now any movement of the mouse is able to refresh the screen but there is not an automatic way for it
  4. Sending messages by pressing the enter key has not been possible for me yet. So I added a button and an alternative way, press "\" followed by any key.
  5. At times, if a client tries to connect to the server with a wrong password, the server also becomes unresponsive to other clients.

For Programmers:

This is to all the Java programmers out there, please help us develop this project further and remove these bugs and problems. Also, any new feature that you'd like to have in this program, you are free to do. The source code is also available on the sourceforge project page. All help is appreciated. Going of to code some more guys! Hope to hear from you, dear reader!

3 comments:

  1. This would be perfect had it used usernames instead of IPs. Who wants to get tracked down?
    Mark Weberman, Chicago, IL

    ReplyDelete
    Replies
    1. Thats what I am working on. But since it would need a computer with a static ip address to implement that. Trying to figure some other way out. Thanks for the much needed feedback.

      Delete
    2. Contact me at aero31aero@gmail.com with reference to the above comment.

      Delete