Structured Programming
Structured Programming
Top-down programming
Top-down programming is the opposite of bottom-up programming. It refers to a style of
programming where an application is constructed starting with a high-level description of
what it is supposed to do, and breaking the specification down into simpler and simpler
pieces, until a level has been reached that corresponds to the primitives of the programming
language to be used.
Furthermore, top-down programming tends to generate modules that are very specific to the
application that is being written, thus not very reusable.
But the main disadvantage of top-down programming is that all decisions made from the start
of the project depend directly or indirectly on the high-level specification of the application.
It is a well-known fact that this specification tends to change over time. When that happens,
there is a great risk that large parts of the application need to be rewritten.
In this style of programming, there is a great risk that implementation details of many data
structures have to be shared between modules, and thus globally exposed. This in turn makes
it tempting for other modules to use these implementation details, thereby creating unwanted
dependencies between different parts of the application.
Object oriented programming, or OOP, is one model of programming language. Unlike other examples of computer
programming language, object oriented programming focuses on the use of objects instead of actions in order to carry
out tasks. This use of objects to design applications instead of actions also involves taking an approach that is more
mindful of data and less concerned with logic, which is more commonly the case in other paradigms.
This different approach taken by object oriented programming means that the view of objects and actions is reversed.
The emphasis is on the objects themselves rather than on the execution of tasks that employ the objects. In like
manner, the structure of object oriented programming does not consider deciding on how to employ the logic, but on
the definition of the data that will be used in the programming.