[Mapbender-dev] Code Conventions (first summary)

Christoph Baudson (WhereGroup) christoph.baudson at wheregroup.com
Fri Feb 2 10:05:34 EST 2007


> It would be kind, if you could start describing that topic in the wiki. 
> I'm writing my diploma-thesis at the moment - so I actually do not have 
> the time to add something to the wiki. I'll have more time after 
> february, 28th

No problem, I will come up with something in the meantime. I would be 
happy if you could take a look at it when you have some more time on 
your hands. Good luck for your thesis!

> As I understand it: In JavaScript (nearly) everything is an object, even 
> functions. So
> 
> function foo() { alert('bar'); }
> 
> ...is simply a shortcut for:
> 
> window.foo = function() { alert('bar'); };
> 
> ...where in the second example you cannot leave out the terminating 
> semicolon. Please correct me if I'm wrong on this.

I assume you're right. But I still don't get why you don't need to 
terminate an if-block by a semicolon but a function block.

>> I guess we have come to no conclusion here. I suggest we keep this in 
>> mind and discuss it later (I will add a paragraph to the wiki site). 
>> If there are any objections please let us know.
> 
> I sometimes see code successfully being packed although it does not 
> follow these instructions. Perhaps it's best to try and see. If the 
> packed Javscript  does not work we have at least some common things to 
> check.

Good point. Maybe I can test it next week with the geometry library. 
I'll keep you posted.

Thanks for you input, Marc.

Christoph


More information about the Mapbender_dev mailing list