View Single Post
Old 09-27-2012, 06:42 PM   PM User | #6
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Well now if I were tasked with this the next thing I would consider doing is coming up with a design approach. It helps to draw out diagrams of how the software is to be architected. The diagrams can help to visualize how to translate the requirements into modules or layers that you need to code. Since you plan to work with an OOP language that will be beneficial as it will be easier to conceptualize the different objects that you might need. Just glancing at your requirements I might suggest something like:

Server App:
Module 1: Message Processor - provides ability to open/close connections along with creating transmit messages and handles the sending of those, receiving and parsing incoming messages. And would provide an API to other modules to allow them to initiate these functions.

Module 2: Command Processor - Would be in charge of processing the command located in the messages and delegate to any other modules that will be handling the work associated with that command.

Module 3: Game Module - Could contain things like creating the random numbers to any logic needed for determing the results of the guesses.

Module 4: Control Module - Would be the main module in your app that kicks everything off and performs any miscellaneous functionality that doesn't warrant having its own module.

Client App would have a similar design with possibly reused modules in some cases since the client is just acting as the middle man between the user and the server relaying the messages back and forth. Just remember in a client/server relationship its the clients who initiate all transactions and the server just sits there waiting to receive and then respond to those requests.

Here is a decent little article describing that
http://www.ni.com/white-paper/4431/en
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote