Time to Get Formal
We started with a seemingly simple concept: build a little, one-player, client-server game of Tic Tac Toe. A player starts a game by choosing whether "X" or "O" will move fist, then plays against herself, alternately playing as each letter. Recognizing the need for some details in order to know what to build, we conducted a basic requirements session to identify and document what the program needed in order to function as we conceived. We quickly discovered that nothing is as simple as it first seems.
As we began to think about the program in more detail, we understood that our simple, little program must represent:
- each player
- the player who may currently move
- the playing field or grid
- occupied and unoccupied cells within the grid
- all available cells to choose from
- the specific cell a player chooses
So, we recognized that our game must consider visual presentation (user interface) and data presentation (system interface) elements in order to represent information useful to both the human (player) and the computer (server). We eventually compiled a list of items we believe succinctly describe WHAT our program requires. We then began to elaborate, in some detail, HOW we might produce the first few items. The following table documents our accomplishment:
| WHAT | HOW | |
|---|---|---|
| representation | grid | HTML |
| representation | cells | DIV or TABLE elements |
| representation | players | images (gif or png), representing X, O, and NULL (available) |
| representation | moves | hyperlinks encoded with current player and cell location |
| event | select first player | |
| event | request cell | |
| event | restart | |
| decision | current player? | |
| decision | cell available? | |
| decision | continue? | |
| decision | draw? | |
| decision | win? | |
| response | present first player option | |
| response | present move | |
| response | present draw | |
| response | present win | |
Exercise #7
Using this MS Word version of the above table, reformatted for your convenience, continue to fill in the HOW column for the rest of the items listed in the WHAT column. Think about details within the scope of what you already know about HTML and hypermedia, visual, textual, and arithmetic representation, and basic decision-making logic.
NOTE: Please do not try to think about program code just yet!
Exercise #8
Use this blank template as your own "WHAT/HOW" guide to begin listing requirements for your web service project. Concentrate on WHAT first. Add more rows as required. This exercise will help you gauge the actual scope of your initial project concept. As you identify and document each detail your system requires to function, you'll begin to get a clearer sense of the effort required to build.
NOTE: Let this exercise help you re-evaluate your project scope. Most projects, in any discipline, are a product of scope, schedule, and budget. Your project schedule is fixed, and will not move. Therefore, you'll need to manipulate scope and budget. Your budget is the amount of time you can reasonably, honestly, invest in the design and construction of your project. So. . . unless you have unlimited time to allocate to complete your project on schedule, this is the time to begin limiting its scope!