We are here to learn one of the most important concepts of software development using the most modern programming language: Swift. It’s a wonderful time in history to begin this journey.
As much as it is exciting to learn how to utilize the latest and greatest, it’s equally important to know where it comes from.
Object-oriented programming is an inescapable programming technique today, as we saw in the previous chapter. To understand what it is and what made it successful, let's see how it came to life.
For that we must travel back in time, all the way to the 60s when computer graphics did not exist! At that time, Ivan Edward Sutherland, an American computer scientist, implemented an application that allowed for drawing. It was called SketchPad.
It was developed for designers, who could use a stylus to draw simple geometrical shapes like triangles, squares, circles and so on, using a computer. This project was the starting point of computer-aided design(CAD).
What’s interesting is that it was also one of the founding examples of Object-Oriented Programming.
Why is that?
Because in his program, Ivan used what we now call "objects" to represent real life geometrical figures that were understandable for designers in order to draw and manipulate them. Instead using an endless number of variables and functions, he grouped programmatic descriptions (that would be stored in variables) and manipulations (that would be implemented as functions) by context of a concrete geometrical figure ("object") and managed them in a relationship to those particular real life elements (geometrical figures).
Those descriptions we now call properties and manipulations - methods!
Sutherland's project and a few others influenced the programming language Simula in 1967 which experienced a major update that year (called Simula 67). That update included the introduction of objects as a principle capability.
In the 1970s, Xerox (which is responsible for the invention of the mouse and the graphical interface) was working on a personal computer (or a PC !) They wanted to create a computer anyone could use easily by manipulating the GUI and a mouse (nice try ).
To represent all the elements on the screen and support the logic of their display and operations, a team led by Alan Kay created the SmallTalk language, which was inspired by Simula. According to many sources, this marked the formal establishment of Object-Oriented Programming concept that we use today!
Those approaches became popular in 1981 and served as a starting point for great object oriented languages such as:
Objective-C is the original language for native development for iOS. It’s been improved and enhanced since then by Apple and is still a common choice for iOS developers.
C++ is an object-oriented version of the C programming language. Both C & C++ are still widely used, especially in very specialized industries.
As we can see, the incredible progress in programming occurred as a solution to a problem: making software development easier!
We are about to find out!
The initial implementation dates back to the drawing application SketchPad, which allowed for the drawing and manipulating of simple geometrical figures.
Further progress and formalization of OOP was made with the introduction of the Simula programming language update.
The final concept of OOP has been established in the implementation of the programming language SmallTalk.