Index: openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html,v diff -u -r1.30.2.4 -r1.30.2.5 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 22 Oct 2004 02:38:14 -0000 1.30.2.4 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 1 Nov 2004 23:39:42 -0000 1.30.2.5 @@ -1,10 +1,10 @@ -ACS File Naming and Formatting Standards

ACS File Naming and Formatting Standards

By Michael Yoon and Aurelius Prochazka

+ACS File Naming and Formatting Standards

ACS File Naming and Formatting Standards

By Michael Yoon and Aurelius Prochazka

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

To ensure consistency (and its collateral benefit, maintainability), we define and adhere to standards in the following areas: -

File Nomenclature

+

File Nomenclature

Usually we organize our files so that they mainly serve one of the following three purposes:

  • displaying objects and their properties

  • manipulating or acting on objects in some way (by creating, editing, linking, etc)

  • housing procedures, packages, data models and other prerequisite code Essentially, we want our files named in a fashion that reflects their purpose.

@@ -52,7 +52,7 @@

  • For files that contain procedures that are part of the core ACS, use the convention:

    ad-description-procs.tcl -

  • URLs

    +

    URLs

    File names also appear within pages, as linked URLs and form targets. When they do, always use abstract URLs (e.g., user-delete instead of @@ -66,7 +66,7 @@ (/top-level-dir/). If linking to the directory in which the page is located, use the empty string (""), which browsers will resolve correctly. -

    File Headers and Page Input

    +

    File Headers and Page Input

    Include the appropriate standard header in all scripts. The first line should be a comment specifying the file path relative to the ACS root directory. e.g. @@ -168,7 +168,7 @@

    Of course, replace "--" with the comment delimiter appropriate for the language in which you are programming. -

    Page Construction

    +

    Page Construction

    Construct the page as one Tcl variable (name it page_content), and then send it back to the browser with one call to doc_return, which will call @@ -224,7 +224,7 @@ edit ad_header (which quite possibly can start a <table>) and ad_footer (which may need to end the table started in ad_footer) to customize the look and feel of the entire site. -

    Tcl Library Files

    +

    Tcl Library Files

    Further standards for Tcl library files are under discussion; we plan to include naming conventions for procs.

    ($Id$)
    View comments on this page at openacs.org