Redirected from Object-based programming
|
What is object-oriented programming The definitions of OOP are vague. The majority of people claim OOP should include both use of objects and some support of reusability including abstraction, inheritance, thus, some languages, known as object-based languages are generally distinguished from OOP languages.
Detail Object-oriented programming expresses a computer program as a set of these objects, which encapsulate data with function and provide regulated communicate between each other to perform tasks. This differs from traditional procedural languages in which data and procedures are separate. The objective of Object-oriented programming is componentise software in-order to make programs easier to write, maintain, reuse and prove correct.
Another way this is often expressed is that object-oriented programming encourages the programmer to think of programs primarily in terms of the data types, and secondarily on the operations ("methods") specific to those data types. Procedural languages encourage the programmer to think primarily in terms of procedures, and secondarily the data that those procedures operate on. Procedural programmers write functions, then pass data to them. Object-oriented programmers define objects with data and methods, then send messages to the objects telling them to perform those methods on themselves.
There is some disagreement about exactly which features of a programming method or language qualify as "object-oriented", but there is a general consensus that the following features are most important (each of which is explained in more detail on its own linked page):
Object-based programming techniques include the concept of an object (encapsulation, and abstraction) but do not include the object-oriented concepts of inheritance and polymorphism.
The concepts of object-oriented programming first took root in Simula 67, a language designed for making simulations, created by Ole-Johan Dahl and Kristen Nygaard of the Norwegian Computing Centre in Oslo. (Reportedly, the story is that they were working on ship simulations, and were confounded by the combinatorial explosion of how the different attributes from different ships could affect one another. The idea occurred to group the different types of ships into different classes of objects, each class of objects being responsible for defining its own data and behavior.) They were later refined in Smalltalk, which was developed in Simula at Xerox PARC, but was designed to be a fully dynamic system in which objects could be created and modified "on the fly" rather than having a system based on static programs.
Object-oriented programming "took off" as the dominant programming methodology during the mid-1980s, largely due to the influence of C++, an extension of the C programming language. Its dominance was further cemented by the rising popularity of Graphical user interfaces, for which object-oriented progamming is particularly well-suited.
Object-oriented features were added to many existing languages during that time, including Ada, BASIC, Lisp, Pascal, and others. Adding these features to languages that were not initially designed for them often led to problems with compatibility and maintainability of code. "Pure" object-oriented languages, on the other hand, lacked features that many programmers had come to depend upon. To bridge this gap, many attempts have been made to create new languages based on object-oriented methods but allowing some procedural features in "safe" ways. Bertrand Meyer's Eiffel was an early and moderately successful language with those goals, but it has now been essentially supplanted by Java, largely due to the emergence of the Internet, for which Java has special features.
Just as procedural programming led to refinements of technique such as structured programming, modern object-oriented software design methods include refinements such as the use of design patterns, design by contract, and modelling languages[?] (such as UML).
See glossary of object-oriented programming
Search Encyclopedia
|
Featured Article
|