Object-oriented programming is a method that is as close as possible to our behavior. It serves as a natural continuation of earlier innovations related to the development of programming languages. If we talk about structural programming, this direction is much more structured than earlier versions, in addition, it is more abstract, more modular. Earlier, attempts were made to abstract and transfer programming elements to the so-called internal level.
Object-oriented programming involves the use of specialized languages ββfor development. They are usually characterized by a triple of basic properties:
- encapsulation, that is, combining records with functions and procedures, as well as manipulating fields of data records, forming a fundamentally new kind of data called an object;
- inheritance, which implies the definition of an object with its subsequent use to build a hierarchy of created objects with the ability to generate a new object related to the hierarchy, as well as implying access to the code and information about all generating objects;
- polymorphism, that is, the ability to assign actions one name, which will then be shared down and up the object hierarchy, with each object in the hierarchy will be entrusted with the execution of the action in a way that suits him.
Object-Oriented Programming Delphi provides a complete set of programming tools, including: greater modularity and structure, abstractness, built-in reusability. All these characteristics can be attributed to the code, which is more structured, easier in terms of maintenance and noticeably more flexible. Very often, object-oriented programming forces us to leave aside the characteristic judgments about programming, which for many years were considered standard. However, when this has already been done, this development method does not seem so complicated, but seems to be a visual and excellent tool for solving many problems that cause enormous trouble to trivial software.
If you set your task, for example, to study object-oriented programming in PHP, then you should discard and forget what you knew about it before, starting to study it from scratch. Only in this way will you be able to consider all the subtleties of this approach, evaluate its convenience and capabilities. Object-oriented programming is not the only way; it is more like a continuum of ideas focused on compiling clean code. The compiler works on slightly different principles when compared with the interpreter, while its speed is much higher. Compilers are aimed at developing any ready-made software products, and not at solving a limited range of tasks.
Classes
Before object-oriented programming was created, the need for more advanced data types was already brewing in many development languages ββthan real and integer numbers, text variables, and logical variables. It became difficult to work with entire data arrays. It is for this that classes are used in the concept of OOP. It has become much more convenient to work with such structures, since now for objects of the same type you do not need to register a lot of code lines to get what can be generated automatically. For programming in low-level languages, this technique seems very difficult, but at a new stage of development it is quite convenient to use it.