[Mapbender-dev] Code Conventions (first summary)

Uli Rothstein (WhereGroup) uli.rothstein at wheregroup.com
Tue Jan 30 02:54:15 EST 2007


Hi all,

Christoph Baudson (WhereGroup) schrieb:
> Hi everybody,
> 
> to accelerate the process of agreement on the conventions, I would like 
> to summarize our discussion:
> 
> * The code conventions say "performance is not a good reason to avoid 
> commenting" (thanks for the reminder, Marko)
> * Marc proposed a PHP-Doc style documentation for both PHP and JS, 
> seconded by Marko.

jep, PHP-Doc style is a good proposal, so we can use some tools to extract the 
documentation - although I think that the wiki is the better alternative for the 
documentation. There are two advantages: we've one format (wiki) for all 
purposes and we have a history.
But maybe we could use both and extract the php-doc-style comments into the wiki?

> 
> * Marc introduced the packing algorithm used by jQuery: 
> http://dean.edwards.name/packer/usage/
> Using this packing algorithm would result in additional rules:
> 
> - "terminate every statement by a semicolon (even functions!)" (although 
> I don't understand why the if-statement in the sample is not 
> terminated..any ideas? http://dean.edwards.name/packer/usage/sample.html)

that's not very consequent and stringent. And the terminating semicolon behind 
the bracket of the function-body is seriously ugly! I've never seen that before.

> - "always use curly braces, even if the block consists of only one line"
> 
> (using the packer would be optional)

Some additional proposals:
* I think it would be helpful to declare the variable which come from 'outside' 
via GET, POST, SESSION etc. in the header
* so we should provide some templates in our mapbender-org-wiki which could be 
imported in the IDE

best regards
Uli
> 
> I would like to invite everyone who disagrees with these statements (or 
> has corrections) to come up with their arguments, so that an agreement 
> can be reached soon.
> 
> Thanks for your time,
> 
> Christoph
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev


-- 
---------------------------------
        Ulrich Rothstein
    WhereGroup GmbH & Co.KG
        Siemensstraße 8
         53121 Bonn
           GERMANY
---------------------------------
    uli.rothstein at wheregroup.com
          uli at osgeo.org
        www.wheregroup.com
        www.mapbender.org
---------------------------------
Zentrale:  ++49 (0) 228 909038 0
Durchwahl: ++49 (0) 228 909038 17
Fax:       ++49 (0) 228 909038 11
---------------------------------

ACHTUNG: Die Firmen Geo-Consortium, CCGIS und KARTA.GO haben ihre Fusion als 
WhereGroup zum 1.1.2007 bekannt gegeben.
Daher ändern sich ab Januar 2007 die Email Adressen und Telefonnummern.


More information about the Mapbender_dev mailing list