Home
The Toolkit for Online Communities
17460 Community Members, 4 members online, 424 visitors today
Log In Register
OpenACS Home : xowiki : Weblog
Search · Index
Previous Month October 2014
Sun Mon Tue Wed Thu Fri Sat
28 29 30 1 2 3 4
5 6 7 8 9 (1) 10 11
12 13 14 15 16 17 18
19 20 (1) 21 (1) 22 23 24 25
26 27 28 29 30 31 1

Popular tags

ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bugtracker , COMET , cvs , debian , emacs , fedora , FreeBSD , hstore , includelets , install , installation , installers , javascript , libthread , linux , monitoring , naviserver , nginx , nx , OmniOS , oracle , osx , patches , performance

No registered users in community xowiki
in last 30 minutes

Contributors

OpenACS.org

Weblog

Showing 1 - 10 of 821 Postings (summary)

News

Created by Emmanuelle Raffenne, last modified by Gustaf Neumann 09:07 AM, Tuesday

Package specification Summary for package news

Summary: Used for announcements and news items.
Description: News publication tool. Publication of plain text or html news items with support for scheduled publication and commentability.
Maturity: Mature
This package depends on: acs-content-repository acs-datetime acs-kernel general-comments notifications rss-support
Packages that depend on news: news-includelet news-portlet

Bug Tracker Summary for package news

Open Bugs: 5
Latest Bug Opened: 2007-03-03 Zen: news preview.adp localize blockmarkers
Latest Bug Fixed: 2013-11-04 HTML for Items is not Valid (Missing <p></p>)..
Top Bug Submitters: Michael Steigman (4) Eduardo Pérez (4) Gabriel Burca (3) Brad Duell (2) Bjorn Thor Jonsson (2)
Top Bug Fixers: Gustaf Neumann (8) Dave Bauer (5) Tilmann Singer (5) Lars Pind (4) Jeff Davis (3) Michael Steigman (2) Rocael Hernández Rizzardini (1)

Code Metrics Summary for package news

# Tcl Procs 28
# Tcl Lines 647
# Automated Tests 1
# Stored Procedures PG: 0 ORA: 0
# SQL Lines PG: 0 ORA: 0
# ADP pages 13
# ADP lines 330
# Include pages (news/lib/) 3
# Documentation pages 0
# Documentation lines 0
Source API-browser

Wiki

Created by gustaf neumann, last modified by Gustaf Neumann 10 Oct 2014, at 02:28 PM

Welcome to the OpenACS Wiki!

This is the OpenACS Wiki system, built with the xowiki package. This wiki contains user documentation, how-tos, and tips and tricks related to OpenACS. It also serves as a collaboration area for OpenACS contributors.

Quick Links:

OpenACS Handbook: openacs-handbook
OpenACS Packages
: packages

Recent Wiki Page Edits:

Non-Core Packages

News (1 day ago)
XoWiki (3 weeks ago)
XOTcl Core (1 month ago)
Categories (2 months ago)

HOME

Wiki (1 week ago)

Subsystems Documentation

Deprecated / Unmaintained Packages

payflowpro (1 month ago)

Coding Standards

Web Forms (1 month ago)
ADP Files (2 months ago)
Tcl pages (2 months ago)
Coding Standards - Index (2 months ago)
General Rules (2 months ago)

Cookbook

Refactoring Recipes (1 month ago)

OpenACS Projects

Official test servers (2 months ago)
OpenACS TODO List (2 months ago)
OpenACS Release Status (3 months ago)

Package Documentation

Aliases at CVS (2 months ago)

Core Packages

ACS Developer Support (2 months ago)

Testing Pages

Documentation

Try Openacs (9 months ago)


XoWiki

Created by Gustaf Neumann, last modified by Antonio Pisano 27 Sep 2014, at 12:20 PM

XoWiki is a wiki implementation for OpenACS  implemented based on xotcl-core. Instead of trying to implement the full set of wiki markup commands in systems like MediaWiki, XoWiki is based on a rich text editor and focuses more on integration with OpenACS (e.g. categories, general comments, adp-includes, ad-substitution of template variables). XoWiki combines aspects of wikis (ease of page-creation) with aspects of a content management system (revisions, reusable content, multiple languages, page templates).

XoWiki provides functionalities of enterprise wiki systems (such as combining structured with unstructured information, providing security policies, etc.). XoWiki is reused in several other packages such as XoWiki Content flow, S5 or  the Learning Content Tool.

Documentation:


Package specification Summary for package xowiki

Summary: A xotcl-based enterprise wiki system with multiple object types
Description: <pre> XoWiki is a Wiki implementation for OpenACS in XOTcl. Instead of trying to implement the full set of Wiki markup commands of systems like MediaWiki, XoWiki is based on a rich text editor and focuses more on integration with OpenACS (e.g categories, general comments, ADP-includes). XoWiki combines aspects of wikis (ease of page-creation) with aspects of a content management system (revisions, re-usable items, multiple languages). Furthermore, XoWiki allows to define different types of links such one could define book-structures (where a navigation structure could be built on the fly) or glossaries with different kind of word relationships (like synonyms, etc.). XoWiki supports pages in multiple languages and is localized. Some features: - cross language links - inclusion of ADP pages - nesting of Wiki-pages - large set of includeable content (includelets) - search - tags - categories - RSS - weblog - podcasts - notifications - web 2.0 gadgets (digg, delicious, my yahoo) - audio embedding - different appearances (template_file) - book-structures - prototype pages - import/export - virtual presence - analysis of collaboration networks - forms - named/unnamed pages - various security policies </pre>
Maturity: Mature
This package depends on: acs-datetime acs-kernel acs-subsite categories file-storage general-comments xotcl-core
Packages that depend on xowiki: content-portlet eduwiki learning-content learning-content-portlet pages s5 xolirc xowf xowiki-includelet xowiki-portlet


Bug Tracker Summary for package xowiki

Open Bugs: 0
Latest Bug Opened: This package has no open bugs.
Latest Bug Fixed: 2008-12-06 categories menu on page needs a NO SELECTION item.
Top Bug Submitters: Robert Taylor (10) Ryan Gallimore (9) Carl Robert Blesius (6) Malte Sussdorff (3) Stan Kaufman (2)
Top Bug Fixers: Gustaf Neumann (37) Stan Kaufman (2) Malte Sussdorff (1)


Code Metrics Summary for package xowiki

# Tcl Procs 20
# Tcl Lines 24355
# Automated Tests 0
# Stored Procedures PG: 0 ORA: 0
# SQL Lines PG: 0 ORA: 0
# ADP pages 35
# ADP lines 2301
# Include pages (xowiki/lib/) 1
# Documentation pages 0
# Documentation lines 0
Source API-browser


XOTcl Core

Created by Gustaf Neumann, last modified by Gustaf Neumann 16 Sep 2014, at 10:43 AM

What is xotcl-core

xotcl-core is an OpenACS package, which provides base functionality for OpenACS applications using XOTcl. The xotcl-core package is used by several other OpenACS packages such as the XOTcl request monitor, XoWiki, XoWiki Content Flow, S5 or the Learning Content Tool.

Install xotcl-core

First, get xotcl-core from the OpenACS repository:

cd /tmp
cvs -d:pserver:anonymous@cvs.openacs.org:/cvsroot co openacs-4/packages/xotcl-core

Move xotcl-core to the directory, where your OpenACS packages are stored. We assume, this directory is /usr/local/openacs-4/packages

mv /tmp/openacs-4/packages/xotcl-core /usr/local/openacs-4/packages
 Next, go to acs-admin/apm (http://YOURSERVER/acs-admin/apm/), choose "install-packages" and install XOTcl Core. Finally, restart the server.
svc -t /service/${yourservice}

Now you can browse  http://YOURSERVER/xotcl

Functionality of xotcl-core

xotcl-core defines several classes for

  • library dependencies
  • package management
  • debugging
  • security and policy management
  • HTTP client and server functionality
  • Object Relational Database Interface
  • ical formatting
  • cluster management
  • chat handlers

and several utilities.

Tutorial xotcl-core

 See http://alice.wu-wien.ac.at:8000/s5-xotcl-core-tutorial/slides 


Code metrics and Package Description

Package specification Summary for package xotcl-core

Summary: XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes)
Description: <pre> This component contains some core functionality for OpenACS applications using XOTcl. It includes XOTcl thread handling for OpenACS (supporting persistent and volatile threads) and a definitions for documenting XOTcl object, classes and methods integrated with the api-browser of OpenACS. Documented procs and instproc an be created using the methods ad_proc and ad_instproc. This component provides as well an XOTcl Object and Class browser, as well as means to control the recreation of objects and classes when components are reloaded. 0.23: contains a major overhaul of the Generic classes. Object preliminary object layer for content repository, oo templating 0.36: caching support for cr-items 0.38: important change: uses cr_items.name instead of cr_revision.title to label content items. This effects as well the api (lookup uses -name instead of -title). 0.40: updating package_id in acs_objects, requires now OpenACS 5.2.* 0.41: supporting storage_type file, on_submit method and html for forms 0.43: context and connection context 0.44: use connection_context, sch regression test works 0.45: xo:db require operations 0.48: policies 0.49: stored procedures object proxies (postgres and Oracle) 0.51: require package 0.52: distinguish between ImageField and ImageAnchorField, start using slots, multivalued form entries, bulk-actions, improved localization, improved sql layer (:.xo::db::sql) 0.70: oo interface to acs-object, acs-object-types and cr-items/revisions based on XOTcl slots </pre>
Maturity: Mature
This package depends on: acs-kernel
Packages that depend on xotcl-core: chat xotcl-request-monitor xowiki

Bug Tracker Summary for package xotcl-core

Open Bugs: 0
Latest Bug Opened: This package has no open bugs.
Latest Bug Fixed: 2007-09-03 Error: content > 4000 characters on an openacs instance with oracle9.
Top Bug Submitters: Claudio Pasolini (1) Avni Khatri (1)
Top Bug Fixers: Gustaf Neumann (2)

Code Metrics Summary for package xotcl-core

# Tcl Procs 12
# Tcl Lines 12498
# Automated Tests 1
# Stored Procedures PG: 0 ORA: 0
# SQL Lines PG: 0 ORA: 0
# ADP pages 4
# ADP lines 89
# Include pages (xotcl-core/lib/) 1
# Documentation pages 0
# Documentation lines 0
Source API-browser
 

The OpenACS package xotcl-core requires in versions of OpenACS before 5.3 the following patches for the documentation procs and the bootstrap installer:

cd /tmp
wget http://media.wu-wien.ac.at/download/acs-api-documentation-procs.patch
wget http://media.wu-wien.ac.at/download/acs-bootstrap-installer.patch
To apply these patches, go to the directory, where the OpenACS packages are stored. We assume, this directory is /usr/local/openacs-4/packages. 

cd /usr/local/openacs-4/packages
 patch -p 0 < /tmp/acs-api-documentation-procs.patch
 patch -p 0 < /tmp/acs-bootstrap-installer.patch
Both patches do not harm in case XOTcl is not installed. Now reload these packages or restart the aolserver.

Installing OpenACS on FreeBSD with ports

Created by Gustaf Neumann, last modified by Gustaf Neumann 04 Sep 2014, at 07:47 PM

NEW:  For the impatient users there is a quick-and-dirty install guide for FreeBSD

OpenACS and .LRN are included in the current FreeBSD ports tree.
The ports are tested with FreeBSD production version 6.2-RELEASE, old stable 5.5-RELEASE and the development branch 7-CURRENT.

Installation requirements:

  1. FreeBSD operating system with root access rights.
  2. Installed and updated FreeBSD Ports Collection (for updating see Appendix A below)
    (alternative: installing from packages, see Appendix B)

To install OpenACS or .LRN from the FreeBSD ports tree, follow the instructions below.

1. Installing and configuring PostgreSQL

NOTICE: If you have a PostgreSQL server installed and running, skip to Section 2.

If you desire to use a local PostgreSQL server (most users do), install the server first.
We recommend using PostgreSQL version 8.2 from the databases/postgresql82-server port

# cd /usr/ports/databases/postgresql82-server # make install clean

NOTICE: As an alternative, you may install PostgreSQL server from a binary package. See Appendix B below

The plperl language is required for OpenACS/.LRN. This can be installed from the ports with the following commands:

# cd /usr/ports/databases/p5-postgresql-plperl # make install clean

To install the OpenACS/.LRN database, your PostgreSQL server must be running.
You need to enable it in your /etc/rc.conf (or /etc/rc.conf.local) by adding the following line:

postgresql_enable="YES"

After installing the PostgreSQL server, you have to initialize your data store:

# /usr/local/etc/rc.d/postgresql initdb

To start the PostgreSQL server, issue the following command:

# /usr/local/etc/rc.d/postgresql start

You can check if the server is up and running with:

# /usr/local/etc/rc.d/postgresql status

2. Installing OpenACS / .LRN

2.1 Installing the OpenACS or .LRN port 

OpenACS can be installed directly from the FreeBSD ports tree, www/openacs:

# cd /usr/ports/www/openacs
# make install clean

.LRN installation, www/openacs-dotlrn:

# cd /usr/ports/www/openacs-dotlrn
# make install clean

NOTICE: If you want to make changes to the default configuration, the AOLserver configuration files for OpenACS/.LRN files are located at:
/usr/local/openacs/etc/openacs-config.tcl
/usr/local/dotlrn/etc/dotlrn-config.tcl

NOTICE: If you installed both OpenACS and .LRN ports, you have to change the default port of one of the installations. See the configuration files in the previous notice.

2.2 Creating the OpenACS/.LRN database 

For this step, you require an installed and running PostgreSQL server (see Section 1) and installed OpenACS/.LRN (see Section 2.1)

First we need to adjust the PostgreSQL configuration (this applies for server versions 8.1.x and higher):

# /usr/local/share/doc/openacs/adjust_pgsql_conf.sh

or if .LRN was installed: 

# /usr/local/share/doc/dotlrn/adjust_pgsql_conf.sh

NOTICE: You can adjust the configuration manually (standard location: /usr/local/pgsql/data/postgresql.conf)
Please see en:How_to_install_in_Postgres_8.x.

The PostgreSQL server needs to be restarted after changing the configuration:

# /usr/local/etc/rc.d/postgresql restart

Next, we can create a default OpenACS database by running the following script:

# /usr/local/share/doc/openacs/create_sampledb.sh

To create a default .LRN database, run the following script:

# /usr/local/share/doc/dotlrn/create_sampledb.sh


2.3 Starting OpenACS/.LRN and finalizing installation 

To make use of the automatic startup script OpenACS/.LRN has to be enabled in /etc/rc.conf (or /etc/rc.conf.local):

openacs_enable="YES" 

or for .LRN:

dotlrn_enable="YES"

To start OpenACS, use the following command:

# /usr/local/etc/rc.d/openacs start

To start .LRN, use the following command:

# /usr/local/etc/rc.d/dotlrn start

Now you can login to your OpenACS/.LRN system and finalize the installation.
The default port is 8000. URL:

http://<your-ip>:<port>

After filling your e-mail address, password and other important information OpenACS/.LRN gets installed, but the server stops.
You have to start it again (see above).

 A. Updating the FreeBSD ports tree

To get the latest versions of the OpenACS, .LRN and other FreeBSD ports, it is recommended to update the FreeBSD ports tree on a regular basis. The easiest way to to perform this task is using the portsnap(8) command.

For documentation, refer to the following FreeBSD Handbook chapters:
Using the Ports Collection
Using Portsnap


B. Installing from binary packages

PostgreSQL, OpenACS, .LRN and all dependent ports may be installed from binary packages, too.
This installation can be performed from a submenu of FreeBSD's sysinstall(8) command: Configure/Packages

OpenACS and .LRN are located in subcategory www, PostgreSQL is in subcategory databases.


C. Contact information and bug reporting

Please send bug reports and feature suggestions to the port maintainer of OpenACS/.LRN FreeBSD ports:
Martin Matuska
<mm_at_FreeBSD_dot_org>

Installing OpenACS on FreeBSD

Created by OpenACS community, last modified by Gustaf Neumann 04 Sep 2014, at 07:33 PM

OpenACS and .LRN are available via FreeBSD ports. See en:openacs-system-install-freebsd-ports.

The following notes are useful if you decide to follow the OpenACS manual installation process using FreeBSD. These notes include points where a manual FreeBSD install differes from the slow, manual en:openacs-system-install.

The following information is pulled from: http://openacs.org/forums/message-view?message_id=312823 and http://openacs.org/forums/message-view?message_id=136910 and http://openacs.org/forums/message-view?message_id=312823

The OpenACS Reference Platform uses shell scripts written for bash, which is the standard Linux shell. If you are using a different shell, you will need to substitute your shell's conventions for setting environment variables when appropriate, and install bash to work with the scripts. Substitute fetch when the instructions suggest you use wget to download software.

Note that on most linux distributions, GNU Make is simply named make and there is no gmake, whereas on BSD distributions, make and gmake are different --use gmake.

Change the period separating user.group in chown commands to use a colon ":" instead. For example,

chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME

becomes:

chown -R $OPENACS_SERVICE_NAME:$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME

Should you decide to install OpenACS from source using general en:openacs-system-install instructions, refer to these notes for changes:

Installing tdom

FreeBSD can use the standard tdom from ports when installing manually, without going the extra step of installing tdom within the aolserver src tree.

Installing en:postgresql

Creating postgres user

To set defaults for new users or special service users you may create, edit the file /etc/share/skel/dot.profile instead of /etc/profile

To create the user, we need to add more parameters to match what is expected from creating a user in linux.

[root src]# mkdir -p /usr/local/pgsql
[root src]# pw groupadd -n web
[root src]# pw useradd -n postgres -g web -d /usr/local/pgsql -s /bin/bash
[root src]# chown -R postgres:web /usr/local/pgsql /usr/local/src/postgresql-7.4.7
[root src]# chmod -R 750 /usr/local/pgsql
[root src]#
mkdir -p /usr/local/pgsql
pw groupadd -n web
pw useradd -n postgres -g web -d /usr/local/pgsql -s /bin/bash
chown -R postgres:web /usr/local/pgsql /usr/local/src/postgresql-7.4.7
chmod -R 750 /usr/local/pgsql

Set PostgreSQL to start on boot

[root ~]# cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/postgresql.txt /usr/local/etc/rc.d/postgresql.sh
[root ~]# chown root:wheel /usr/local/etc/rc.d/postgresql.sh
[root ~]# chmod 755 /usr/local/etc/rc.d/postgresql.sh
[root ~]# 
cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/postgresql.txt /usr/local/etc/rc.d/postgresql.sh
chown root:wheel /usr/local/etc/rc.d/postgresql.sh
chmod 755 /usr/local/etc/rc.d/postgresql.sh

Test the script

[root ~]# /usr/local/etc/rc.d/postgresql.sh stop
Stopping PostgreSQL: ok
[root ~]# 

If PostgreSQL successfully stopped, then turn it back on because we'll use it later.

[root root]# /usr/local/etc/rc.d/postgresql.sh start
Starting PostgreSQL: ok
[root root]#
/usr/local/etc/rc.d/postgresql.sh start

PostgreSQL performance tuning

See man syctl, man 5 sysctl and man 5 loader.conf.

Installing Libthreads 2.6.5

cd /usr/local/src/aolserver/
fetch http://mesh.dl.sourceforge.net/sourceforge/tcl/thread2.6.5.tar.gz
tar xzpf thread2.6.5.tar.gz
cd thread2.6.5/unix
less ../README
../configure --help
../configure --enable-threads --prefix=/usr/local/aolserver --exec-prefix=/usr/local/aolserver --with-aolserver=/usr/local/aolserver --with-tcl=/usr/local/lib/tcl8.4-threads
gmake
gmake install

Creating users

We need to add more parameters to have user environments match the linux ones expected by the en:openacs-reference-platform.

Create users this way:

[root root]# mkdir -p /home/$OPENACS_SERVICE_NAME
[root root]# pw useradd -n $OPENACS_SERVICE_NAME -g web -d /home/$OPENACS_SERVICE_NAME -s /bin/bash
[root root]#
mkdir -p /home/$OPENACS_SERVICE_NAME
pw useradd -n $OPENACS_SERVICE_NAME -g web -d /home/$OPENACS_SERVICE_NAME -s /bin/bash

payflowpro

Created by Robert Taylor, last modified by Gustaf Neumann 01 Sep 2014, at 03:52 PM

Package:

Description:

Release Info:

Test #1:

Test #2:

Test #3:

Web Forms

Created by Rocael Hernández Rizzardini, last modified by Gustaf Neumann 27 Aug 2014, at 11:08 AM

Use ad_form to create HTML forms. If you work on a page that does not, convert it to use ad_form.

You can grep the toolkit under /packages and see many examples. 

Ad_form can handle many of your possible interactions with the system, such as normal tasks as add and edit data, validate entry form data, etc.

Aditional information here:

http://rubick.com:8002/openacs/ad_form

Use the following in the tcl part of a page to limit access to page requests via post.. to reduce vulnerability to url hack and insertion attacks from web:

if { [ad_conn method] ne "POST" } {
  ad_script_abort
 }

Grouping elements into sections using ad_form

The {-section} list allows to group the subsequent elements (until the next section declaration) into a section. {-section} accepts 4 properties:

{-section
	section_id
	{legendtext $legendstring}
	{legend {name value name value ... name value}}
	{fieldset {name value name value ... name value}}
}

where:

  • section_id: a string to identify the section (mandatory)
  • legendtext (optional) a string for the legend of the fieldset (section)
  • legend (optional) a list of name value pairs attributes for the LEGEND tag
  • fieldset (optional) a list of name value pairs attributes for the FIELDSET tag

Example

ad_form \
	-name "your_zen_level" \
	-method post -html {enctype multipart/form-data class margin-form} \
	-fieldset {{title "T1" class "C1"} "This really works!!"} \
 	-form {
 
     # Start section 1
     {-section "sec1" {legendtext "Section Title I"} {legend {class myClass id myId}}}
    {zen_comment:text(comment)\
                 {label "template::widget::comment"}\
                 {value "Please enter your comments."}\
                 {html {rows 7 cols 50}}}
    {zen_file:text(file),optional\
                 {label "template::widget::file"}}

    # Start section2
    {-section "sec2" {legendtext "Section Title II"} {fieldset {class myclass}}}
    {zen_multiselect:text(multiselect)\
                 {label "template::widget::multiselect"}\
                 {options {"mark" "emma" "avni" "carl" "don"}}}

    # Unset the section. subsequent elements will not be in any section.
    {-section ""}
    {zen_text:text(text),optional,nospell\
                 {label "template::widget::text"}\
                 {help_text {"Your identification tag number"}}}
    {zen_textarea:text(textarea),optional,nospell\
                 {label "template::widget::textarea"}\
                 {help_text {"Please describe your desired state of being"}}\
                 {html {rows 7 cols 50}}}
}

 

Refactoring Recipes

Created by Michael Aram, last modified by Benjamin Brink 24 Aug 2014, at 11:09 PM

The intention of this page is to collect small refactoring snippets that one can/should apply to an existing OpenACS installation in order to improve and modernize its code base. Most of the recipes have already been applied to the official core packages.

Modernize Tcl

  1. Refactor foreach {var1.. varN} $list {break} to lassign

    See http://wiki.tcl.tk/1530

    Deprecated code example
    foreach {dog cat} $animalslist break
    Recommended code example
    lassign $animalslist dog cat
    Command line for finding/replacing code
    todo
  2. Refactor multiple lindex operations to lassign

    Deprecated code example
    set dog [lindex $animalslist 0]
    set cat [lindex $animalslist 1]
    Recommended code example
    lassign $animalslist dog cat
    Command line for finding/replacing code
    todo
  3. Brace expr expressions

    Deprecated code example
    [expr $money - 1]
    Recommended code example
    [expr {$money - 1}]
    Command line for finding/replacing code
    todo
  4. Replace string equal with eq in expressions

    Deprecated code example
    if {[string equal "" $dog]} {error "I want a dog!"}
    Recommended code example
    if {$dog eq ""} {error "I want a dog!"}
    Command line for finding/replacing code
    todo
  5. Replace lsearch with in or ni in expressions

    Deprecated code example
    if {[lsearch -exact $animalslist $dog] != -1 } {error "I dont want a dog!"}
    Recommended code example
    if {$dog in $animalslist} {error "I dont want a dog!"}
    Command line for finding/replacing code
    todo
  6. Replace eval with {*} if possible

    Deprecated code example
    eval mycommand $args
    Recommended code example
    mycommand {*}$args
    Command line for finding/replacing code
    todo

Best Practices

  1. Use bind variables in SQL statements

    Deprecated code example
    db_string check "SELECT * FROM animals WHERE color = $color;"
    Recommended code example
    db_string check "SELECT * FROM animals WHERE color = :color;"
    Command line for finding/replacing code
    todo
  2. Use util::http instead of util_http*, ns_httpget, ::http, ::xo::HttpRequest

Substitute Deprecated Procedures

  1. Replace empty_string_p with eq ""

    Deprecated code example
    if {[empty_string_p $dog]} {error "I want a dog!"}
    if {![empty_string_p $cat]} {error "I dont want a cat!"}
    Recommended code example
    if {$dog eq ""} {error "I want a dog!"}
    if {$cat ne ""} {error "I dont want a cat!"}
    Command line for finding/replacing code
    todo
    Rationale
    Byte-compiled comparisons are faster.
  2. Replace exists_and_not_null with info exists and ne

    Deprecated code example
    if {[exists_and_not_null cat]} {error "I dont want a cat!"}
    Recommended code example
    if {[info exists cat] && $cat ne "" } {error "I dont want a cat!"}
    Command line for finding/replacing code
    todo
    Rationale
    Byte-compiled comparisons are faster.
  3. Replace ad_parameter with parameter::get

    Deprecated code example
    ad_parameter -package_id 123 SystemURL ""
    Recommended code example
    parameter::get -package_id 123 SystemURL -default ""
    Command line for finding/replacing code
    todo
  4. Replace ad_require_permission with permission::require_permission

    Deprecated code example
    ad_require_permission $oid "read"
    Recommended code example
    permission::require_permission -object_id $oid -privilege "read"
    Command line for finding/replacing code
    todo
  5. Replace util_unlist with lassign

    Deprecated code example
    util_unlist $animalslist dog cat
    Recommended code example
    lassign $animalslist dog cat
    Command line for finding/replacing code
    todo

Official test servers

Created by Rocael Hernández Rizzardini, last modified by Michael Aram 21 Aug 2014, at 02:17 PM

Test servers are available at http://openacs.innova.uned.es

There's 4 servers: 2 for OpenACS HEAD (pg 8.1 and oracle9i) and 2 for dotLRN HEAD (pg 8.1 and oracle9i). Login info is on the homepage. CVS committers who might need ssh access, please contact Marcos.

We need to set up:

  1. Install spellcheck tools. 
  2. A way to easily do a CVS update and re-run the test cases? probably shell access will be needed. Instructions need to be set on this sense.
  3. Daily reports (by packages? to subscribers)
  4. Probably will be better if everything re-installs each night (not weekly)?

We'll use Innova server (Thanks Innova team!) as our official test server, although if someone else wants to provide / configure another test server, thats is very welcomed!

Next Page