Index: openacs-4/packages/acs-core-docs/www/style-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/style-guide.html,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/style-guide.html 4 Jun 2006 00:45:24 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/style-guide.html 17 Jul 2006 05:38:32 -0000 1.21 @@ -1,9 +1,8 @@ - -
+ ">
By Jeff Davis -
+
Why have coding standards for OpenACS? And if the code works why change it to adhere to some arbitrary rules?
@@ -12,7 +11,7 @@ lines of tcl code, about 460,000 lines of sql (in datamodel scripts and .xql files), about 80,000 lines of markup in .adp files, and about 100,000 lines of documentation. All told, just - about a million lines of "stuff". In terms of logical units + about a million lines of "stuff". In terms of logical units there are about 160 packages, 800 tables, 2,000 stored procedures, about 2,000 functional pages, and about 3,200 tcl procedures. @@ -28,7 +27,7 @@ over a long period by a lot of different people, OpenACS sometimes lacks this basic guessability and in the interest of bringing it into line we have advanced these guidelines. -
Here is a short list of the basic rules code contributed to OpenACS should follow...
Follow the file naming and the package structure rules.� @@ -75,8 +74,8 @@ toolkit more useful for everyone and more easily extended.
Make sure your datamodel create/drop scripts work.�
Break the table creation out from the package/stored
- procedure creation and use create or
- replace where possible so that scripts
+ procedure creation and use create or
+ replace
where possible so that scripts
can be sourced more than once. Make sure your drop script
works if data has been inserted (and permissioned and
notifications have been attached etc).
@@ -90,6 +89,6 @@
Solicit code reviews.� Ask others to look over your code and provide feedback and do the same for others. -