<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Moving to dynamic module loading</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : Moving to dynamic module loading</description>
  <pubDate>Sat, 11 Apr 2026 03:46:21 -700</pubDate>
  <lastBuildDate>Tue, 26 Jun 2012 23:56:45 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3508</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Moving to dynamic module loading : Yes, in order to get a XAP file...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13917#13917</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3508<br /><strong>Posted:</strong> 26-Jun-2012 at 11:56pm<br /><br />Yes, in order to get a XAP file you need to create them as Silverlight&nbsp;Applications, but they don't need a bootstrapper.]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 23:56:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13917#13917</guid>
  </item> 
  <item>
   <title>Moving to dynamic module loading :   It&amp;#039;s morning in Italy...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13916#13916</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3508<br /><strong>Posted:</strong> 26-Jun-2012 at 11:47pm<br /><br />It's morning in Italy and I've a question for you.........currently my solution's module are .dll, since I have to load XAP file, have I to re-create my projects as Silverlight Application? what about their own bootstrapper? should I implement them?<div>&nbsp;</div><div>Thanks</div>]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 23:47:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13916#13916</guid>
  </item> 
  <item>
   <title>Moving to dynamic module loading : Yes, that works. </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13915#13915</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3508<br /><strong>Posted:</strong> 26-Jun-2012 at 1:03pm<br /><br />Yes, that works.]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 13:03:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13915#13915</guid>
  </item> 
  <item>
   <title>Moving to dynamic module loading : I know I know.... I&amp;#039;ll use...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13914#13914</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3508<br /><strong>Posted:</strong> 26-Jun-2012 at 12:26pm<br /><br />I know I know.... I'll use a Coroutine.BeginExecute to wait the data...or am I wrong?]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 12:26:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13914#13914</guid>
  </item> 
  <item>
   <title>Moving to dynamic module loading : Yes, that&amp;#039;s correct. You...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13911#13911</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3508<br /><strong>Posted:</strong> 26-Jun-2012 at 9:20am<br /><br />Yes, that's correct. You need to store some metadata about your modules somewhere, either in the DB or an XML file on the server that you can download.&nbsp;<div><br></div><div>Your code won't quite work. Keep in mind AddXap is an asynchronous operation. You need to wait for it to finish before you can access anything from the downloaded Xap file.</div>]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 09:20:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13911#13911</guid>
  </item> 
  <item>
   <title>Moving to dynamic module loading :   Hello Marcel,I was of the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13910#13910</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3508<br /><strong>Posted:</strong> 26-Jun-2012 at 9:12am<br /><br />Hello Marcel,<div>I was of the same mind of you, after the login I've created a </div><div>&nbsp;</div><div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&#091;<span style="color: rgb43, 145, 175;">Export</span>(<span style="color: blue;">typeof</span>(<span style="color: rgb43, 145, 175;">IPartFactory</span>&lt;<span style="color: rgb43, 145, 175;">MenuViewModel</span>&gt;))&#093;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp; <span style="color: blue;">public</span> <span style="color: blue;">class</span> <span style="color: rgb43, 145, 175;">MenuViewModelFactory</span> : <span style="color: rgb43, 145, 175;">PartFactoryBase</span>&lt;<span style="color: rgb43, 145, 175;">MenuViewModel</span>&gt;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp; {</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp; }</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div></div><div><font size="2" face="C&#111;nsolas">and on the Execute method I do</font></div><div><font size="2" face="C&#111;nsolas"></font>&nbsp;</div><div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><p style="margin: 0px;"><span style="color: blue;">public</span> <span style="color: blue;">void</span> Execute(<span style="color: rgb43, 145, 175;">ActionExecutionContext</span> context)</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <span style="color: rgb43, 145, 175;">IList</span>&lt;<span style="color: blue;">string</span>&gt; rolesList = userService.CurrentUser.Roles;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">var</span> filtered = rolesList.Where(o1 =&gt; o1.StartsWith(<span style="color: rgb163, 21, 21;">"module"</span>));</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">if</span> (filtered.Any())</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// <span style="color: rgb43, 145, 175;">Here I have to download the modules</span>&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; }</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;// &nbsp; GetMenuItems();</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; }</p></div><!--EndFragment--></div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">I think I'll need to store some information on the DB for telling my app to download for module_admin the full path to the admin's module... what you think about this?</div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;</div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">Or if there was a DirectoryCatalog equivent I would have download the list index and parsed it ...</div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">Is this approach ok?</div><div><!--EndFragment--></div>]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 09:12:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13910#13910</guid>
  </item> 
  <item>
   <title>Moving to dynamic module loading :   There are generally two approaches....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13909#13909</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3508<br /><strong>Posted:</strong> 26-Jun-2012 at 9:00am<br /><br />There are generally two approaches. You can eager load the Xap files during the bootstrapping of the application or in your case after the login, since you need the user's roles, or lazy loading the Xap file when the user first tries to enter a certain module. <div>&nbsp;</div><div>It sounds like the best approach for you is to load them after the login. Similarly to TempHire, where it pre-loads some data using the PreLoader, you can have a coroutine at that point with a number of Compositon.AddXap calls that load the appropriate modules based on the user's roles. You can use a parallel coroutine to load them in parallel.</div><div>&nbsp;</div><div>On a side-note I'm going to rename Composition.AddXap to Composition.AddXapAsync. Just noticed that I forgot to add the Async postfix to this method.</div>]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 09:00:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13909#13909</guid>
  </item> 
  <item>
   <title>Moving to dynamic module loading : Hello,sorry to disturb you again,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13905#13905</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3508<br /><strong>Posted:</strong> 26-Jun-2012 at 2:20am<br /><br />Hello,<br>sorry to disturb you again, i've got a SL 5 application that's composed of modules but currently they're all loaded when the application starts (I've added them as reference to my sl application).<br><br>I've read <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/cocktail-dynamic-xap" target="_blank">this post</a> on the wiki but I've no clear idea on where to put this... another client requisite (if possible) is to load the module only if the user is allowed to (I've&nbsp; a core module that will be loaded (and referenced) by different projects), considering that I know if a user can/can't load that module if it's defined a role for it (asp.net role) what 's the best approach for my needs?<br><br>I've also checked the TempHire demo but it doesn't use Composition.AddXap...&nbsp; can someone help me on this?<br>Thanks<br>]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 02:20:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3508&amp;PID=13905#13905</guid>
  </item> 
 </channel>
</rss>