What is the core idea of OOP ?, OOP core ideas

Source: Internet
Author: User

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 ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.