Design is essential in software development. The subject of software design is both broad and deep, and I can hardly scratch the surface in this chapter. Fortunately, there are a number of good texts in the field, two of which are mentioned in the "Further Reading" section at the end of this chapter.
In the broadest generality, design can be broken into two categories: top-down and bottom-up.
Bottom-up design is characterized by writing code early in the design process. Basic low-level components are identified, and implementation begins on them; they are tied together as they are completed.
Bottom-up design is tempting for a number of reasons:
It can be difficult to wrap yourself around an entire abstract project. Because you start writing code immediately, you have quick and immediate deliverables. It is easier to handle design changes because low-level components are less likely to be affected by application design alterations.
The drawback of bottom-up design is that as low-level components are integrated, their outward APIs often undergo rapid and drastic change. This means that although you get a quick start early on in the project, the end stages are cluttered with redesign.
In top-down design, the application as a whole is first broken down into subsystems, then those subsystems are broken down into components, and only when the entire system is designed are functions and classes implemented.
These are the benefits of top-down design:
|