AW: [Mapbender-dev] Reminder: Code Conventions

Melchior Moos nimix at
Mon Jan 22 14:58:41 EST 2007

talking about compressed JS code I think it's interesting to have a look
at google maps code:
they compress the code by dropping comments and linebeakes but they also
shorten their function and variable names.
Does anybody now a nice packing programm which does this (hopefully also
within PHP-scripts) ??


Marc Jansen schrieb:
> 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
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at

More information about the Mapbender_dev mailing list