Jump to content

Subject-oriented programming

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 117.200.178.225 (talk) at 17:37, 1 May 2011 (Relationship to Aspect-Oriented Programming). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing, Subject-Oriented Programming is an object-oriented 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[1] which was later recognized as being one of the three most influential papers to be presented at the conference between 1986 and 1996[2]. As illustrated in that paper, an analogy is made with the contrast between the philosophical views of Plato and Kant 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 into “subjects”, which may be composed to form larger subjects. At points of access to fields or methods, several subjects’ contributions may be composed. These points were characterized as the join-points[3] 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 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[4]. 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[5], and an organization and series on international conferences begun on the subject. Like aspect-oriented programming, subject-oriented programming, composition filters, feature oriented programming 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++[6], and Smalltalk[7]. 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[8] has been recognized as the most influential paper of the ICSE 1999 Conference[9]

This new concept was implemented for composing Java software, using the name Hyper/J for the tool[10].

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, called the Concern Manipulation Environment (CME), has been described[11] in which tools for query, analysis, modelling[12], 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[13] 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[14] or sourceforge[15], respectively, but neither is actively supported.

Notes

  1. ^ William Harrison and Harold Ossher, Subject-Oriented Programming - A Critique of Pure Objects, Proceedings of 1993 Conference on Object-Oriented Programming Systems, Languages, and Applications, September 1993
  2. ^ http://www.sigplan.org/award-oopsla.htm
  3. ^ Harold Ossher , Peri Tarr. Operation-Level Composition: A Case in (Join) Point, in ECOOP ’98 Workshop Reader, 406–409
  4. ^ Communications of the ACM, Vol. 44, No. 10, October 1994, pp. 28-95
  5. ^ http://aosd.net/
  6. ^ Harold Ossher, Matthew Kaplan, William Harrison, Alexander Katz and Vincent Kruskal, Subject-Oriented Composition Rules, Proceedings of 1995 Conference on Object-Oriented Programming Systems, Languages, and Applications, October 1995
  7. ^ Hafedh Mili, William Harrison, Harold Ossher, Supporting Subject-Oriented Programming in Smalltalk, Proceedings of TOOLS USA 96, August 1996
  8. ^ Harold Ossher, Peri Tarr, William Harrison, Stanley Sutton, N Degrees of Separation: Multi-Dimensional Separation of Concerns, Proceedings of 1999 International Conference on Software Engineering, May 1999
  9. ^ http://www.sigsoft.org/awards/mostInfPapAwd.htm
  10. ^ Harold Ossher, Peri Tarr. Hyper/J: Multi-dimensional separation of concerns for Java, Proceedings of the 23rd International Conference on Software Engineering, Toronto, Ontario, Canada, 2001, Pages: 821 - 822
  11. ^ William Chung, William Harrison, Vincent Kruskal, Harold Ossher, Stanley M. Sutton, Jr., Peri Tarr, Matthew Chapman, Andrew Clement, Helen Hawkins, Sian January. The concern manipulation environment, Proceedings of the 27th international conference on Software engineering table of contents, St. Louis, MO, USA, 2005
  12. ^ William Harrison, Harold Ossher, Stanley Sutton, Peri Tarr. Concern modeling in the concern manipulation environment, Proceedings of the 2005 workshop on Modeling and analysis of concerns in software, St. Louis, Missouri, 2005
  13. ^ William Harrison, Harold Ossher, Peri Tarr. General Composition of Software Artifacts, Proceedings of Software Composition Workshop 2006, March 2006, Springer-Verlag, LNCS 4089, pages 194-210
  14. ^ http://www.alphaworks.ibm.com/tech/hyperj
  15. ^ http://sourceforge.net/projects/cme/

See also