Developing a software application is a complex process that requires some guiding principles or methodologies. Many aspects of the process resemble engineering practices, while others are more reminicent of mathematical problem solving. Fortunately, both of these fall under the broad umbrella of general problem solving, a topic pioneered this century by George Pólya. Pólya wrote How to Solve It, a book that has sold over a million copies. In this book he divides the problem solving task into four stages:
Specification can serve a two-fold purpose. English (or any natural language) is inherently ambiguous. To eliminate as much uncertainty, ambiguity, and lack of clarity as possible from the problem description it is necessary for it to be restated in technical or formal terminology. Formulating the problem in terms of software engineering language makes it clear to the designers and programmers exactly what is expected. On the other hand it can also serve as a means of verifying that the analysis produced a correct understanding of the problem.
The design phase is where the plan is devised. It is at this point that commitments are made as to what algorithms and data structures (ways of organizing data within the program) will be used. Whereas the first two steps focused on what the problem was, this step is mainly concerned with how to solve it.
Once the design is completed, the program is ready to be implemented. The algorithms, which may still be expressed in English or some combination of English and computerese, are translated into programming language code that can be compiled and executed.
Finally, the application is tested. Actually, testing is performed throughout the entire development cycle. The model of the problem and the tools used to express its solution are constantly evaluated against the understanding the developers have of the problem. Maintenance is what happens to the software after it is released for use. In many environments, as much as 80% of the development time is spent on maintenance. Usually this is because not enough time was spent on analysis, specification, or design.
Within this framework, there has been a multitude of approaches to the design task. The most commonly used of these methodologies is called top-down design. Top-down design begins by examining the problem as a whole, then recognizes that from this wholistic vantage the problem appears complex, and thus searches for a means by which the problem can be decomposed into simpler parts. In other words, top-down design seeks to reduce the complexity of a problem by organizing it in an appropriate way.
Top-down design has three goals:
If the decomposition is done correctly, there should be a direct, virtually obvious way that the fragment solutions can be combined into a solution of the entire problem.