Index: openacs-4/packages/acs-core-docs/www/object-identity.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-identity.html,v diff -u -N -r1.43.2.1 -r1.43.2.2 --- openacs-4/packages/acs-core-docs/www/object-identity.html 10 Jun 2009 22:24:08 -0000 1.43.2.1 +++ openacs-4/packages/acs-core-docs/www/object-identity.html 6 Jul 2009 11:14:28 -0000 1.43.2.2 @@ -1,19 +1,19 @@ -Object Identity

Object Identity

By Rafael H. Schloming

+Object Identity

Object Identity

By Rafael H. Schloming

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

One of the major design features of OpenACS 5.4.2 is the explicit representation +

One of the major design features of OpenACS 5.5.0 is the explicit representation of object identity. The reason I say "explicit representation" is because the concept of object identity has been around forever. It is inherent to our problem domain. Consider the example of 3.x style scoping. The 3.x data models use the triple (user_id, group_id, -scope) to identify an object. In the 5.4.2 data model this +scope) to identify an object. In the 5.5.0 data model this object is explicitly represented by a single party_id.

Another good example of this is can be found in the user groups data model. The 3.x user groups data model contains another example of an implied identity. Every mapping between a user and a group could have an arbitrary number of attached values (user_group_member_fields, etc.). In this case it is the pair (group_id, user_id) that implicitly refers to an -object (the person's membership in a group). In the 5.4.2 data model this +object (the person's membership in a group). In the 5.5.0 data model this object identity is made explicit by adding an integer primary key to the table that maps users to groups.

Coming from a purely relational world, this might seem slightly weird at first. The pair (group_id, user_id) is sufficient to uniquely identify the @@ -32,4 +32,4 @@ even capable of fully tracking the history of membership state.

The design choice of explicitly representing object identity with an integer primary key that is derived from a globally unique sequence is the key to eliminating redundant code and replacing it with generic object -level services.

($Id$)
View comments on this page at openacs.org
+level services.

($Id$)
View comments on this page at openacs.org