Feature Request: Script Exclusion in HTML
I am working currently in a portal project. From various datasources we collect information and publish as portlets. The current UI scenario requires us to use JavaScript libraries like prototype.js and jQuery. In both these libraries, $() has different meaning. So when we tie a particular portlet’s UI to prototype.js, and another to jQuery, we cannot effectively place both of them in the same page.
If HTML/XHTML provides some kind of script exclusion so that scripts placed inside a particular scope do not reveal their functions and variables globally across the page, it is going to be helpful. For example:
<script-package name="abc">
<script src="prototype.js" type="text/javascript"/>
<script type="text/javascript">
// use prototype specific code
</script>
</script-package>
<script-package name="xyz">
<script src="jquery.js" type="text/javascript"/>
<script type="text/javascript">
// use jQuery specific code
</script>
</script-package>
In the rare case when a script needs to access some variable defined in different package, it can use some namespace mechanism. Any ideas?
Hi Subhash
I recently came across your blog and liked its simple practical style.
Incidentally, i am starting with a portal project and was wondering if you could share your experience and advise about developing with JSR286. we intend to use websphere portal 6.1
My main concern at the moment is a lack of a web framework which has good support for JSR286. Spring Portlet MVC 3.0 is out, but only a milestone release with no documentation.
what tech stack (web framework, ajax lib, other widgets/components) did u use on the web layer?
Do you have any sample code/framework which can help me jumpstart?
Thanks,
Gaurav Madan
Gaurav
19 Jan 09 at 8:07 pm