[Mapbender-dev] PHP code comments

Christoph Baudson (WhereGroup) christoph.baudson at wheregroup.com
Wed May 9 08:52:33 EDT 2007


Thank for pointing out this issue, Michael. I agree on putting only one 
class into each file.

About file naming conventions: these are *not* yet covered by the code 
conventions. But setting up some conventions would be very helpful 
indeed. Going one step further, we should also establish rules that 
define in which folder to put each file.

How about a new segment in the code conventions chapter in the wiki?

http://www.mapbender.org/index.php/Code_conventions

Cheers

Christoph

Marc Jansen schrieb:
> Hi List,
> 
> Michael Schulz schrieb:
>> Hi,
>>
>> I just realized that PHPDoc can only document one class per file. I
>> don't know how often this is the case for the php classes, e.g.
>> class_wms has one additional class (layer). I found this while trying
>> PHPDoc at the sld editor classes.
>>
>> PHPDoc throws an ugly error if it comes to multiple classes in one
>> file and functions, variables, etc. of the additional classes are
>> merged under the first class.
>>
>> Should we therefore seperate each class in an individual file?
>>
> 
> I would support your suggestion. BTW: Is there a pattern / suggestion on 
> naming files? My eclipse always suggests
> xyz.class.php
> when generating a new PHP class. Is this somehow a general PHP convention?
> 
> -- Marc
> 
> 
>> Cheers, Michael
>>
>>
>>
>> 2007/5/7, Christoph Baudson (WhereGroup) 
>> <christoph.baudson at wheregroup.com>:
>>> At the Mapbender Development sprint we agreed that we should start
>>> commenting Mapbender code more thoroughly. Marc Jansen spearheaded this
>>> initiative, volunteering to start commenting some PHP classes. Thanks
>>> for your enthusiasm, Marc.
>>>
>>> I recommend you start with the following PHP classes as I consider them
>>> not to need a redesign in the near future:
>>>
>>> classes/class_connector.php
>>> classes/class_mb_exception.php
>>> classes/class_administration.php
>>>
>>> I recommend commenting the functions and their interfaces primarily.
>>>
>>> As for JavaScript, I have already commented a file some time ago
>>>
>>> javascripts/geometry.js
>>>
>>> I believe PHP Doc and JS Doc are similar; maybe we can concentrate on
>>> the similarities between the two, so we can use one style for both JS
>>> and PHP. I would be happy if we could manage to coordinate our
>>> commenting approach and achieve a single style.
>>>
>>> Marc, please keep us updated; I would also be interested how turning
>>> these comments into a valid HTML documentation works, as I have not
>>> tried this with JS Doc.
>>>
>>> Cheers
>>>
>>> -- 
>>> Baudson Christoph
>>> http://www.wheregroup.com
>>> _______________________________________________
>>> Mapbender_dev mailing list
>>> Mapbender_dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
>>>
>>
>>
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev


--
Baudson Christoph
http://www.wheregroup.com


More information about the Mapbender_dev mailing list