Index: openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html,v diff -u -N -r1.43.2.16 -r1.43.2.17 --- openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 15 Jun 2017 13:56:42 -0000 1.43.2.16 +++ openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 16 Jun 2017 17:19:51 -0000 1.43.2.17 @@ -2,7 +2,7 @@ Creating an Application Package

Creating an Application Package

by Joel Aufrecht

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

The intended page map

Overview

To start developing new code in OpenACS, we build a new package. A package +

The intended page map

Overview

To start developing new code in OpenACS, we build a new package. A package is a a discrete collection of web pages, Tcl code, and database tables and procedures. A package with user interface is called an application; a package which provides functions to other packages and has no direct interface, a @@ -18,11 +18,11 @@ right now. Code that is temporary hackage is clearly marked.

In this tutorial, we will make an application package for displaying a list of text notes. -

Before you begin

You will need:

  • A computer with a working installation of +

Before you begin

You will need:

  • A computer with a working installation of OpenACS. If you don't have this, see Chapter 2, Installation Overview.

  • Example files, which are included in the standard OpenACS 5.9.0 distribution. -

Figure 9.1. Assumptions in this section

Fully qualified domain name of your serveryourserver.test
URL of your serverhttp://yourserver.test:8000
Name of development account$OPENACS_SERVICE_NAME
New Package keymyfirstpackage

Use the APM to initialize a new package

We use the ACS Package Manager (APM) to add, remove, and +

Figure 9.1. Assumptions in this section

Fully qualified domain name of your serveryourserver.test
URL of your serverhttp://yourserver.test:8000
Name of development account$OPENACS_SERVICE_NAME
New Package keymyfirstpackage

Use the APM to initialize a new package

We use the ACS Package Manager (APM) to add, remove, and upgrade packages. It handles package meta-data, such as lists of files that belong in the package. Each package is uniquely identified by a package key. To start developing a new @@ -55,7 +55,7 @@ /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage. This is the "home directory" of our new package, and all files in the package will be within this directory. More on the structure of - packages).

Add an Application Instance to the Server

In order to see your work in progress, you must create a + packages).

Add an Application Instance to the Server

In order to see your work in progress, you must create a map between the URL space of incoming requests and the package application instance. You do this by adding the application in the main site administration). This creates a link between the incoming URL requests and an @@ -66,7 +66,7 @@ in this tutorial.

  1. Browse to http://yourserver.test:8000/admin/applications/application-add/.

  2. Choose "My First Package" from the list and click OK (the other fields are optional).

By mounting the package, we've caused all requests to http://yourserver.test:8000/myfirstpackage - to be satisfied from the files at /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www.

Quick start

The remainder of the tutorial walks you through each file one at a time as you create the package. You can skip all this, and get a working package, by doing the following:

cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/tutorial
+      to be satisfied from the files at /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www.

Quick start

The remainder of the tutorial walks you through each file one at a time as you create the package. You can skip all this, and get a working package, by doing the following:

cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/tutorial
 psql $OPENACS_SERVICE_NAME -f myfirstpackage-create.sql
 cp note-edit.* note-delete.tcl index.* ../../../../myfirstpackage/www/
 mkdir ../../../../myfirstpackage/lib