6 Replies - 5866 Views - Last Post: 25 March 2011 - 11:18 AM Rate Topic: -----

#1 djenriquez  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 79
  • Joined: 22-November 09

How to start a chat program

Posted 24 March 2011 - 08:18 PM

Hello,

I'm looking to create a chat program that can utilize different protocols from other chat programs such as Skype or MSN Messenger. I'm hoping to create a GUI and allow TCP/IP functions. This is for a final project for my networking class.

I simply wanted to ask where the best place to start would be? Please refrain from unsupportive replies. I realize that I can start by opening emacs and type #include <stdio.h>, but I'm looking for a long term objective.

Should I start with a GUI Toolkit? If so which toolkit? Should I start by creating the networking protocols? Should I start by researching the different protocols the other programs use? Where is a good place to build a foundation?

Any help is appreciated!

Thank you very much!

Is This A Good Question/Topic? 0
  • +

Replies To: How to start a chat program

#2 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1623
  • View blog
  • Posts: 5,710
  • Joined: 03-August 09

Re: How to start a chat program

Posted 24 March 2011 - 08:43 PM

Quote

Should I start by researching the different protocols the other programs use

well i don't know much about networking but that's where i would start. things like Qt, WxWidgets, and GTK make the GUI part a breeze. you should always research your topic first and see if others have solved the problem before you, that way you don't waste time and you can figure out if you need to figure it out on your own. research is always the best place to start.

This post has been edited by ishkabible: 24 March 2011 - 08:46 PM

Was This Post Helpful? 1
  • +
  • -

#3 salindor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 46
  • View blog
  • Posts: 301
  • Joined: 10-November 06

Re: How to start a chat program

Posted 24 March 2011 - 08:48 PM

There are two components to a chat program. There is the server and then there is the client. So the first thing you need to decide is which component you are going to work on (or both).

Next you need to pick a framework if any. This is based on several factors: does it need to be cross-platform, do you want to learn a particular framework, do you have one you already know, what your learning curve is for the framework being choosen. Honeslty I usually use a simple chat program as my way of learning a framework; but I don't normally make chat programs capable of talking to skype of msn, I just make my own protocol. It all depends on your objectives.

Next I find it is best to understand the communication protocol. If you are going to communicate with an established chat protocol; then start downloading their docs and reading it. If your going to make up your own, now is the time to do that.

Next if you are doing the client you should draw up what it will look like. If your doing the server you should consider what features you want (will it support redundancy, failover, or just be a simple server).

Now all that is left is to code.

Salindor
Was This Post Helpful? 2
  • +
  • -

#4 djenriquez  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 79
  • Joined: 22-November 09

Re: How to start a chat program

Posted 24 March 2011 - 10:31 PM

Thanks for all the advice!

Is there any specific framework that is easier than others? Like any project, I'm on a time-crunch. I've had experience coding in C, C++, and ASM with a little java.

I haven't have much experience coding with GUI's but from what I hear, using an application based toolkit like wxDev C++ is the easiest way. Is this true?

Thanks again.
Was This Post Helpful? 0
  • +
  • -

#5 salindor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 46
  • View blog
  • Posts: 301
  • Joined: 10-November 06

Re: How to start a chat program

Posted 25 March 2011 - 04:45 AM

Sadly most my focus has been on the server not the client.

If your windows only, then CLI (.NET) is nice because you can drag and drop the GUI and focus on the logic. There is a little bit of pain to go between native C++ and CLI C++ but its not bad.

QT is sort of nice; but I personally don't like how its coded.

Another approach is you make your client Java and your server c++ if they allow mixed langauges. Having a client in one language and a server in another is more common that you might suspect. For example League of Lengend's client is adobe air while their servers are in C++ and Java.

I have not had a need to study wxwidgets or GTK.

Salindor
Was This Post Helpful? 1
  • +
  • -

#6 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: How to start a chat program

Posted 25 March 2011 - 04:48 AM

I advise you stick to a popular library, such as WinSock. Just keep reading up on it and eventually, you will be confident enough to write a simple chat program, perhaps a console application first. For GUI, I recommend the Windows API. I have got 2 entries in my Intro the Windows API series, if you want to get started. Although, I am aware that there are many other tutorials out there of higher quality.

Intro to the Windows API
Intro the Windows API: Creating a menu

This post has been edited by Aphex19: 25 March 2011 - 04:48 AM

Was This Post Helpful? 0
  • +
  • -

#7 djenriquez  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 79
  • Joined: 22-November 09

Re: How to start a chat program

Posted 25 March 2011 - 11:18 AM

View Postsalindor, on 25 March 2011 - 05:45 AM, said:

Sadly most my focus has been on the server not the client.

If your windows only, then CLI (.NET) is nice because you can drag and drop the GUI and focus on the logic. There is a little bit of pain to go between native C++ and CLI C++ but its not bad.

QT is sort of nice; but I personally don't like how its coded.

Another approach is you make your client Java and your server c++ if they allow mixed langauges. Having a client in one language and a server in another is more common that you might suspect. For example League of Lengend's client is adobe air while their servers are in C++ and Java.

I have not had a need to study wxwidgets or GTK.

Salindor


Thanks alot Salindor, I'll look into CLI and probably start it there. I really don't want to worry too much about the GUI and focus on the logic, so this makes sense.

I'll most likely start with the server and have my partner who knows more about Java start the client.

Thanks again for your help!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1