Index: openacs-4/packages/acs-core-docs/www/objects.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/objects.adp,v diff -u -N -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/acs-core-docs/www/objects.adp 9 Jun 2016 08:44:50 -0000 1.1.2.7 +++ openacs-4/packages/acs-core-docs/www/objects.adp 9 Jun 2016 13:03:11 -0000 1.1.2.8 @@ -14,7 +14,7 @@ OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

-Overview

Developing data models in OpenACS 5.7.0 is much like developing +Overview

Developing data models in OpenACS 5.9.0 is much like developing data models for OpenACS 3, save for the implementation. As usual, you need to examine how to model the information that the application must store and manipulate, and define a suitable set of @@ -83,7 +83,7 @@ for the PG version) file created when we created the package. Then, do the following:

-Describe the new type to the type +Describe the new type to the type system

First, add an entry to the acs_object_types table with the following PL/SQL call:

 begin  
@@ -139,7 +139,7 @@
 attributes, so there is no need for us to define them.

-Define a table in which to store your +Define a table in which to store your objects

The next thing we do is make a small modification to the data model to reflect the fact that each row in the notes table represents something that is not only an object of type note, but also an acs_object. The new table definition looks @@ -163,7 +163,7 @@ acs_objects.

-Define a package for type specific +Define a package for type specific procedures

The next step is to define a PL/SQL package for your new type, and write some basic procedures to create and delete objects. Here is a package definition for our new type:

@@ -210,7 +210,7 @@
 We'll talk about this more later.

-Define a package body for type specific +Define a package body for type specific procedures

The PL/SQL package body contains the implementations of the procedures defined above. The only subtle thing going on here is that we must use acs_object.new @@ -305,7 +305,7 @@ Design Guidance

In this section we cover some overall guidelines for designing data models that are meant to be integrated with the OpenACS object system.

There are two basic rules you should follow when designing -OpenACS 5.7.0 data models:

    +OpenACS 5.9.0 data models:

    1. Never utilize fields in the acs_objects table in application specific ways. That is, never assign any application-specific semantics to this data. In the notes application, we use the creation_date and last_modified fields, but this is OK since @@ -348,7 +348,7 @@ time even for simple applications.

    -Summary

    Hooking into the OpenACS 5.7.0 object system brings the +Summary

Hooking into the OpenACS 5.9.0 object system brings the application developer numerous benefits, and doing it involves only four easy steps: