What is the core idea of OOP ?, OOP core ideas
Object-Oriented Programming (OOP) is a computer Programming architecture. One basic principle of OOP is that a computer program is composed of a single unit or object that can act as a subroutine.
Core Ideas: encapsulation, inheritance, polymorphism.
OOP has achieved three main objectives of Software Engineering: reusability, flexibility, and scalability. To achieve the overall operation, each object can receive, process, and send information to other objects.
OOP has the following concepts and components:
Component-a unit formed by data and functions in a running computer program. components are the basis of modules and structures in OOP computer programs.
Abstraction-the Program has the ability to ignore some aspects of the information being processed, that is, the ability to focus on the main aspects of information.
Encapsulation-it is also called Information encapsulation: to ensure that the component does not change the internal status of other components in an unpredictable way; only in those components that provide the internal state change method, to access its internal status. Each type of component provides an interface for contacting other components and specifies the method for calling other components.
Polymorphism-the reference and class assembly of components involve many other different types of components, and the result of referencing components must be based on the actual call type.
Inheritance-allows sub-components to be created based on existing components, which unifies and enhances polymorphism and encapsulation. Typically, classes are used to group components, and new classes can be defined as extensions of existing classes, so that classes can be organized into a tree or mesh structure, this reflects the versatility of the action.
Because of abstraction, encapsulation, reusability, and ease of use, component-based programming has become particularly popular in scripting languages, the emergence of Java makes its oop idea a great development. Python and Ruby are recent languages that fully adopt the idea of OOP during development, the popular Perl scripting language has gradually added new object-oriented functional components since version 5. Replacing "reality" entities with components has become the reason why JavaScript (ECMAScript) becomes popular, it has been demonstrated that appropriate combinations of components can replace the HTML and XML Document Object Model (DOM) on the English site ).