Object-Oriented Programming (OOP) Pattern

From GM-RKB
(Redirected from Object Oriented)
Jump to navigation Jump to search

An Object-Oriented Programming (OOP) Pattern is a programming pattern that follows an object-oriented design (of OOP objects composed of OOP Fields and OOP Methods).



References

2020

  • (Wikipedia, 2020) ⇒ https://en.wikipedia.org/wiki/Object-oriented_programming Retrieved:2020-5-6.
    • Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects", which can contain data, in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). A feature of objects is an object's procedures that can access and often modify the data fields of the object with which they are associated (objects have a notion of “this” or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another. [1] OOP languages are diverse, but the most popular ones are class-based, meaning that objects are instances of classes, which also determine their types. ...

2013

2011

  • http://en.wikipedia.org/wiki/Object-oriented_programming
    • … As a result, a significantly different yet analogous terminology is used to define the concepts of object and instance. Benjamin C. Pierce and some other researchers view as futile any attempt to distill OOP to a minimal set of features. He nonetheless identifies fundamental features that support the OOP programming style in most object-oriented languages:
      • Dynamic dispatch – when a method is invoked on an object, the object itself determines what code gets executed by looking up the method at run time in a table associated with the object. This feature distinguishes an object from an abstract data type (or module), which has a fixed (static) implementation of the operations for all instances. It is a programming methodology that gives modular component development while at the same time being very efficient.
      • Encapsulation (or multi-methods, in which case the state is kept separate)
      • Subtype polymorphism.
      • Object inheritance (or delegation)
      • Open recursion – a special variable (syntactically it may be a keyword), usually called this or self, that allows a method body to invoke another method body of the same object. This variable is late-bound ; it allows a method defined in one class to invoke another method that is defined later, in some subclass thereof.
    • Similarly, in his 2003 book, Concepts in programming languages, John C. Mitchell identifies four main features: dynamic dispatch, abstraction, subtype polymorphism, and inheritance.[2] Michael Lee Scott in Programming Language Pragmatics considers only encapsulation, inheritance and dynamic dispatch.[3]
    • Additional concepts used in object-oriented programming include:
    • … Decoupling refers to careful controls that separate code modules from particular use cases, which increases code re-usability. A common use of decoupling in OOP is to polymorphically decouple the encapsulation (see Bridge pattern and Adapter pattern) - for example, using a method interface which an encapsulated object must satisfy, as opposed to using the object's class.
  1. , section 1.6 "Object-Oriented Programming"
  2. John C. Mitchell, Concepts in programming languages, Cambridge University Press, 2003, ISBN 0-521-78098-5, p.278
  3. Michael Lee Scott, Programming language pragmatics, Edition 2, Morgan Kaufmann, 2006, ISBN 0-12-633951-1, p. 470 vikas