Object-oriented programming is the predominant paradigm in the software development world. Thus, it is important to understand how object-oriented programming works. One useful exercise may be to compare and contrast object-oriented programming to more traditional structured programming. I will do just that in this essay. We will review some history, give a brief overview of both paradigms, and discuss how they are similar and different. First it’s important to understand the history of these methodologies. Structured programming is itself an improvement of a more primitive paradigm. As the first computers gave way to more powerful systems in the 50s and 60s, the programs that ran on them became more complex. The Goto statement became very common, as it allowed additional flexibility by transferring control to different parts of a program. However, the overuse of the Goto statement resulted in programs becoming so convoluted as to be unreadable by even expert programmers. Such tangled logical sequences became known as “spaghetti code.”
Computer scientists recognized a need for order, and structured programming was the result. They rejected the Goto statement, and instead proposed the three basic control structures that we still use today: sequence, selection, and iteration. They also advocated grouping data into structures the use of subroutines that receive and output data. A closely related subset is Procedural Programming, which incorporates the idea of modularity: creating independent, reusable pieces of code that perform specific functions.
The process these computer scientists were engaged in is known as abstraction. Abstraction allows us to add a layer of conceptual meaning to more concrete details. It allows the human mind to better grasp what the program is actually doing. The overall result of this abstraction was improved readability and simplicity of code. With that in mind, we can see that object oriented programming