Choose your javascript namespaces wisely

Just a quicky: it is a good practise to use namespaces in formscripting / javascript in order not to clutter up some standardobjects. Fortunately, even in standard there is now use of this thought. Unfortunately, sometimes the namespace starts with the name of the entity, the scripts are on.

So : Do not use the entityname as the basepoint of your namespace. Start with something, where the chances of namespaceclashes are not that likely.For example: at our company, we now strongly use the standardprefix for customization also as a prefix for the namespaces. We had long bugtrackingsessions before this problem showed up.

Example:

orb_Account = {}; // do not use Account = {}, it may already be in use by standard
orb_Account.functions = {
dosomething : function() {}
};

Thanks to detective Diana who brought this up

No comments yet.

Leave a Reply