Comments (11)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 rcasey commented Permalink

Chris,<div>&nbsp;</div> Will this work with EGL CE as well? <div>&nbsp;</div> Thanks,<br /> Richard

2 ChrisLaffra commented Permalink

The dynamic loader itself would work with EGL CE, yes. I tested and developed the dynamic loader in RBD 7.5.1.4. Importing it to EGL CE is left as an "exercise to the user" <img class="jive-emoticon" border="0" src="http://www-949.ibm.com/software/rational/cafe/images/emoticons/happy.gif" alt=":-)" />

3 rcasey commented Permalink

Chris,<div>&nbsp;</div> Just a followup. Looks like it will work with EGL CE. Had to tweak a few things.<div>&nbsp;</div> 1) Version of com.ibm.egl.rui.dojo.runtime.google was 1.3.2.1<br /> Changed EGL Build Path to use 1.3.2 (do I need to upgrade?)<div>&nbsp;</div> 2) JRE System library in Build Path of com.ibm.dynamic.loader.service<br /> Was WebSphere Application Server v7.0 JRE<br /> Changed to use Workspace default (jre6 in my case)<div>&nbsp;</div> 3) Runtimes in Project Facets for com.ibm.dynamic.loader.service<br /> Was Tomcat v5.5<br /> Changed to use Tomcat v6.0<div>&nbsp;</div> The Menu handler in the demo package works just fine!<div>&nbsp;</div> Is there a mechanism that lets you monitor the timing and size of downloads to see how the dynamic loading is affecting the bandwidth?<div>&nbsp;</div> Thanks again!<br /> Richard

4 ChrisLaffra commented Permalink

Wow. Nice job, Richard.<div>&nbsp;</div> You can monitor download trade-offs really well with:<br /> 1. Firebug in Firefox, <a class="jive-link-external" href="https://addons.mozilla.org/en-US/firefox/addon/1843">https://addons.mozilla.org/en-US/firefox/addon/1843</a><br /> 2. Yahoo ySlow, <a class="jive-link-external" href="http://developer.yahoo.com/yslow/">http://developer.yahoo.com/yslow/</a><br /> 3. Chrome Dev Tools: <a class="jive-link-external" href="http://www.stevesouders.com/blog/2009/11/30/chrome-dev-tools/">http://www.stevesouders.com/blog/2009/11/30/chrome-dev-tools/</a><div>&nbsp;</div> Chris

5 rcasey commented Permalink

Thanks. This stuff is fun!<div>&nbsp;</div> I noticed you unload the current page when switching to a new page (unloadHandler in showPage). Is that necessary, or just a means to keep the memory footprint down?<div>&nbsp;</div> How would this work for intra-page communication? For example, page1 needing to send some info to page3? Would it work for page1 to publish a message to the InfoBus, and then page3 would subscribe to and receive the message when it first got loaded?<div>&nbsp;</div> Could this loading mechanism be used for a TabFolder? I'm thinking that the widget for each TabFolderPage could be dynamically loaded when the tab was selected rather than loading all the widgets at the beginning.<div>&nbsp;</div> Richard

6 ChrisLaffra commented Permalink

Yes. The Infobus can also be used for inter-page communication, as I elude to already in the blog entry.<div>&nbsp;</div> I can see this work for something like a tab folder, but also for a portal-like solution, such as described here: <a class="jive-link-external" href="http://www-949.ibm.com/software/rational/cafe/blogs/egl-ce/2009/09/24/developing-a-portal-using-egl-rich-ui-bending-the-laws-of-physics">http://www-949.ibm.com/software/rational/cafe/blogs/egl-ce/2009/09/24/developing-a-portal-using-egl-rich-ui-bending-the-laws-of-physics</a>. In that blog, I propose the use of iframes which have all kinds of negative impacts, and are considered "evil". With a dynamic loading solution you can have the best of both worlds: decoupling of components and incremental loading, while avoiding the use of iframes.

7 ChrisLaffra commented Permalink

I unload pages to preserve memory. I predict I no longer need the old page, so I unload the JavaScript code from the document. It's tricky business to unload components, as no one keeps a dependency chain. It may be that by unloading one component, you may disable another component that depends on a shared sub-component. Once you start using unloading, you should make sure you do it for all components that you load, and you should be aware of the potential side effect.

8 rcasey commented Permalink

I'm doing some experiments with using the InfoBus to talk between dynamically loaded pages. It looks like the Open Ajax Hub code is being loaded repeatedly. I commented out the code that unloads the current page (loadPage in Menu.egl). However, for each page that uses the InfoBus, the Dynamic Loader Debug View shows:<div>&nbsp;</div> com.ibm.dynamic.loader.loaded com/ibm/egl/rui/infobus/open_ajax_hub_v10.js<div>&nbsp;</div> even though the actual page code is not reloaded.<div>&nbsp;</div> With the InfoBus references in the main Menu, I would have thought that code would already be loaded.<div>&nbsp;</div> Let me know if you have any ideas. I'll keep experimenting and let you know what I find out.

9 NikolaGereci commented Permalink

Chris,<div>&nbsp;</div> Why does this use the ModuleLoaderService service? Can it be modified to avoid this? <div>&nbsp;</div> Nikola

10 AaronAllsbrook commented Permalink

I am noticing what I think is a memory leak in the dynamic loader. <div>&nbsp;</div> I took the sample (Menu.egl) and added a job that swapped the the combo selection between 1 and 2 to simulate a user action. Over time the memory for the browser grew until an out of memory exception occured. This OOM occurs in IE8 and Chrome - and if I insert ways to pause the job garbage collection still never happens. <div>&nbsp;</div> I have attempted to see if this is related the dynamic loader running at development versus deployment time but I believe I see the same behavior in both cases, even when its using the services to load the page. <div>&nbsp;</div> Strategically commenting things out leads me to the Helper.js loadfile function. Reading about how browsers do garbage collection makes me thing that the xmlhttp object is not being released because its referenced by a function. (A wild guess really)<div>&nbsp;</div> Has anyone else encountered an issue with this? Let me know if sharing my samples would be valuable to others debugging the problem. <div>&nbsp;</div> Thanks<br /> Aaron Allsbrook<br /> <a class="jive-link-external" href="http://www.clearblade.com">ClearBlade</a>