Original Post
I'm in te process of reading the second edition of Code Complete, and I'm trying to put some of the things I learned from that book to the test. However, I'm wondering if I'm thinking about this the right way, and if not, what I need to change. Chapter 5 discusses design, and reccomends using several layers: The entire software system consists of several subsystems (which know as little about each other as possible), which in turn each contain several different classes. (Fortunately, this particular chapter is available as a sample on the author's website as a pdf file. Look at pages 82 through 85 for the discussion on subsystems I'm talking about.) As subsystems, the book lists, for example, User Interface, Graphics, Data Access, Application Level Classes (??), Enterprise Level Tools (???), etcetera. I've been trying to split your basic game up into these subsystems and came up with the following: Input (containing classes like Keyboard, Timer and Mouse which figure out and report if any input happened) Output (containing things like Sound and Graphics) Data (containing scripts and game data, and ways of reading/writing them to disc) User Interface (containing menu structures and such. This keeps turning up as the central hub in every design I make. It asks Input what input has occured, manipulates Data in some way, tells output what to render, etc.) Basically, in all my designs, User Interface keeps turning up as the subsystem interacting with all the other subsystems. I can't shake the feeling that there's something not right about this. How am I thinking the wrong way about this? What could I do to improve the design?