Joined: 05 Sep 2006 Posts: 378 Location: The pizza country!
Posted: Fri May 02, 2008 3:27 am Post subject: [OOP] Designing a server with db?
I'm currently writing a server with support of mysql, but I'm currently stuck on the design part of the main class.
Currently, the main class has the sql, network and clientmanager classes as member data, and this last one has a vector of client classes wich parse the packets.
When the client parses the packet, it needs to retrieve data from the database, but the database member is only in the main class..
I think I could fix that by deriving the client class from the main class but I don't think that's a good design..
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum