AW: [Mapbender-dev] Reminder: Code Conventions

Marc Jansen jansen.marc at gmx.de
Mon Jan 22 13:55:06 EST 2007


Michael Schulz schrieb:
> Hi,
>
> I think the conventions Christoph has set up, make perfectly sense.
> Even if it is a lot to follow ;-) but in the long run and with a
> growing number of developers it is necessary.
>
We will all be rewarded. We will much faster understand how code is 
working (or why it isn't working the desired way). I think that with 
commenting our code we will attract even more people to help coding. I - 
personally - really like to look at other people's code: Very often I 
can learn something. But if it isn't documented it isn't only hard to 
understand, sometimes you don't get the idea, if there isn't someone 
pointing you the right direction.
> I am a little bit confused about the discussion on compressed JS Code.
There is one pro:
 - faster loading of JS-files possibly resulting in a quicker startup of 
the full animation

there is at least one con:
 - you can not read the code any more

More opinions?
> If I understand it correctly, this would mean there is a "source" or
> raw JS code following the conventions of the packing routine (with
> comments inline, correct semi-colons) that lives e.g. in the
> repository, but a released version would use the compressed JS  (or
> the JS is compressed on the fly). Is that the case?
>

Yes, it might be the way you described it. Normally within a release, 
there is no need for all comments within JS so a packed version might be 
ok, too. While browsing the repository one may check what the code looks 
like and how it is working.
I think we might run into problems with the PHP generated javascript 
files as we cannot simply compress them once. As said befor On-the_fly 
compression is possible baut would work only for PHP 5-Users and would 
seriously slow down the MB. This is not a real option.

> Cheers, Michael
>
>
>
>
Bye,

-- Marc


More information about the Mapbender_dev mailing list