OOP slang

OOP (Object Oriented Programming).- It’s a way of thinking that states that everything can be represented using a general term: object. An object in this context it’s the basic unit to represent any concept in a system. There are different kinds of objects and these are grouped in classes. Therefore objects of the same class share some traits. Objects communicate sending messages to each other. Thus a useful and simple way to describe an object is as something that can receive a message.

Polymorphism.- An OOP Tenet that states that changes to the behavior of software can be done without changing the structure of the code. Objects communicate sending messages to each other. Hence messages hold the structure of the system. Thus changing the behavior of the system it’s a matter of changing the recipient of a message.

Encapsulation.- An OOP Tenet that states that objects expose behaviors, not data. These behaviors are triggered by messages and may or may not make use of some internal data on the object. However, this is irrelevant to the sender of the message. Good Encapsulation is a prerequisite for Polymorphism.

State.- Any data required by the object to execute display a behavior. Ideally, this data should be exclusively available to the object operations, as dictated by the Encapsulation Tenet.

Inheritance.- Globally considered as an OOP Tenet, it focuses on reusing behaviors through static hierarchies, that is, relationships defined on the code. It is often used as a means to achieve polymorphism.

Composition.- A technique used to reuse behaviors focused on establishing relationships at runtime, as opposed to Inheritance which defines relationships on the code. And as with Inheritance, is used as a means to achieve polymorphism.