Relative Content

Tag Archive for design

How to deal with hard configurations at the component level?

I distinguish three organisation levels while programming: the library level, the component level and the application level. A library defines functions to solve a range of related problems or preform related operations in tools and no policies manner. An application lets several libraries interact and defines policies for diagnostic, error handling, internationalisation,… A component sits between the library and the application, it handles low-level errors and produce diagnostics, it might old global state and is aware of other components.

Ordering menu items fed from multiple modules.

I have a main application that can load modules (or plugins). Each modules can define one or more links (or items) that will be displayed in a side menu defined in the main application.

Ordering menu items fed from multiple modules.

I have a main application that can load modules (or plugins). Each modules can define one or more links (or items) that will be displayed in a side menu defined in the main application.

Game server code design

I’m designing a multiplayer game server where the players are in rooms. Right now I have classes to take care of the client, networking, etc. I’m struggling however to find a design for this Room class. For example, when I want to change a client’s room, should I call client.changeRoom(newRoom) or newRoom.addClient(client)? What about when leaving a room, should a client detach itself from the room or the room detach the client? I’m very confuse here, I just don’t want to end up with a design I will regret in the future.