Index: openacs-4/packages/acs-core-docs/www/subsites.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites.html,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-core-docs/www/subsites.html 10 Aug 2002 20:07:21 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/subsites.html 28 Feb 2003 05:36:05 -0000 1.9 @@ -1,22 +1,22 @@ -Writing OpenACS 4.5 Application Pages

Writing OpenACS 4.5 Application Pages

+Writing OpenACS 4.6 Application Pages

Writing OpenACS 4.6 Application Pages

By Rafael H. Schloming and Pete Su


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

Overview

+ OpenACS docs are written by the named authors, but may be edited + by OpenACS documentation staff. +

Overview

In this document, we'll examine the user interface pages of the Notes application in more detail, covering two separate aspects of page -development in OpenACS 4.5. First, we'll talk about the code needed to make +development in OpenACS 4.6. First, we'll talk about the code needed to make your pages aware of which application instance they are running in. Second, we'll talk about using the form builder to develop -form-based user interfaces in OpenACS 4.5. While these seem like unrelated +form-based user interfaces in OpenACS 4.6. While these seem like unrelated topics, they both come up in the example page that we are going to look at, so it makes sense to address them at the same time.

Application Instances and Subsites

-As you will recall from the packages tutorial, the Request -Processor (RP) and Package Manager (APM) in OpenACS 4.5 allow site +As you will recall from the packages tutorial, the Request +Processor (RP) and Package Manager (APM) in OpenACS 4.6 allow site administrators to define an arbitrary mapping from URLs in the site to objects representing content. These objects may represent single files, or entire applications. The APM uses the site map to map @@ -70,7 +70,7 @@

In the Notes example, we are particularly interested in the package_id field. If you study the data model and code, -you'll see why. As we said before in the data modeling tutorial, the Notes application points the +you'll see why. As we said before in the data modeling tutorial, the Notes application points the context_id of each Note object that it creates to the package instance that created it. That is, the context_id corresponds exactly to the package_id that comes in from @@ -257,15 +257,15 @@ visible to that user. The end result is a site where users can come and write notes to themselves.

-This is a good example of the leverage available in the OpenACS 4.5 +This is a good example of the leverage available in the OpenACS 4.6 system. The code that we have written for Notes is not at all more complex than a similar application without access control or site map awareness. By adding a small amount of code, we have taken a small, simple, and special purpose application to something that has the potential to be a very useful, general-purpose tool, complete with multi-user features, access control, and centralized administration.

Summary

-In OpenACS 4.5, application pages and scripts can be aware of the package +In OpenACS 4.6, application pages and scripts can be aware of the package instance, or subsite in which they are executing. This is a powerful general purpose mechanism that can be used to structure web services in very flexible ways. @@ -277,6 +277,4 @@

We also saw how to use the templating system's forms API in a simple way, to create forms based pages with minimal duplication of code. -

($Id$)
+

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