View · Search · Index

Weblog

Showing 491 - 500 of 700 Postings (summary)

Logging Conventions

Created by Gustaf Neumann, last modified by Gustaf Neumann 08 Apr 2016, at 09:16 AM

The following conventions for severity levels (specified as first argument in ns_log) should be used.

  • Notice: Something interesting occurred. A "notice" shows typically a state change, start/end of some jobs, etc. This level can be as well used of temporary debugging, but such messages should be removed after some time.
     
  • Warning: Something that could mean something bad occurred. A "warning" indicates an unexpected situation, which requires attention of an developer and a corrective measure in the not-to-distant future. Usage of deprecated code or code using not following the engineering guidelines are of such type.
     
  • Error: Something bad occurred. An "error" is a malfunction, that must be investigated by a developer. An error is an unhandled exception. The error.log file should be free of errors.
     
  • Bug: Something occurred that implies that there is a bug in the code.
     
  • Debug: This logging level is typically just activated during debugging.
     
  • Dev: This logging level is typically just activated during development to inspect the behavior of new code. Such logging statements are typically removed once development has reached a stable point.

Interface / CSS Coding Guidelines

Created by Robert Taylor, last modified by Gustaf Neumann 21 Mar 2016, at 09:48 AM

OpenACS roadmap states:

Define a reasonable set of default CSS classes and ids that can be reused across the toolkit. Remove package specific CSS classes and ids in most cases and replace with site-wide ones. Allow for easy CSS-based themes.

Related pages:

related forum threads:

See also, the OpenACS coding guidelines.

Tcl pages

Created by Rocael Hernández Rizzardini, last modified by Gustaf Neumann 24 Dec 2015, at 10:48 AM

  • Always use Page Contracts:


    All Tcl-implemented pages should use page contracts such as e.g.:

    ad_page_contract {
        ... purpose ...
        @author ...
        @creation-date ...
    } {
        object_id:naturalnum,notnull
        {verbose:boolean false}
        {color:word ""}
    }
    
  • Constrain arguments passed via query or form variables as strong as possible


    All user provide content is potentially a security thread, since these values might lead to SQL-injection or XSS attacks. Therefore constrain the passed arguments as far as possible (see above), and validate the values further if necesary.

  • Avoid putting in HTML in Tcl scripts


    Try to make use of OpenACS Templating or http://your.openacs/doc/acs-templating/. If you can't avoid it try to isolate the HTML into a proc so editing the layout will be easier.

  • Avoid Quoting Hell


    If programmatic HTML-code generation is required, make sure that everything is quoted sufficiently and use the Tcl command subst to improve readability:

    set href [export_vars -base admin/index -vars {foo bar]
    set html [subst {
       <a href="[ns_quotehtml $href]">Hello world</a>
    }]
    
  • Read the Tcl Style guide


    This is the Tcl styleguide (PDF), try to apply relevant guidelines. In particular chapter 4,5 and 7.

.LRN

Created by Emmanuelle Raffenne, last modified by Gustaf Neumann 19 Oct 2015, at 08:48 AM

.LRN Project

.LRN Home Page - The Official .LRN Home Page

.LRN bug tracker - Use the Open ACS bug tracker to report and check status on bugs for all sections of .LRN. If you need to report a bug and you are not sure what code is causing it, use the "2-dotLRN General" category. Otherwise select the package. Note that all the dotLRN packages are at the bottom of the list.

Get Involved! - how to participate in the community

.LRN Versions

Last stable release: 2.5.0

Next release: see .LRN 2.5 Release Management 

Download from .LRN download page

.LRN Installation

To install .LRN follow the instructions at .LRN_Installation

.LRN Governance

This .LRN Governance page is a proposal based on a meeting by Carl Blesius, Carlos Kloos, Roceal Hernandez and Caroline Meeks.  

Useful Resources

Site Specific Documentation

Official test servers

Page Information

  • Last modified: 2015-10-19 08:48:56.668188+02

Monitoring Naviserver

Created by Gustaf Neumann, last modified by Gustaf Neumann 10 Oct 2015, at 02:42 PM

Munin is a popular web-based tool to monitor several website. Munin provides a simple plugin mechanism for adding new kinds of sources, such as e.g. the NaviServer plugins for monitoring NaviServer.

The monitoring information collected by munin can be placed at different web servers, one finds usually information about apache and friends. In general older versions of munin (before 2.0) supported only static pages, whereas newer version support as well dynamic information (with additional features such as zooming).

For static munin pages, it is the easiest to place in OpenACS sites the output directory either under the main www directory, or under the subsite admin directory (packages/acs-subsite/www/admin/).

For the cgi-setup, one has to make sure to load nscgi in the statup files of NaviServer and to point the urls to the appropriate directories. The sample setup below uses the directories of munin as provided by a standard munin setup on an Ubuntu system.

ns_section ns/server/${server}/modules
   ns_param   nscgi        nscgi.so

ns_section "ns/server/${server}/module/nscgi"
   ns_param map  "GET /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph"
   ns_param map  "GET /munin-cgi/static /etc/munin/static/"
   ns_param map  "GET /munin-cgi /var/www/cgi-bin/munin-cgi-html"

Vi as an OpenACS IDE

Created by OpenACS community, last modified by Monika Andergassen 05 Oct 2015, at 12:45 PM

In vim add the following in your .vimrc will help convert tabs to 4 spaces to meet part of the OpenACS coding standard.

set tabstop=4
set expandtab
set list
set listchars=tab:>.

It's also nice to have syntax highlighting by adding the following line

syntax on 

Also useful to use tagging features. In brief - run ctags -R in the root of the install or source tree.

At that point you can edit using vim -t procname or ::package::procname and go to the corresponding place in the code. From within the code, you can lookup functions by having the term highlighted and hit CTL-] - use CTL-T to go back.

Only works if you edit from the top directory, all tags are relative to there.



XOTcl

Created by Gustaf Neumann, last modified by Monika Andergassen 05 Oct 2015, at 12:43 PM

XOTcl is an object oriented extension for Tcl and required part of OpenACS installations since  TIP #87. The OpenACS package xotcl-core provides base functionality and integration with the OpenACS framework.

The current version of XOTcl is 1.6.7. Read about XOTcl motivations and  feature from http://media.wu-wien.ac.at/whatIsXOTcl.html. For more details about XOTcl, see XOTcl Homepage.

INSTALLATION of XOTcl:

One can get XOTcl e.g. in binary form from debian or it can be complied from source. The following instructions describe, how to compile XOTcl from source.
  1. Get, compile and install XOTcl

    Get xotcl-1.6.7:

     cd /usr/local/src
    wget http://media.wu-wien.ac.at/download/xotcl-1.6.7.tar.gz
    tar zxvf xotcl-1.6.7.tar.gz

    The following commands can be used to compile XOTcl and install it into the appropriate places of the specified aolserver. We assume that the aolserver is installed under /usr/local/aolserver:

     cd xotcl-1.6.7 
    CC=gcc;export CC
    ./configure --enable-threads --enable-symbols --prefix=/usr/local/aolserver --exec-prefix=/usr/local/aolserver --with-tcl=/usr/src/tcl8.4.16/unix

    Use appropriate paths for aolserver4 and your tcl version.

    make 
    make install-aol

    After the "make install-aol" from the XOTcl sources, a file xotcl.tcl is installed in the directory /usr/local/aolserver/modules/tcl/ that handles .xotcl files and XOTcl serialization in the aolserver.

  2. Restart your aolserver to load xotcl.

OpenACS Debian Install quicksheet

Created by Ryan Gallimore, last modified by Monika Andergassen 05 Oct 2015, at 12:32 PM

# PostgreSQL

 apt-get install postgresql postgresql-dev postgresql-doc 
ln -s /usr/include/postgresql/ /usr/include/pgsql
ln -s /var/lib/postgres /usr/local/pgsql
ln -s /usr/include/pgsql /usr/local/pgsql/include
su postgres -c "/usr/lib/postgresql/bin/createlang plpgsql template1"
su postgres -c "createuser -a -d service1"
su postgres -c "createdb -E UNICODE service1"

# AOLServer
 apt-get install aolserver4 aolserver4-nspostgres aolserver4-nssha1 aolserver4-nscache tdom

# OpenACS
 groupadd web 
useradd -g web service1
mkdir /var/lib/aolserver
chown -R service1 /var/lib/aolserver
chgrp -R web /var/lib/aolserver
chmod -R 770 /var/lib/aolserver
exit

su - service1
cd /tmp
wget https://openacs.org/projects/openacs/download/download/openacs-5.1.5.tar.gz
cd /var/lib/aolserver
tar xzf /tmp/openacs-5.1.5.tar.gz
mv /tmp/openacs-5.1.5 service1

chmod -R 755 service1
chown -R service1.web service1

exit


# Copy Files (where / is root of OpenACS instance):
# [edit hostname and address]
config.tcl => /etc/
set homedir                   /usr/lib/aolserver4
set bindir                    /usr/lib/aolserver4/bin


# init/d script:
    

#!/bin/sh
#
# Start the AOLServer HTTP server.
#


NAME="OpenACS on service1"
SERVICEPATH=/var/lib/aolserver/service1
PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/pgsql/bin
trap "" 1

start()
{

   echo -n "Starting web server: $NAME"
   echo -e -n "\r"

   #!/bin/sh

    #we need to export the library stuff first
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
    export PATH=$PATH:/usr/local/pgsql/bin


    # give time for Postgres to come up
    sleep 1
    exec /usr/sbin/aolserver4-nsd -it $SERVICEPATH/etc/config.tcl -u service1 -g web &

    # For AOLserver 4 using privileged ports (usually < 1024), add the flag
   # -b youraddress:yourport

    echo ""
}



stop()
{
    echo -n "Stopping web server: $NAME"
    killall aolserver4-nsd
    echo ""
}


case "$1" in

  start)
    start
    ;;

  stop)
    stop
    ;;


  restart)
    stop
    sleep 2
    start
    ;;

  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
    exit 1
    ;;
esac

echo -n -e "\c\r\n"
exit 0


# End of script



# avoid pid not found errors in the log

 mkdir /usr/lib/aolserver4/log 
chown root:web /usr/lib/aolserver4/log
chmod 775 /usr/lib/aolserver4/log

# Set openacs to start on boot
 update-rc.d openacs-service1 defaults 
chmod u+x openacs-service1
ln -s /var/lib/aolserver/service1

Install AOLserver 4.5

Created by Malte Sussdorff, last modified by Monika Andergassen 05 Oct 2015, at 12:12 PM

If you want to install AOLserver 4.5 you could follow the instructions for AOLserver en:aolserver-install and replace 40r10 with 4.5 (more or less ...).

Alternatively follow the instructions or download it as a shell script (recommended) or download a full archive aolserver45-oacs.tar.bz2.

If on "OS X" the install fails for nspostgres with undefined symbols, execute the following command:

gcc -pipe -dynamiclib -install_name /usr/local/aolserver45/lib/libnspostgres.dylib  -o libnspostgres.dylib nspostgres.o -L/usr/local/aolserver45/lib -lnsd -lnsthread -L/usr/local/aolserver45/lib -ltcl8.4   -lpthread -framework CoreFoundation   -lnsdb -L/usr/local/pgsql/lib -lpq

Try Openacs

Created by OpenACS community, last modified by Gustaf Neumann 01 May 2015, at 09:43 AM

To try OpenACS, you might lease a hosted system with OpenACS installed on it:

Next Page
previous December 2026
Sun Mon Tue Wed Thu Fri Sat
29 30 1 2 3 4 (2) 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 1 2

Popular tags

17 , 5.10 , 5.10.0 , 5.10.1 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , Azure , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , conference , CSP , CSRF , cvs , debian , docker , docker-compose , emacs , engineering-standards , exec , fedora , FreeBSD
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org