User:GustWind/Object-Oriented Programming

Object-oriented programming, or OOP, is a fundamental style of computer programming that uses 'objects' as the main organizational structure. Objects are a form of data which consist of fields, which contain data, and subroutines known as methods. The object-oriented paradigm was introduced in the early 1960's, but did not come into widespread use until some time later.

Overview
In object-oriented programming, an object is an isolated group of values and functions. Other pieces of the program can only access the parts of the object which have been made publicly available. This is an organizational technique which attempts to make programs easier to understand and manage; however, some believe that such a design paradigm actually makes software more difficult to design, document, and maintain.

History
The first programming language that can be considered fully object-oriented was Simula 67, a language developed in the 1960s at the Norwegian Computing Center at the University of Oslo. Since then, the ideas introduced in Simula have appeared in many programming languages. In the 1970's, the Smalltalk programming language was created. Smalltalk helped to develop the object-oriented programming paradigm that had been introduced with Simula, and would go on to deliver this paradigm to a larger audience.

Concepts and Vocabulary
In her paper "The quarks of object-oriented development," Deborah J. Armstrong identifies 8 important elements that compromise the object-oriented design paradigm. The elements are inheritance, objects, classes, encapsulation, methods, message passing, polymorphism, and abstraction. Each of these elements is described in further detail below:
 * Inheritance : Inheritance is "a mechanism by which object implementations can be organized to share descriptions", a method of defining new classes using elements from existing classes, allowing the reuse of existing code with a minimal amount of modification. The concept of inheritance was one of many OOP concepts first introduced in Simula in 1967 , and it was later expanded upon in Smalltalk . With inheritance, a new class can be defined as having a superclass. The subclass inherits the methods and fields of the superclass, and can add additional methods and fields in addition to overriding the existing superclass methods.
 * Objects : Objects were also introduced as a new concept in the Simula language . Objects are often introduced as representations of various real-world objects, although they can also represent more abstract items. Also, objects are generally specific instances of a class . Thus, an object can be described as "an individual, identifiable item, either real or abstract, which contains data about itself and descriptions of its manipulations of the data".
 * Classes : Also introduced in the Simula language, the class is the most basic element of object-oriented program design . The class is often described as being a 'blueprint' from which programs create objects . Classes contain the fields or properties of the items they represent. As a group, these things are known as the members of the class. Also, the code in a class is generally self-contained, often using encapsulation . A class can be defined as " a description of the organization and actions shared by one or more similar objects".
 * Encapsulation : The origins of encapsulation are uncertain, but it is nevertheless an important concept in object-oriented programming. Encapsulation hides the complete details of the implementation of a class from other pieces of the program which interface with that class. For example, a class provides methods which can be called, but the full details of the implementation of those methods are not visible to outside accessors. The result of encapsulation is that each object has an external interface that allows other objects to interact with it . The purpose of encapsulation is to enhance the readability and maintainability of object-oriented programs by decreasing the possible complexity of available operations. In general, encapsulation is " a technique for designing classes and objects that restricts access to the data and behavior by defining a limited set of messages that an object of that class can receive".
 * Methods : Methods, which are sometimes referred to as 'functions,' are often described as the 'verbs' of an object - an object's methods represent the things the object can do . The procedures contained in a method are run when the method is called, and generally involve operations such as accessing, setting, or manipulating the object's data. Although the idea of a method or procedure as an organizational unit of software has existed since before the beginning of object-oriented designs, the idea of the method being bound to an object originated with the Smalltalk language . Since then, methods being attached to objects or classes have become an important identifying feature of an object-oriented design paradigm.
 * Message Passing: Methods, which are sometimes referred to as 'functions,' are often described as the 'verbs' of an object - an object's methods represent the things the object can do . The procedures contained in a method are run when the method is called, and generally involve operations such as accessing, setting, or manipulating the object's data. Although the idea of a method or procedure as an organizational unit of software has existed since before the beginning of object-oriented designs, the idea of the method being bound to an object originated with the Smalltalk language . Since then, methods being attached to objects or classes have become an important identifying feature of an object-oriented design paradigm.
 * Polymorphism : Although polymorphism was in use prior to the development of object-oriented programming, it is a key facet of the paradigm. Essentially, polymorphism is the ability to hide various implementations of a class behind a common shared interface. It allows a programmer to treat objects of a subclass as if they were of their superclass.
 * Abstraction : In general, abstraction refers to the process of creating a simplified version of a complex reality to use as a substitute or simulation. Abstraction has been used in computer science since the 1950s, and it is still important today. An object-oriented approach to designing programs implements abstraction using inheritance — as classes extend one another, they become more and more specific, while the classes from which many classes extend are more abstract.

Examples of Modern Object-Oriented Languages
Many popular modern programming languages are object-oriented in nature, or at least have some traits typical of object-oriented programming languages
 * In languages such as Ruby, everything is treated as an object . Languages designed in this way are known as 'pure' object oriented languages. Smalltalk is another programming language which fits into this category.
 * The extremely popular Java language was designed mainly for object-oriented programming, although it was somewhat based on C++ and therefore still contains some procedural elements . Python is another object-oriented language that also has procedural elements.