Click here to Skip to main content
15,921,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralEdit HTML text Pin
Pheonix1-Sep-03 17:19
Pheonix1-Sep-03 17:19 
GeneralMSBNx API help... Pin
JoeSox1-Sep-03 16:50
JoeSox1-Sep-03 16:50 
GeneralTool tips problem Pin
donno201-Sep-03 16:47
donno201-Sep-03 16:47 
GeneralSAPI 4 phrase parsing Pin
Sumo-kun1-Sep-03 15:46
Sumo-kun1-Sep-03 15:46 
GeneralWorking with Files Pin
Jay Hova1-Sep-03 15:10
Jay Hova1-Sep-03 15:10 
GeneralRe: Working with Files Pin
Navin1-Sep-03 15:15
Navin1-Sep-03 15:15 
QuestionWhat are the best (server)options 2 make an Messenger with c++ client?! Pin
lJesper1-Sep-03 13:19
lJesper1-Sep-03 13:19 
AnswerRe: What are the best (server)options 2 make an Messenger with c++ client?! Pin
cmk1-Sep-03 20:29
cmk1-Sep-03 20:29 
Caveat : The following is just one suggested method out of many. I admit there are other 'better' methods - I am aware of them and not interested in hearing about them. Smile | :)
(yes i'm in a pissy mood that will likely be reflected here)

Break the project into milestones.
You want to get to something that compiles and does something as soon as possible.
From there you can incrementally add features.

Milestone 1 : Define database schema
- gather user requirements, for you this can be accomplished by creating a mockup of how you want the client app to behave on paper or a whiteboard.
- from this you can get the user defined data that you will need to persist (i.e. offline message table)
- from the user defined data will follow some of the system data you will need to store to support the client app and user data (e.g. user account table)

Milestone 2 : Client GUI
- create the client app project and build the GUI with menu, toolbars, and view windows as appropriate.

At this point you don't get to take a break, any VB programmer could get this far, keep going.

Milestone 3 : Database access
- http://www.codeproject.com/database/[^]
- pick a RDBMS e.g. Access, SQL Server, mSQL, Postgres, ... and mock up your tables and populate with some test data (e.g. 3 users, 2 offline messages).
- you'll want to use something that wraps ODBC, OLE DB, or ADO to access the database. I use class' that wrap ODBC (and OLE DB on WinCE) but the current trend seems to be ADO (which wraps OLE DB).
- use the database class' in the client app to directly insert/update/delete records.

At this point your database is defined and has test data, your data access logic has been worked out, and you have a working client app, - take a 5 min break and have a beer, you've earned it.

Milestone 4 : Create server console app
- Len Holgate has written a good series on writing a socket server class. http://www.codeproject.com/internet/[^]
- use Len's code to learn about IOCP
- define/implement your protocol
- create a console based exe for the server code, move the database access code from the client app to the server app.
- modify the client app, replace the database access code with the client socket w/ protocol class.

At this point you can see the finish line, you have a working client/server application - take a 10 min break and have a bottle of Jack, you've earned it.

Milestone 5 : Convert server from console app to registered service
- for debugging it is much easier to have the server written as a console app
- check out services in http://www.codeproject.com/system/[^]
- create server class and take current console main() and stuff into server class Run() method.

... you're done, you've wasted a couple hours of your life reinventing the wheel, but hopefully you've learned a fair bit in the process. Smile | :)


...cmk

Save the whales - collect the whole set
GeneralRe: What are the best (server)options 2 make an Messenger with c++ client?! Pin
lJesper2-Sep-03 2:45
lJesper2-Sep-03 2:45 
GeneralRe: What are the best (server)options 2 make an Messenger with c++ client?! Pin
cmk2-Sep-03 8:10
cmk2-Sep-03 8:10 
GeneralRe: What are the best (server)options 2 make an Messenger with c++ client?! Pin
lJesper3-Sep-03 12:48
lJesper3-Sep-03 12:48 
GeneralRe: What are the best (server)options 2 make an Messenger with c++ client?! Pin
cmk11-Sep-03 11:47
cmk11-Sep-03 11:47 
GeneralProgram location in memory Pin
Baatezu_Not_Signed_In1-Sep-03 11:39
sussBaatezu_Not_Signed_In1-Sep-03 11:39 
GeneralRe: Program location in memory Pin
Hydralisk1-Sep-03 14:53
Hydralisk1-Sep-03 14:53 
GeneralRe: Program location in memory Pin
Baatezu_Not_Signed_In1-Sep-03 15:54
sussBaatezu_Not_Signed_In1-Sep-03 15:54 
GeneralRe: Program location in memory Pin
David Crow2-Sep-03 3:35
David Crow2-Sep-03 3:35 
Generalafter much googling and msdning Pin
(Steven Hicks)n+11-Sep-03 10:52
(Steven Hicks)n+11-Sep-03 10:52 
GeneralRe: after much googling and msdning Pin
KaЯl1-Sep-03 12:07
KaЯl1-Sep-03 12:07 
GeneralRe: after much googling and msdning Pin
(Steven Hicks)n+11-Sep-03 13:02
(Steven Hicks)n+11-Sep-03 13:02 
Generalinterrupt handling in win2k Pin
Member 5562471-Sep-03 10:10
Member 5562471-Sep-03 10:10 
GeneralInvoking Task Scheduler Wizard through API Pin
insanely4201-Sep-03 9:23
insanely4201-Sep-03 9:23 
GeneralA GUI Question Pin
Anonymous1-Sep-03 9:14
Anonymous1-Sep-03 9:14 
GeneralRe: A GUI Question Pin
Michael Dunn1-Sep-03 10:14
sitebuilderMichael Dunn1-Sep-03 10:14 
GeneralRe: A GUI Question Pin
lpRomang1-Sep-03 11:07
lpRomang1-Sep-03 11:07 
GeneralRe: A GUI Question Pin
mike :D1-Sep-03 11:44
mike :D1-Sep-03 11:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.