Index: openacs-4/packages/acs-core-docs/www/packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/packages.html,v diff -u -r1.22.2.1 -r1.22.2.2 --- openacs-4/packages/acs-core-docs/www/packages.html 14 Nov 2003 09:43:46 -0000 1.22.2.1 +++ openacs-4/packages/acs-core-docs/www/packages.html 21 Nov 2003 11:14:09 -0000 1.22.2.2 @@ -1,9 +1,7 @@ -OpenACS 5.0.0b1 Packages

OpenACS 5.0.0b1 Packages

- By Pete Su and Bryan Quinn -
+OpenACS 5.0.0b2 Packages

OpenACS 5.0.0b2 Packages

By Pete Su and Bryan Quinn

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

Overview

+

Overview

This document is a guide on how to write a software package for OpenACS. OpenACS packages are installed and maintained with the OpenACS Package Manager (APM). This document presents reasons @@ -26,19 +24,19 @@ core tcl libraries here www/ admin/ - bboard/ - site wide admin for bboard + forums/ + site wide admin for forums intranet/ site wide admin for intranet ... and so on for all modules ... - bboard/ - pages for bboard + forums/ + pages for forums admin/ - other admin pages for bboard + other admin pages for forums intranet/ - pages for bboard + pages for intranet admin/ other admin pages for intranet doc/ @@ -60,7 +58,7 @@ the pieces of each module are strewn all over the tree in at least 3 or 4 different areas.

- Here is how an OpenACS 5.0.0b1 server is laid out: + Here is how an OpenACS 5.0.0b2 server is laid out:

 
 ROOT/
@@ -79,8 +77,8 @@
         acs-test-harness/
         acs-util/
         acs-workflow/
-        bboard/
-               bboard.info
+        forums/
+               forums.info
                sql/
                     oracle/
                          oracle data model
@@ -104,7 +102,7 @@
             misc pages
     

Note that a major reorganization has happened here. The diagram only - expands the structure of the bboard/ package directory, + expands the structure of the forums/ package directory, but all the others are basically the same. Each package encapsulates all of its data model, library code, logic, adminstration pages and user pages in a single part of the file tree. This organization has @@ -124,7 +122,7 @@ sends to our server to the right page in the appropriate package. While we're at it, this tool should also automate package installation, dependency checking, upgrades, and package - removal. In OpenACS 5.0.0b1, this tool is called the APM. + removal. In OpenACS 5.0.0b2, this tool is called the APM.

The APM

The APM is used to create, maintain, and install packages. It takes care of copying all of the files and registering the package in the @@ -146,7 +144,7 @@

The following sections will show you how to make a package for the Notes application. In addition, they will discuss some new site - management features in OpenACS 5.0.0b1 that take advantage of the APM's package + management features in OpenACS 5.0.0b2 that take advantage of the APM's package instance model. The two most important of these are subsites, and the site map tool, which can be used to map applications to one or more arbitrary URLs in a running site. @@ -235,9 +233,9 @@ files and then have the scripts source the other data model files. In Oracle this can be done by including @@ filename in the creation or drop - scripts. See the - Oracle SQL*Plus documentation for examples. In - PostgreSQL the same is acomplished by including \i. + scripts. See the + Oracle FAQ for examples. In + PostgreSQL the same is acomplished by including \i filename. sql/<database>/*.sqlData Model Upgrade Scripts Contain changes to the data model between versions. The APM can automatically load the appropriate upgrade scripts when @@ -277,9 +275,9 @@ Tcl initialization files are sourced once on server startup after all of the Tcl library files are sourced. tcl/notes-init.tclAdministration UIThe administration UI is used to administer the instances of - the package. For example, the bboard administration UI is + the package. For example, the forums administration UI is used to create new forums, moderate postings, and create new - categories for bboard postings.www/admin/*Administration UI Index PageEvery package administration UI must have an index page. In + categories for forums postings.www/admin/*Administration UI Index PageEvery package administration UI must have an index page. In most cases, this is index.tcl but it can be any file with the name index, such as index.html or index.adp.www/admin/index.tclRegression TestsEvery package should have a set of regression tests that @@ -317,7 +315,7 @@ distinguish it from all the others. It is used as a database key to keep track of the package and as the name of the directory in the file system where all the files related to your package will live. Example - package keys in the current system include: bboard, + package keys in the current system include: forums, acs-kernel and so on. For the example application, we will use the package key notes.

Package Name @@ -336,7 +334,7 @@ Generally we think of packages as either being applications, meaning that the package is meant primarily for use by end-users, or services meaning that the package is meant to be a reusable - library of code, to be used by other packages. bboard is + library of code, to be used by other packages. forums is a good example of an application, while acs-templating is a good example of a service. Our example is an application, so pick that. @@ -397,7 +395,7 @@ this point, you should add your package files to your CVS repository. I'll assume that you have set up your development repository according to the standards described in - these instructions. If so, then you just do this: + this appendix. If so, then you just do this:

 
 % cd ROOT/packages
@@ -412,7 +410,7 @@
 
     
  • Now you can start developing the package. In addition to writing code, - you should also consider the tasks outlined in the package submission guidelines. + you should also consider the tasks outlined in the package development tutorial.

  • The Site Map and Package Instances

    At this point, you are probably excited to see your new package in action. But, we haven't added any user visible pages yet. By @@ -434,7 +432,7 @@ map content that lived outside the page root into the site, and it was also hard to map mulitiple URLs to the same place in the file system.

    - In OpenACS 5.0.0b1, administrators can define an arbitrary mapping between the + In OpenACS 5.0.0b2, administrators can define an arbitrary mapping between the URLs the user types and the actual file in the file system that is served. This mapping is called the site map and entries in the site map are called site nodes. Each site node maps a URL to an @@ -449,7 +447,7 @@ of many indedendent applications that actually run on a single shared code base. The request-processor document shows you how OpenACS figures out which instance of your application was - requested by the user at any given time. The page development tutorial shows you how to use this + requested by the user at any given time. The page development tutorial shows you how to use this information in your user interface.

    In order to make the new notes application visible to @@ -476,7 +474,7 @@ yet written Notes application at various places in the site. In a later document, we'll see how to write your application so that the code can detect from what URL it was invoked. This is the key - to supporting subsites. + to supporting subsites.

    Summary

    The APM performs the following tasks in an OpenACS site:

    • @@ -492,4 +490,4 @@

    • Writes out package distribution files for other people to download and install. We'll cover this later. -

    View comments on this page at openacs.org
    +

    Additional Reading

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