Tuesday, May 10, 2011

Top-Down Design – Unitizing a Problem into Modules



In computer programming:

Top-Down design is a strategy of designing computer software.  Top-Down’s approach is to focus on planning and complete understanding of a system before code is written.  Using this process, systems are divided into smaller sub-systems, which can then be divided into sub-systems of themselves, and so on.  This is done repeatedly until the entire program is reduced to its base elements. 

Top-Down design started being used as an interpretation of a process called Step-wise refinement.  Step-wise refinement is a similar process that connects objects to processes in a linear fashion.  In the Top-Down approach, design can use step-wise refinement but it can also branch out.  In other words, a single module could have multiple sub-systems when using the Top Down approach. 

Both Process and Control Modules are used in the Top Down approach to help interaction between different modules.  A Control Module contains code that enhances the functionality of the software.  It controls or sets rules on how modules interact with each other.  Process Modules perform calculations when modules interact with each other. 

The Top-Down design strategy aids when problem solving because a programmer can pinpoint where bugs are.  Programmers can fix bugs by re-writing code in only the modules with bugs in them, as each module is a small self-contained program.  Also if you need to go back and make modifications to a sub program, you can do so without searching through lines of code in an enormous program.  Top-Down design can take more time in the developmental stage, but overall, using the top-down method can save time.  Time is saved in the testing and debugging phases.

In the real world:

Top-down design can be and is used in a real world setting quite often.  When writing a research paper, one would normally start by deciding what the paper is about and a thesis.  From there the author of the research paper would normally devise an outline.  The paper’s outline is basically what top down design is.  It lays out the thesis, sub-points, and facts that back up your thesis, into a structured and organized form.  An outline is a skeletal representation of your research paper just as top-down design provides a skeletal representation of the program you’re designing. 

When running a big corporation there are many different jobs to be done.  Different duties are divided up into departments, each department has a boss, they in turn divide the work that needs to be done into different jobs, then the people in these jobs hire people underneath them and split up the work-load.  On top there is a CEO, underneath him is a few vice-presidents, underneath them are the managers, underneath them are salesmen, under them are assistants, etc.  This is a good example of branching and how the workload is split up in programs when using the top-down design strategy.

These are only two of the many things in life that the idea of Top-Down design can be applied to.  Virtually any big project can be broken down into smaller tasks, which can be broken down into even smaller tasks.  Top-down design is an intelligent way to plan anything that is large and hard to comprehend as a whole.

No comments:

Post a Comment