It depends a lot on how you actually work with code. A good practice to
have is a set variable naming scheme that can prevent clashes in this
case, I guess it would depend on how far you're willing to go to prevent
such problems (I prefer a bit of pain in the beginning getting used to
the concept rather than huge pain later trying to fix the problems it
causes if done wrong).
-----Original Message-----
From: Robin Fernandes [mailto:rewbs.soal@gmail.com]
Sent: 27 October 2006 11:34
To: xwiki-users(a)objectweb.org
Subject: [xwiki-users] XWiki Script Coexistence
As XWiki becomes more popular, hopefully a wide variety of scripts will
become available and easy to install thanks to the new packaging system.
I'm wondering if we need to do anything to ensure scripts coexist
peacefully.
For example, I'm considering installing the Tagging script, but I'm
concerned that its use of window.onload and maybe functions it defines
will clash with other javascript code on the site.
Also, should there be a specific Javascript library that we expect XWiki
scripts to use, so that a page doesn't have to load up several toolkits
just so that different scripts can call their Ajax functions?
Furthermore, AFAIK it's not possible to define namespaces in Velocity.
I assume it's possible several scripts will try to use the same variable
names within the same page, resulting in confusion. Not sure what
workarounds there are for this.
Any thoughts? Am I just being paranoid? How do systems like Google ig
allow many custom widgets on the same page without clashes?
Regards,
Robin.