Can you help me with instant messenger?

C# Instant Messenger Help

  • I want to start a simple windows P2P instant messenger in C# I'll put here some questions I need guidance for, in the conceptual and technical aspects. Let's say the user had successfully logged into his account, and the app needs now to get and populate the list of contacts (saved on my apache/php/mysql server). How would you implement the data retrieval (important) and later population of the contacts list? Is WebClient.DownloadString[Async] a good approach? Is there a better way? How often should the app check for updated list (online/offline statuses). Recommendations accepted. How can I parse JSON data on C#.NET (Visual C# Studio 2010) I will get JSON strings. Thanks!

  • Answer:

    You should have user relations in a seperate table that links user ID's. The data retreival should happen through a stored procedure that collects all data for that user on the server and sends them to the user. You should use the Observer pattern for the update system, then whenever there is a status change you send a message to the user client, that changes the status. Not sure but I'm pretty sure there is library functionality for this.

Dandy at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.