Call for non- or less-technical tips
11:56 AM, 23 May 2005 by Nick Grossman Permalink | Comments (0)
OpenACS Tip of the Week: Introduction to OpenACS
OpenACS Packages
OpenACS has transformed from a monolithic code base (3.x and below) to a neater modularised code base in the latest releases (4.x and above). Applications that use the OpenACS framework are now developed in self-contained modules called "packages". All packages are structured using the Model-View-Controller (MVC) pattern.
There are core packages such as the kernel, templating and authentication packages that give you the basis for a web application that supports user, group and application management. You can extend the functionality of a vanilla installation of OpenACS by plugging in already developed packages such as a calendar or wiki through a package installer interface. Or if you can't find a package that provides the functionality you need from OpenACS's extensive package catalog, then you can easily develop your own package.
A package contains an XML based .info file containing meta-data for the package. The core packages use the .info file for dependency checking, as well as for defining properties and specifying call-back commands. The package can also have an SQL directory that contains all SQL files for generating the data model for the application. There is a TCL directory that contains all library procedures for the application. Finally, there is a WWW directory that contains all the presentation logic for the Web application. The structure of the notes package is as follows:
notes
+ notes.info
+ sql
+ oracle
+ postgresql
* notes-create.sql
* notes-drop.sql
+ tcl
* notes-apm-callbacks.tcl
* notes-init.tcl
* notes-procs.tcl
+ www
* index.adp
* index.tcl
* index.xql
* index-postgresql.xql
* index-oracle.xql
In the SQL directory, the notes-create.sql file is called only once when the application is installed, and is used to create the data model in a database. Currently there is support for both Oracle and PostgreSQL in OpenACS, so depending on which RDBMS you are using, the notes-create.sql will be executed from the SQL sub-directory that corresponds to the RDBMS used.
In the TCL directory, the notes-apm-callbacks.tcl file contains procs that get called when the application is installed/mounted. The notes-init.tcl contains TCL procs that initiate the application when AOLServer starts up. The notes-procs.tcl contains TCL procs that can be used by files in WWW or by other packages.
In the WWW directory, each web page consists for an XQL file, a TCL file and an ADP file. The ADP file contains HTML and templating tags for presentation of data from the data base. The XQL file is an XML based file that contains SQL statements that can be used by the TCL file. SQL statements common to all database systems can be placed in file.xql, whereas RDBMS specific SQL statements can be placed in file-postgresql.xql or file-oracle.xql. The TCL file contains the logic for executing SQL statements and then pushing the returned data to the ADP template file.
That just about covers OpenACS and packages from a high-level overview. In future posts we will start blogging about more useful features in OpenACS.
11:02 AM, 23 May 2005 by Nick Carroll Permalink | Comments (0)
Welcome to the hints and tips blog
11:01 AM, 23 May 2005 by Jade Rubick Permalink | Comments (1)
| May 2005 | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||