Subject-oriented Programming
   HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
, subject-oriented programming is an
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pro ...
software paradigm 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 ( ; grc-gre, Πλάτων ; 428/427 or 424/423 – 348/347 BC) was a Greek philosopher born in Athens during the Classical period in Ancient Greece. He founded the Platonist school of thought and the Academy, the first institution ...
and
Kant Immanuel Kant (, , ; 22 April 1724 – 12 February 1804) was a German Philosophy, philosopher and one of the central Age of Enlightenment, Enlightenment thinkers. Born in Königsberg, Kant's comprehensive and systematic works in epistemolo ...
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 that describe
objects Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an ...
into "subjects", which may be composed to form larger subjects. At points of access to fields or
methods Method ( grc, μέθοδος, methodos) literally means a pursuit of knowledge, investigation, mode of prosecuting such inquiry, or system. In recent centuries it more often means a prescribed process for completing a task. It may refer to: *Scien ...
, 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.


Relationships


Relationship to aspect-oriented programming

The introduction of
aspect-oriented programming In computing, aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding behavior to existing code (an advice) ''without'' modifying t ...
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 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 In aspect-oriented programming, a pointcut is a set of join points. Pointcut specifies where exactly to apply advice, which allows separation of concerns and helps in modularizing business logic. Pointcuts are often specified using class names or m ...
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 In computing, aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding behavior to existing code (an advice) ''without'' modifying t ...
, and an organization and series on international conferences begun on the subject. Like aspect-oriented programming, subject-oriented programming, composition filters,
feature-oriented programming In computer programming, feature-oriented programming (FOP) or feature-oriented software development (FOSD) is a programming paradigm for program generation in software product lines (SPLs) and for incremental development of programs. History ...
and adaptive methods are considered to be aspect-oriented software development approaches.


Dimensions


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 , 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 (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
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 An eclipse is an astronomical event that occurs when an astronomical object or spacecraft is temporarily obscured, by passing into the shadow of another body or by having another body pass between it and the viewer. This alignment of three ce ...
, 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.


Subject-oriented programming as a "third dimension"

Method dispatch in object oriented programming can be thought of as "two dimensional" in the sense that the code executed depends on both the method name and the object in question. This can be contrastedJournal of Object Technology: Context Oriented Programming
/ref> with procedural programming, where a procedure name resolves directly, or one dimensionally, onto a subroutine, and also to subject oriented programming, where the sender or subject is also relevant to dispatch, constituting a third dimension.


See also

*
Separation of concerns In computer science, separation of concerns is a design principle for separating a computer program into distinct sections. Each section addresses a separate '' concern'', a set of information that affects the code of a computer program. A concern ...
*
Data, context and interaction Data, context, and interaction (DCI) is a paradigm used in computer software to program systems of communicating objects. Its goals are: * To improve the readability of object-oriented code by giving system behavior first-class status; * To cleanly ...


References

{{Reflist


External links


Distributed Characteristics of Subject Oriented Programming: An evaluation with the Process and Object-Oriented Paradigms

alphaWorks: HyperJ

Eclipse Archived Technology Projects

Amethyst: a JavaScript library for Subject-Oriented Programming
Object-oriented programming Aspect-oriented software development Eclipse (software) Programming paradigms