Directed Programming object
The directed programming (POO) object or object-oriented programming , is a data-processing paradigm of Programmation which consists of the definition and the assembly of software bricks called object ; an object represents a concept, an idea or any entity of the physical world, like a car, a person or a page of a book.
Orthogonally with the programming by object, in order to facilitate the development process of a program, exist methodologies of software development object of which most known is USDP (Unified Software Development Process).
It is possible to conceive by object an computer application without to use dedicated tools. It does not remain about it less than the latter facilitate of much the design, maintenance, and the productivity. One distinguishes several sortes  from it;:
- computer programming languages (Objectifies C, Eiffel, Python, C++, Smalltalk…)
- the numerical models which make it possible to conceive in the form of semi-formal diagrams the structure of a program (Objecteering, UMLDraw, Rapsody…)
- distributed buses (COM, CORBA, RMI, Pyro…)
- the computer aided software engineerings (or CASE) (Rational Pink XDE, Objecteering…)
Object-oriented languages, there are currently two catégories : languages with classes and those with prototype, that those are in functional form (CLOSED, OCaml…) or imperative (C++, Java…) or both (Python).
Origins
The language Simulated-67 throws the premises of the programming object, result of work on the development of languages of Simulation in the Années 1960 which also research on the Artificial intelligence in the Années 1970 took as a starting point - 80. But it is really by and with Smalltalk 72 then Smalltalk 80, inspired partly by Simula, that object-oriented programming begins and that the basic concepts of that-ci  are posed;: object, messages, encapsulation, polymorphism, heritage (under-typing or under-classification), redefinition, etc Smalltalk is more than one object-oriented language, it is also a complete interactive graphic environment.Starting from the Years 1980, begins the effervescence of the languages with objets : Objectifies C (beginning of the year 1980), C++ ( C with classes ) in 1983, Eiffel in 1984, Common Lisp Object System in the years 1980, etc the Années 1990 see the golden age of the extension of object-oriented programming in the various sectors of the software development.
Since, object-oriented programming did not cease evolving/moving as well in its theoretical aspect as practices and various trades and speeches mercatic about it saw the jour :
- the analysis object (AOO or English OOA),
- the design object (COO or English OOD),
- the data banks object (SGBDOO),
- the object languages with the languages with prototypes,
- or methodology with MDA (Model Driven Structures).
Basic principles
The object (attribute and methods)
Concretely, an object is a structure of valuées data and which answers a whole of messages. This structure of data defines its state while the whole of the messages which it includes/understands described its behavior :
- the data or fields which describe its structure interns are called its attributes ;
- the whole of the messages forms what one calls the interface objet ; it is only through this one that the objects interact between them. The answer to the reception of a message by an object is called a method (method of Mise in work of the message) ; it describes how the message is carried out.
The attributes (or more exactly their data-processing representation) and the methods are cachés ; they form a block box. It is the principle of encapsulation. Its principal advantage lies in the capacity at being able to modify the internal structure of the objects or the methods associated with the messages without impact on the users of the objects.
Example of an object representing a given complex number. This one can as well be represented in Cartesian form (real, imaginary) that in trigonometrical or exponential form (module, angle) . This representation, whatever it is, is hidden and is internal with the object in the form of a structure of data. However, this one can propose two messages allowing each one to read a representation different from the complex number. By using the only messages which our complex number includes/understands, the appealing objects are ensured not to be impacted during a change of its internal structure. The latter is accessible only by (and thus also with through) the methods of the messages.
Typing and polymorphism
In object-oriented programming, each object is typified. The standard defines the syntax (how the appeler ?) and the semantics (which is what it fait ?) messages which an object can answer. It thus corresponds, with a margin of little thing, to the interface of the object. However, the majority of the object languages propose only the syntactic definition of a type (C++, Java, C#,…) and rare are those however which provide also the possibility of defining it semantically (Eiffel with its design by contracts ), necessary to benefit as well as possible from the advantages of the design object.An object can belong to more than one type. It is what one calls the polymorphism . This makes it possible to use objects of the different types where a value of a precise type is awaited, as soon as those satisfy the necessary type. A way of carrying out the polymorphism is under-typing (also called heritage of the type) : mechanism by which is refined a father type in another type, under-type ; it is a mechanism of restrictions of spaces of values of the type. The objects of this sub-type are in conformity also with the type father, these objects are thus of at least two types. From this the Principe rises from substitution of Liskov .
Examples:
that is to say a Real type = {more: Real X Real - > Real}
and a sub-type Integer <: Real,
that is to say r: Real and i: Integer, then r more i is valid.
One distinguishes in the object languages three mechanisms from the typage :
- the dynamic Typing : the type of the objects is implicit and given with the execution during the creation of known as objects (Smalltalk, FIELD, Python, PHP…),
- the static Typing : the type of the objects is specified explicitly by the developer at the time of their declaration (C++, Java, C#, Pascal…),
- the typing by inference : the type is determined by the compiler or the interpreter starting from the context, of the expression in which it appears (OCaml).
In the same way, two mechanisms of under-typing existent : heritage of the simple type (Smalltalk, Java) and multiple (C++, Python, CLOSED, Eiffel).
Attention : polymorphism is not to confuse with under-typing or the dynamic attachment (dynamic binding in English).
The redefinition
The programming object makes it possible a sub-type to refine the implementation of a message defined in the father type, in other words to redefine the method associated with the message : it is the principle of redefinition messages (or English overriding).
However, in a strict definition of typing (first order typing), the operation resulting from a call of message must be same whatever the exact type of the referred object. This thus means that, if the referred object is of exact type a sub-type of the type considered in the call, only the method of the father type is exécutée :
That is to say the Reel type = {more: Reality X Reality - > Real}
and its sub-type Entier <: Reel,
then if i: Entier and r: Reel, the appel
i more r
conduit with the execution of the method associated with the message plus in the Reel type, and not with that associated with the same message in the sub-type Entier in the case of a redefinition.
To then carry out the redefinition, two solutions existent :
- the first order typing associated with the dynamic attachment (it is the case of C++, Java, C#,…). This solution induces a weakness in typing and can lead to errors. The relations between type are defined by under-typing (theory of Liskov) ;
- the typing of the second order (whose polymorphism and the call rise naturally from the good method according to the exact type of the object). This is possible with Smalltalk and Eiffel. The relations between types are defined by under-classification (theory F-Bound de Cook).
Class and prototype
The internal structure of the objects and the messages which they answer are defined, clarified, by software modules. It is as by these same modules as the objects are created, via dedicated operations. Two representations exist of these modules : the class and the prototype.The class is a particular data-processing structure in the object language. It describes the internal structure of the data and it defines the methods which will apply to the of the same objects family (even class) or type. She proposes methods of creation of the objects of which the representation will be thus that given by the generating class. The objects are known as then authorities of the class . This is why the attributes of an object are also called variable of authority and the messages operation of authority or methods of authority . The interface of the class (the whole of the visible operations) form types of the objects. According to the computer programming language, a class either is regarded as a particular structure of the language, or it even like an object (not-terminal object). In this last case, the class needs it also to be created and defined by a classe : they are the méta-classes . The introspection of the objects or the méta-programming is then defined in these méta-classes. If not, it is defined in the runtime through the objects or of the classes. The class can thus also be described by attributes and messages. The latter are then called, in opposition to the attributes and messages of an object, variable of class and operation or methods of class . Among the languages with classes one finds Smalltalk, C++, C#, Java, etc
The prototype is an object with whole share and which is used as prototype of definition of the internal structure and the messages. Of this prototype, by the mechanism of cloning, the other objects of same types are created. In this model, there is no more distinction between attributes and messages : they all are of the slots . A slot is a label of the object, deprived or public, to which a définition  is attached;: it can be a value or an operation. This attachment can be modified with the execution. Each modification of a slot is local with the object concerned and does not impact its clones. Each addition of a slot impacts the object and the whole of its clones. To modify overall a slot, in other words to have an impact on the object and all its clones, the concept of feature was introduced. A milked is a whole of of the same operations category (cloning, persistence, etc) transverse to the objects. It perhaps represented either like a particular structure of the language, a dedicated slot or like a prototype. The association of an object to a feature makes that the object and its clones are able to answer all the operations of the feature. An object is always associated with at least a feature, and the features are the parents of the objects (according to a relation of heritage). A feature is thus a mixin equipped with a relationship. Among the languages with prototype one finds Javascript, Self, Io, Slater, Lisaac, etc
See the dedicated article: prototype directed Programming.
Typing and classification
In object-oriented programming, each object is of one or more types. The adopted mechanism by which an object can be several types is under-typing. There exist two great theories on under-typing. That, initial, of Liskov and that, more current, of Cook. In each one, two concepts are définis : that of typing and that of classification.
Typing according to Liskov
The standard , in the theory of the types of Liskov, and whose semantic definition was given by Cardelli, are known as standard of first order . Each object is of an exact type and this type describes syntactically and semantically the messages which the object can answer. This type perhaps obtained by under-typing. The object is then in conformity with all the types of the tree of refinement (also called tree of heritage) of a basic type until the exact type of the object. In this approach, only the definite operation the first time in a father type is carried out even if the referring object is of a sub-type. To allow the redefinition, the dynamic mechanism of attachment is then necessary. In first order typing, the classes provide the representation of the internal structure of the type and the methods attached to each message. They define a family of implementations of the type. The interface of the class then represents the type of the authorities of this class. It is a relation 1 classifies - 1 type and 1 type - several classes ; there is a standard duality/class. In this step, there exist at least two mechanisms of heritage:- the under-typing or the heritage of Interface, and
- the under-classification or the heritage of implementation.
The heritage is the faculty of a subclass or a sub-type to inherit the properties of his/her relative and to refine them. Under-typing is thus the process by which one restricts the space of the values of the relative type, and under-classification is the process by which one recovers and one specializes the implementation (redefinition).
First order typing includes languages like Java, C++ or C#. Certain object languages try to offer a separation between the type and the class (Objective-C and Java), while others mix the class with the type which it implements (C++, Python).
Typing according to Cook
However, the theory of the types of Liskov runs up against the problem of the under-typing of the recursive types (standards with at least an operation which accepts a standard object in the same way).
Indeed :
that is to say the Nombre type = {more: Number X Number - > Number} ,
that is to say Reel <: Nombre.
According to first order under-typing, one aurait :
Reel = {more: Number X Number - > Number}
or at best, with covariance simple :
Reel = {more: Number X Number - > Real}
However, mathematically, this is false, and from the point of view object implies a coercion, even led to an error of typage ! What is correct it est :
Reel = {more: Reality X Reality - > Real} .
Multiple covariance makes it possible to solve this problem, however, with a typing of first order, the types of the arguments of entry of the message plus cannot be refined but only generalized to keep a correct typing.
The theory of the types of Cook (the F-Bound theory) makes it possible to solve this problem by redefining what is a type and what is a class, or more exactly under-typing. It defines what one calls the typing of the second order .
In this approach, the concepts of class and type are not distinct any more but overlapping. A class does not define any more the implementation of one or several types. If the type always defines the interface of the objects, the class defines the implementation of a polymorphic family finished and bound types. The type became an element of a class. The stress then is not laid any more on under-typing as in that of Liskov, but on under-classification ; a heritage will describe the tree structure between classes (and thus implicitly between types). Under-classification makes it possible to restrict the space of the types.
Thus, according to this theory, a class is a generator of the types and each type is generated by solving the parameter of entry of the generator.
Thus, according to our précédent  example;:
Languages like Smalltalk and Eiffel allow the typing of the second order.
Then, one proposes one or of the technical solutions to represent the elements defined in the computing system. It is what one calls object the directed design or OOD (Object-Oriented Design). Once a model of design established, it is possible with the developer to give them body in a computer programming language. It is what one calls object the directed programming or OOP (Object-Oriented Programming). To a model of analysis several models of design can correspond.
To write these various models, various languages and methods were developed, of which OMT of Rumbaugh, BOOCH' 93 of Booch and OOSE of Jacobson. However, these methods made it possible to model only certain types of applications and were limited in other contexts. Method OMT prevailed on the whole of the other methods in the first part of the decade 1990.
Starting from 1994, Rumbaugh, Booch and Jacobson decided to be linked in the development of a new method, sufficiently generic, to be able to apply to almost all the contexts applicatifs. They started initially by defining a language of modeling strongly inspired by those of the methods of the three authors: UML (Unified Modeling Language). Once this one taken charges some by the OMG (Object Management Group), an organization intended to standardize technologies object, like CORBA (Common Object Request Broker Structures), a Intergiciel (English middleware) object distributed, Rumbaugh, Booch and Jacobson attacked the method itself: USDP (Unified Software Development Process). This method defines a generic framework of development object with UML like language of modeling. USDP (generally shortened in UP) is a method iterative and incremental, centered on the architecture and guided by the cases of use and the Réduction of the risks. It is to the originators to allot this method by instanciant it to their trade and their field. In industry, two great authorities of USDP existent : RUP (Rational Unified Process) and 2TUP (2 Tracks Unified Process).
Nevertheless for a certain number of originators object, whose Bertrand Meyer, the inventor of the language directed object Eiffel, to guide a modeling object by cases of uses is an error of method which does not have anything object and which is closer to a functional method. For them, the cases of uses are relegated to rather additional uses as the validation of a model for example.
That is to say Classe_Nombre (T <: Classe_Nombre (T)) = {more: T X T - > T}
That is to say Classe_Reel such as Classe_Reel <: Classe_Nombre.
One a :
Classe_Reel (T <: Classe_Reel (T)) = {more: T X T - > T, less: T X T - > T} .
Either Type_Reel = Classe_Reel (Type_Reel) , Type_Reel is the fixed point of Classe_Reel
from where :
Type_Reel = {more: Reality X Reality - > Real, less: Reality X Reality - > Real}
There is aussi :
Type_Reel < Class_Nombre (Type_Reel <: Classe_Nombre (Type_Reel)) puisque
Classe_Reel <: Classe_Nombre, is implicitement
Type_Reel <: Type_Nombre such as Type_Nombre is the fixed point of Classe_Nombre.
Thus Type_Reel is a type of the class of the numbers.
Modeling object
Modeling object consists in creating a data-processing model of the system of the user (a computing system). This model can gather elements of the real-world as well as concepts or ideas suitable for the trade or the field of which part the system will form. Objet modeling consists in defining, to qualify these elements in the form of types initially, therefore independently of the implementation. It is what one calls object the directed Analyze or OOA (Object-Oriented Analysis).
Dependant subjects
Random links: Arthropod | Hipoglucemia | Microwave | Group Lorraine bombardment | 9 Songs | Church of the Virgin of Leviša | Kenny_Dalglish