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.42 -r1.43 --- openacs-4/packages/acs-core-docs/www/packages.html 16 Feb 2005 00:21:03 -0000 1.42 +++ openacs-4/packages/acs-core-docs/www/packages.html 4 Jun 2006 00:45:24 -0000 1.43 @@ -1,4 +1,5 @@ -OpenACS Packages

OpenACS Packages

By Pete Su and Bryan Quinn

+ +OpenACS Packages

OpenACS Packages

By Pete Su and Bryan Quinn

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

Overview

@@ -8,11 +9,11 @@ package. This document presents reasons for packaging software, conventions for the file system and naming that must be followed, and step by step instructions for creating a new - package for the "Notes" example package. + package for the "Notes" example package.

Server file layout

Here is how an OpenACS 5 server is laid out starting from the Server root (ROOT): -

Figure�11.1.�Server file layout diagram

+    

Figure�11.1.�Server file layout diagram

 ROOT/
     bin/
         Various executables and scripts for server maintanence.
@@ -49,8 +50,8 @@
     

To illustrate the general structure of a package, let's see what the - package for the "notes" application should look like. -

Figure�11.2.�Package file layout diagram

+      package for the "notes" application should look like.
+    

Figure�11.2.�Package file layout diagram

 ROOT/
   +-- packages/    APM Root
         |
@@ -123,7 +124,7 @@
       directories.  This makes it suitable for storing icons, css
       files, javascript, and other static content which can be treated
       this way.
-    

Table�11.1.�Package files

File TypeIts UseNaming Convention
Package Specification FileThe package specification file is an XML file generated and +

Table�11.1.�Package files

File TypeIts UseNaming Convention
Package Specification FileThe package specification file is an XML file generated and maintained by the OpenACS Package Manager (APM). It specifies information about the package including its parameters and its files.notes.info
Data Model Creation Script @@ -257,14 +258,14 @@

Package Name

This is a short human readable name for your package. For our example, - we will use the name "Notes". + we will use the name "Notes".

Package Plural

If your package name is a nice singular noun, this should be the plural form of it. I assume the plural form is used when multiple instances of the package are used by a single service. We'll talk more about package instances later. Our example apllication doesn't really - have a good plural name. So just make it also be "Notes". + have a good plural name. So just make it also be "Notes".

Package Type

Generally we think of packages as either being applications, @@ -287,10 +288,10 @@

Summary and Description

Enter a short summary and longer description of what the Notes - application will do. That is, something like "this application keeps - short textual notes in the database", and so on. + application will do. That is, something like "this application keeps + short textual notes in the database", and so on.

-

  • Click the button "Create Package". +

  • Click the button "Create Package".

  • At this point, APM will create a directory called ROOT/packages/notes.

  • @@ -309,11 +310,11 @@ ROOT/packages/notes/sql/postgresql/notes-drop.sql.

    After you do this, go back to the main APM page. From there, - click the link called "notes" to go to the management - page for the new package. Now click the link called "Manage - file information", then the "Scan the + click the link called "notes" to go to the management + page for the new package. Now click the link called "Manage + file information", then the "Scan the packages/notes directory for - additional files in this package" link on that page to scan + additional files in this package" link on that page to scan the file system for new files. This will bring you do a page that lists all the files you just added and lets you add them to the notes package. @@ -326,9 +327,9 @@ .tcl files for code, it does not do the same thing for data model files.

  • Now go back to the main management page for the notes - If your package has parameters, create them using the "Manage - Parameter Information" link. Define package callbacks via the "Tcl Callbacks (install, - instantiate, mount)" link.

  • The new package has been created and installed in the server. At + If your package has parameters, create them using the "Manage + Parameter Information" link. Define package callbacks via the "Tcl Callbacks (install, + instantiate, mount)" link.

  • The new package has been created and installed in the server. At 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 @@ -341,7 +342,7 @@ % cd sql % cvs add *.sql % cd ROOT/packages/notes -% cvs commit -m "add new package for notes" +% cvs commit -m "add new package for notes"

  • Now you can start developing the package. In addition to writing code, you should also consider the tasks outlined in the package development tutorial. @@ -380,7 +381,7 @@ the Site Map page, which is by default available at /acs-admin/site-map. Use the interface here to add a new sub-folder called notes to - the root of the site, then click "new application" to mount a new + the root of the site, then click "new application" to mount a new instance of the notes application to the site. Name the new instance notes-1.