Subject-oriented programming
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, Subject-Oriented Programming is an object-oriented
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 software paradigm
Programming paradigm
A programming paradigm is a fundamental style of computer programming. Paradigms differ in the concepts and abstractions used to represent the elements of a program and the steps that compose a computation A programming paradigm is a fundamental style of computer programming. (Compare with a...

 in which the state (fields) and behavior (methods) of objects are not seen as intrinsic to the objects themselves, but are provided by various subjective perceptions (“subjects”) of the objects. The term and concepts were first published in September 1993 in a conference paper which was later recognized as being one of the three most influential papers to be presented at the conference between 1986 and 1996. As illustrated in that paper, an analogy is made with the contrast between the philosophical views of Plato
Plato
Plato , was a Classical Greek philosopher, mathematician, student of Socrates, writer of philosophical dialogues, and founder of the Academy in Athens, the first institution of higher learning in the Western world. Along with his mentor, Socrates, and his student, Aristotle, Plato helped to lay the...

 and Kant
Immanuel Kant
Immanuel Kant was a German philosopher from Königsberg , researching, lecturing and writing on philosophy and anthropology at the end of the 18th Century Enlightenment....

 with respect to the characteristics of “real” objects, but applied to software ones. For example, while we may all perceive a tree as having a measurable height, weight, leaf-mass, etc., from the point-of view of a bird, a tree may also have measures of relative value for food or nesting purposes, or from the point-of-view of a tax-assessor, it may have a certain taxable value in a given year. Neither the bird’s nor the tax-assessor’s additional state information need be seen as intrinsic to the tree, but are added by the perceptions of the bird and tax-assessor, and from Kant’s analysis, the same may be true even of characteristics we think of as intrinsic.

Subject-oriented programming advocates the organization of the classes
Class (computer science)
In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

 that describe objects
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

 into “subjects”, which may be composed to form larger subjects. At points of access to fields or methods
Method (computer science)
In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...

, several subjects’ contributions may be composed. These points were characterized as the join-points of the subjects. For example, if a tree is cut-down, the methods involved may need to join behavior in the bird and tax-assessor’s subjects with that of the tree’s own. It is therefore fundamentally a view of the compositional nature of software development, as opposed to the algorithmic (procedural) or representation-hiding (object) nature.

Relationship to aspect-oriented programming

The introduction of aspect-oriented programming
Aspect-oriented programming
In computing, aspect-oriented programming is a programming paradigm which aims to increase modularity by allowing the separation of cross-cutting concerns...

 in 1997, raised questions about its relationship to subject-oriented programming, and about the difference between subjects and aspects. These questions were unanswered for some time, but were addressed in the patent on Aspect-oriented programming filed in 1999 in which two points emerge as characteristic differences from earlier art:
  • the aspect program comprises both a) a cross-cut that comprises a point in the execution where cross-cutting behavior is to be included; and b) a cross-cut action comprising a piece of implementation associated with the cross-cut, the piece of implementation comprising computer readable program code that implements the cross-cutting behavior.
  • the aspect transparently forces the cross-cutting behavior on object classes and other software entities


In the subject-oriented view, the cross-cut may be placed separately from the aspect (subject) and the behavior is not forced by the aspect, but by governed by rules of composition. Hindsight makes it also possible to distinguish aspect-oriented programming by its introduction and exploitation of the concept of a query-like pointcut
Pointcut
In aspect-oriented computer programming, a pointcut is a set of join points. Whenever the program execution reaches one of the join points described in the pointcut, a piece of code associated with the pointcut is executed. This allows a programmer to describe where and when additional code...

 to externally impose the join-points used by aspects in general ways.

In the presentation of subject-oriented programming, the join-points were deliberately restricted to field access and method call on the grounds that those were the points at which well-designed frameworks were designed to admit functional extension. The use of externally imposed pointcuts is an important linguistic capability, but remains one of the most controversial features of aspect-oriented programming.

Relationship to aspect-oriented software development

By the turn of the millennium, it was clear that a number of research groups were pursuing different technologies that employed the composition or attachment of separately-packaged state and function to form objects. To distinguish the common field of interest from Aspect-Oriented Programming with its particular patent definitions and to emphasize that the compositional technology deals with more than just the coding phase of software development, these technologies were organized together under the term Aspect-Oriented Software Development
Aspect-oriented software development
In computing, Aspect-oriented software development is an emerging software development technology that seeks new modularizations of software systems in order to isolate secondary or supporting functions from the main program's business logic...

, and an organization and series on international conferences begun on the subject. Like aspect-oriented programming, subject-oriented programming, composition filters, feature oriented programming
Feature Oriented Programming
Feature Oriented Programming or Feature Oriented Software Development is a general paradigm for program synthesis in software product lines....

 and adaptive methods are considered to be aspect-oriented software development approaches.

Multi-dimensional separation of concerns, Hyper/J, and the Concern Manipulation Environment

The original formulation of subject-oriented programming deliberately envisioned it as a packaging technology – allowing the space of functions and data types to be extended in either dimension. The first implementations had been for C++, and Smalltalk. These implementations exploited the concepts of software labels and composition rules to describe the joining of subjects.

To address the concern that a better foundation should be provided for the analysis and composition of software not just in terms of its packaging but in terms of the various concerns these packages addressed, an explicit organization of the material was developed in terms of a multi-dimensional “matrix” in which concerns are related to the software units that implement them. This organization is called Multi-Dimensional Separation of Concerns, and the paper describing it has been recognized as the most influential paper of the ICSE 1999 Conference

This new concept was implemented for composing Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 software, using the name Hyper/J for the tool.

Composition and the concept of subject can be applied to software artifacts that have no executable semantics, like requirement specifications or documentation. A research vehicle for Eclipse
Eclipse (software)
Eclipse is a multi-language software development environment comprising an integrated development environment and an extensible plug-in system...

, called the Concern Manipulation Environment (CME), has been described in which tools for query, analysis, modelling, and composition are applied to artifacts in any language or representation, through the use of appropriate plug-in adapters to manipulate the representation.

A successor to the Hyper/J composition engine was developed as part of CME which uses a general approach for the several elements of a composition engine:
  • a query language with unification to identify join points,
  • a flexible structural-attachment model,
  • a nested-graph specification for ordering identified elements,
  • and a priority ordering specification to resolve conflicts among conflicting rules.


Both Hyper/J and CME are available, from alphaWorks or sourceforge, respectively, but neither is actively supported.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK