tjpotter
Newbie
Posts: 1
Registered: 7/20/2004
Location: Denver, Colorado, USA
Member Is Offline
|
| posted on 7/20/2004 at 05:07 AM |
|
|
Need to start thinking about namespaces for Portal integration
Hi Softcomplex team,
Love you products and support! However, I wanted to give you a heads up on an issue that I'm going to be faced with in the near future. I'm
starting to venture into the realm of creating Portlets for Portal servers like Plumtree, BEA, Vignette, etc.
With new specs like JSR-168 and WSRP, Portlet developers will need to address making JavaScript functions unique on a page where content (Portlets)
can come from many providers. In other words, I need to ensure that some other Portlet provider doesn't come along a write a JavaScript function
with the same name as mine but different behavior.
The suggested approach is to prepend a namespace before any global JavaScript methods and functions. Since you don't allow us to edit your code
in the field, you are going to need to solve this issue for us (or relax the licensing restrictions ;-)
What do you suggest as a solution for dealing with this issue? Unfortunately, without a good solution, I'm going to have to bail out on your code
and use Flash/ActionScript, but I really want to continue to use your components.
JSR-168 specification is attached to this topic so that you can research Portlets, etc. a bit more if needed.
Attachment: portlet-1_0-prd-spec.pdf (364.03kb)
This file has been downloaded 815 times
|
|
|
tigra
Administrator
Posts: 1984
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 7/20/2004 at 06:25 PM |
|
|
In scrambled versions we use prefixes for all variables. Those can be changed easily on your request (or you can even do that by simple search and
replace).
Additionally all script implementations are object oriented so internal properties and function names (which normally consume most of the namespace)
are visible in local scope only and can't be desturbed by global variables with the same names.
|
|
|
|