Definition: It is a technique to develop computational solutions using software components. It is a programming paradigm that uses objects and their interactions to design applications and computer programs. The term of OOP indicates more a way of design and methodology of development of software than a programming language because it can actually apply the Design Object Oriented, any kind of language programming. Object-oriented programming represents from the 90s what structured programming was for the 70s a new and important paradigm for the improvement of the construction, maintenance and use of the software.
There are various differences between POP and OOP. Traditional methods of programming tend to see programs as a set of procedures that call each other. Each procedure has associated passive data on which it operates. The object-oriented programming changes this vision by another in which an application is composed of objects with their own state endowed with functionality. Objects communicate with each other, and each has its own form of response, which is determined by a series of procedures that are associated with each object.
Basic concepts of the object-oriented programming
- Class: A joint class element that shares the same properties and methods is class. The instance of a class which gets created what is called an object. There are superclasses and subclasses. This creates what is called class hierarchy, where the parent class inherits the child classes.
- Method: Constitutes the logic of an object. The algorithm that is implemented to perform a certain operation on the attributes of the class or a derived class.
- Events: When something interesting happens, events enable a class or object to notify other classes or objects. The class that sends the event is called the publisher, and the classes that receive the event are called subscribers.
- Message: It constitutes the communication that is established between objects to exchange parameters whether they are input, output or both. Through parameters, a collaboration scheme between objects is established.
- Internal state: It is a variable that is declared private, that can only be accessed and altered by a method of the object, and that is used to indicate different possible situations for the object (or class of objects). It is not visible to the programmer who handles an instance of the class.
Characteristics of the OOP
- Encapsulation: It is that capacity of the class to hide us its interiorities so that we only see what we have to see, without having to worry about how it is coded so that it does what it does, we simply must care that it does. It establishes the separation between the object's interface and its implementation.
- Inheritance: The facility by which a class inherits the public properties and method of another class. The inheritance can be simple or multiple.
- Polymorphism: It is important in object-oriented programming since it allows to use elements that have the same name, regardless of the type of object that is being used at that time. It determines that the same method name will perform different actions according to the object on the that has been applied.
- Modularity: it consists of dividing a program into modules that can be compiled separately. However, it will have connections with other modules.
- OOP in Visual Basic: The OOP is an evolution of the programming by procedures also called structured. It was based on functions and procedures and the code that controlled the flow of calls to them. In Visual Basic, especially in previous versions is still programming much like that. Sometimes, due to ignorance and others due to "fear", the jump to the OOP is not made, although a programmer with experience in VB can make great applications without using the OOP (and without taking advantage of its advantages), and above all, in a while. Relatively small.
Programming in Visual Basic can be done in different ways or styles. This language was born as a rapid prototyping environment (RAD) for applications under the Microsoft Windows operating system. Object orientation is incorporated as an element after the birth of language and is currently not fully supported.
Despite the above, Visual Basic allows the application of object orientation concepts, although this does not correspond to direct mapping. Here is a technique that allows programming in a standard way, based on a UML class model.
On the other hand, the concepts that are raised are easily applicable to other visual programming languages. In addition to complying with the paradigm of object orientation, here are presented programming forms that comply with a three-layer architecture.
In this way, the logic, regarding business rules, is isolated from the interface elements and the storage form of the objects. Under this type of architecture, it is possible to physically separate these business components, being able to centralize in specialized servers, through the use of transactional monitors such as Microsoft MTS.
Abstract: An object is an abstraction of some factor entity of the real world that has attributes that represent their characteristics or properties and methods that represent their behavior or actions they perform.
All properties and methods common to objects are encapsulated or grouped into classes. A class is a template or a prototype to create objects; that is why it is said that objects are instances of classes.
Object-oriented programming is a paradigm that uses objects as fundamental elements in the construction of the solution. It arises in the 70s. An object is an abstraction of some factor entity of the real world that has attributes that represent its characteristics or properties and that represent its behavior or actions that it performs. All properties and methods common to objects are encapsulated or grouped into classes.
Choosing the programming environment depends mainly on the type of application to be developed. If the application involves operations with database, web interfaces or other business tasks, the ideal option is Visual Basic.
If you are the programmer who wants everything under control then the API approach is the choice.
The programmer should realize that, however, everything is hand-coded and can take more time to write than a solution designed in the VB or VB / COM approach. Conclusion:
We can say that object-oriented programming languages treat programs as sets of objects that help each other to perform actions, understanding as an object the entities that contain data and allowing programs to be easier to write, maintain and reuse.
Fundamentally the OOP brings with it a wide variety of themes, illustrations that make it perfectly understandable for what it is the object-oriented programming known as the OOP.
With the OOP we have to learn to think things differently. Writing our programs regarding objects, properties, methods and other things that we will quickly see to clarify concepts and give a small base that allows us to let go a little with this type of programming.
Constructor: The Special method used to initialize the state of a new object.
Constant: A variable declared as final in Java. All objects of the same class normally share a constant of the class.
Compilation: Process of translation of a programming language. Normally this process involves the translation of a high-level programming language into a low-level programming language.
Concrete Class: A class designed to create (have) instances of objects.
Daughter Class: It is called subclass.
Boolean: Primitive types of data in Java. The Boolean type can take only two values: true (true) and false (false).
Declaration: Defines the variables, methods and classes in a program.
Debugging: Process of finding, fixing and eliminating errors in a program. For these tasks, a programming tool known as a debugger is usually used.