Abstraction (computer Science) - Control Abstraction - Structured Programming

Structured Programming

Structured programming involves the splitting of complex program tasks into smaller pieces with clear flow-control and interfaces between components, with reduction of the complexity potential for side-effects.

In a simple program, this may aim to ensure that loops have single or obvious exit points and (where possible) to have single exit points from functions and procedures.

In a larger system, it may involve breaking down complex tasks into many different modules. Consider a system which handles payroll on ships and at shore offices:

  • The uppermost level may feature a menu of typical end-user operations.
  • Within that could be standalone executables or libraries for tasks such as signing on and off employees or printing checks.
  • Within each of those standalone components there could be many different source files, each containing the program code to handle a part of the problem, with only selected interfaces available to other parts of the program. A sign on program could have source files for each data entry screen and the database interface (which may itself be a standalone third party library or a statically linked set of library routines).
  • Either the database or the payroll application also has to initiate the process of exchanging data with between ship and shore, and that data transfer task will often contain many other components.

These layers produce the effect of isolating the implementation details of one component and its assorted internal methods from the others. Object-oriented programming embraced and extended this concept.

Read more about this topic:  Abstraction (computer Science), Control Abstraction

Famous quotes containing the words structured and/or programming:

    The subject of the novel is reality liberated from soul. The reader in complete independence presented with a structured process: let him evaluate it, not the author. The façade of the novel cannot be other than stone or steel, flashing electrically or dark, but silent.
    Alfred Döblin (1878–1957)

    If there is a price to pay for the privilege of spending the early years of child rearing in the driver’s seat, it is our reluctance, our inability, to tolerate being demoted to the backseat. Spurred by our success in programming our children during the preschool years, we may find it difficult to forgo in later states the level of control that once afforded us so much satisfaction.
    Melinda M. Marshall (20th century)