phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/doc coding_standard.txt, 1.9 etiquette.txt,


From: ceb
Subject: [Phpgroupware-cvs] phpgwapi/doc coding_standard.txt, 1.9 etiquette.txt, 1.9
Date: Mon, 25 Apr 2005 00:44:00 +0200

Update of phpgwapi/doc

Modified Files:
     Branch: MAIN
            coding_standard.txt lines: +15 -17
            etiquette.txt lines: +19 -19

Log Message:
removed globals

====================================================
Index: phpgwapi/doc/coding_standard.txt
diff -u phpgwapi/doc/coding_standard.txt:1.8 
phpgwapi/doc/coding_standard.txt:1.9
--- phpgwapi/doc/coding_standard.txt:1.8        Thu Dec 30 06:47:26 2004
+++ phpgwapi/doc/coding_standard.txt    Sun Apr 24 22:44:21 2005
@@ -1,28 +1,28 @@
-1) Format your code so that we can read it, please!
+1)     Format your code so that we can read it, please!

-2) Use tabs for formatting, NOT SPACES.  Tabs create smaller files and editors 
allow
+2)     Use tabs for formatting, NOT SPACES.  Tabs create smaller files and 
editors allow
        developers to view a tab as however many spaces as they prefer.  Spaces 
do not allow this.
        There is one exception (see #11 below).

-3) Use ' instead of " for strings.  This is a performance issue, and prevents
+3)     Use ' instead of " for strings.  This is a performance issue, and 
prevents
        a lot of inconsistent coding styles.

-4) Comments go on the line ABOVE the code, NOT to the right of the code!
+4)     Comments go on the line ABOVE the code, NOT to the right of the code!

-5) For each section of code put a section divider with basic explanation of 
the following
+5)     For each section of code put a section divider with basic explanation 
of the following
        code/functions.  It should look like this:

        
/****************************************************************************\
        * These functions are used to pick my nose                              
     *
        
\****************************************************************************/

-6) Do not document every bit of code in comments.  PHP is an interpreted 
language and it will be
+6)     Do not document every bit of code in comments.  PHP is an interpreted 
language and it will be
        nasty on performance.

-7) Use switch statements where many elseif's are going to be used.  Switch is 
faster and I like it
+7)     Use switch statements where many elseif's are going to be used.  Switch 
is faster and I (who?) like it
        better!

-8) 'If' statements need to use the following format:
+8)     'If' statements need to use the following format:

        if ($var == 'example')
        {
@@ -40,7 +40,7 @@
        All other styles are not to be used.  This is it. Use it or I will 
personally come and nag you to
        death.

-9) ALL 'if' statements MUST have matching { } (brackets).  Do NOT create 'if' 
statements like this:
+9)     ALL 'if' statements MUST have matching { } (brackets).  Do NOT create 
'if' statements like this:

        if ($a == b)
                dosomething();
@@ -51,14 +51,12 @@

        They make the code more difficult to read and follow.

-10) class/function format:
+10)    class/function format:

        class testing
        {
                function print_to_screen()
                {
-                       global phpgw, phpgw_info;
-
                        if ($var == 'example')
                        {
                                echo 'This is only an example';
@@ -70,7 +68,7 @@
                }
        }

-11) Associative arrays must be written in the following manner:
+11)    Associative arrays must be written in the following manner:

        $array = array
        (
@@ -80,9 +78,9 @@

        Note that tabs are preferred around the '=>'.

-12) Use the long format for <?php.  Do NOT use <?.
+12)    Use the long format for <?php.  Do NOT use <?.

-13) All code should start with 1 tab.  Example:
+13)    All code should start with 1 tab.  Example:

 <?php
        dosomething();
@@ -100,6 +98,6 @@
        dosomemorestuff();
 }

-14) Use lower case for variable and function names.  No stubbly-case 
(mixed-case) code.
+14)    Use lower case for variable and function names.  No stubbly-case 
(mixed-case) code.

-15) Thanks for following these rules :)
+15)    Thanks for following these rules :)

====================================================
Index: phpgwapi/doc/etiquette.txt
diff -u phpgwapi/doc/etiquette.txt:1.8 phpgwapi/doc/etiquette.txt:1.9
--- phpgwapi/doc/etiquette.txt:1.8      Thu Dec 30 06:47:26 2004
+++ phpgwapi/doc/etiquette.txt  Sun Apr 24 22:44:00 2005
@@ -7,7 +7,7 @@
 important that some basic rules be followed when developing in CVS:

 1.  Many of the developers, and all of the core developers, frequent the IRC
-       channel #phpgroupware on irc.openprojects.net. Please take the time to
+       channel #phpgroupware on irc.freenode.net. Please take the time to
        drop by and introduce yourself.

 2.  Please see the coding_standard.txt document in this folder for some basic
@@ -15,13 +15,18 @@
        and this document outlines our preference to ensure readability and
        compatibility.

-3.  If you want to begin some work on an existing app please consult the
-       primary developer for the application first. Most of the files will
-       contain some type of identification and/or contact information in the
-       head of each file.
+3.  If you want to begin some work on an existing module, please consult the
+       primary developer for that application first. The authors contact 
information
+       can be found in the head of each file.
+       Note: ANY commits [i.e. bugfixes] to applications | files which you 
don't
+       maintain need the agreement of the primary developer BEFORE committing.
+       If the primary developer of an application did not grant general rights 
to
+       you for committing to his applications | files, you have to ask him for
+       every single commit or submit your changes to the patch manager
+       [http://savannah.gnu.org/patch/?group=phpgroupware].

-4.  If you are unable to contact the author, please contact at least one of the
-       project leads [Seek3r, jengo, skeeter, Milosch, ceb] or a core 
developer.
+4.  If you are unable to contact the author, please contact one of the
+       project leads [http://phpgroupware.org/coordinators].

 5.  If you have just joined the project, or have always kept to your own
        application, etc., then please exercise caution when committing changes
@@ -45,27 +50,22 @@
        API or of another application's tables.

 8.  Before importing a new application, or adding many files | directories to
-       existing modules, please contact one of the project leads [Seek3r, 
jengo,
-       skeeter, Milosch, ceb].
+       existing modules, please contact one of the project leads
+       [http://phpgroupware.org/coordinators].

 9.  Please do not import a new application that does not have some basic
        functionality in place or at least a description and basic 
documentation.

 10. If you do not have an original icon for your app, please do not import a
        copy from another application icon. The API should insert a default
-       until a new one is created. The size of icons should be 31x31 for all 
but
-       the idsociety template. Do not put a 31x31 color icon in the idsociety
-       template.
+       until a new one is created.

-11. Basically, all template files are located in the 
app_name/templates/default/
+11. Basically, all template files are located in the app_name/templates/base/
        directory. Please do only commit template files to other 
app_name/templates/
-       _layout_/directories if they _differ_ from the default version. The 
same is
+       _layout_/directories if they _differ_ from the base version. The same is
        valid for images. All application images are located in the 
app_name/templates/
-       default/images directory. Please do only commit images to other than 
the default
-       directory if they _differ_ from the default version. Most of the 
applications
-       do not need other templates directories than default and idsociety. The 
idsociety
-       templates directory should only contain the images dir with the navbar 
and
-       navbar_over icon for the idsociety layout.
+       base/images directory. Please do only commit images to other than the 
base
+       directory if they _differ_ from the base version.
        Please avoid to have files twice in your application directory.

        Thanks






reply via email to

[Prev in Thread] Current Thread [Next in Thread]