ITWissen.info - Tech know how online

subject oriented programming (SOP)

The concept of subject-oriented programming(SOP) was founded by work at the Watson Research Center of the IBM company. Subject-oriented programming can be understood as an addition of subjects to the object-oriented paradigm. The approach implies that the meaning of an object also depends on the viewpoint of its observer and its context. An example is a special object employee, which has a completely different position from a production planning perspective than from a human resources perspective. The SOP thus formulates an additional subjective view for each object that depends on the viewer.

As a result of earlier approaches, including object-oriented programming, software applications today are problematic due to mechanisms of data encapsulation, frequent inheritance or insufficient modularization. This leads also to restrictions with the development of larger applications particularly if independent and already existing applications are to be integrated. This condition can be met partially for example by Refactoring in conventional way, or by new beginnings, like that of the aspect-oriented programming or the subject-oriented programming.

The subject-oriented programming (SOP) makes the following approaches available for this:

  • Applications are to be able to be developed separately and combined if necessary.
  • There should be no fixed dependencies between applications.
  • In each case a so-called co- operation between applications is possible.

Following these principles by the SOP programming in principle object-oriented programs are differentiated regarding so-called subjects. A subject can be possibly an incomplete program, however by the subject itself a subjective view of the circumstances which can be modeled is possible. Thereby a subject integrates itself possibly also concretely into the encapsulation of an object, so that thereby a view in detail is realized.

Objects and Subjects

Objects and Subjects

The illustration clarifies such a case, by decomposition of a program both from the viewpoint of the functionality and that of the subjectification. The object is then realized by the composition of the subjects 1.1, 1.2, and 1.3.

The behavior of objects

A subject defines not only the status but also the behavior of an object from a specific viewpoint of the application. A subject has no internal properties, these must be modeled in a separate subject. The subjects identify themselves among themselves via an object identification( OID). The subjects are activated in a predefined sequence when the application is called. A major difference from the object-oriented view( OOP) is that the behavior of a subject can change between activations. In object-oriented programming (OOP), the behavior is determined by the particular structure of the class.

As long as the subjects are isolated - i.e. not part of an object - there is no difference to OOP. Interaction between subjects is done by means of fixed composition rules, which also define the order of the subjects to be activated. Interaction requires appropriately designed interfaces between subjects. Subjects themselves are to be understood as containers for classes and subjects, which interact by means of their interfaces to the outside. An essential aspect is it that several subjects can act also parallel and synchronize themselves thereby over messages.

Informations:
Englisch: subject oriented programming - SOP
Updated at: 02.11.2013
#Words: 498
Links: small outline package (chip design) (SOP), object (O), human resources (HR), viewer, arsenic (As)
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024