﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - Downloaded Xap with DevForce On Demand Discovery</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Downloaded-Xap-with-DevForce-On-Demand-Discovery/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Downloaded Xap with DevForce On Demand Discovery</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Downloaded-Xap-with-DevForce-On-Demand-Discovery/</link><pubDate>Tue, 26 Jul 2011 07:49:38 GMT</pubDate><dc:creator>mlcmds</dc:creator><category>ClientUI</category><description>&lt;blockquote&gt;&lt;p&gt;Hello Jimmy,&lt;/p&gt;&lt;p&gt;Thanks once again for the insight into the design perspective of choosing to not&amp;nbsp;use MEF but design your own extensibility API !!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;p&gt;Balachander&lt;/p&gt;&lt;p&gt;Hello Balachander,&lt;br /&gt;&lt;br /&gt;We require our solution to be Silverlight version independence which is why we don't want to design our extensibility API based on MEF. Currently, our API works in Silverlight 3, 4 and 5. This also allows our solution to provide unified API to other platforms like WPF and Windows Phone 7.&lt;br /&gt;&lt;br /&gt;Hope this helps,&lt;br /&gt;Jimmy&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
</description></item><item><title>Downloaded Xap with DevForce On Demand Discovery</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Downloaded-Xap-with-DevForce-On-Demand-Discovery/</link><pubDate>Mon, 25 Jul 2011 06:42:19 GMT</pubDate><dc:creator>jimmyps</dc:creator><category>ClientUI</category><description>Hello Balachander,&lt;br /&gt;&lt;br /&gt;We require our solution to be Silverlight version independence which is why we don't want to design our extensibility API based on MEF. Currently, our API works in Silverlight 3, 4 and 5. This also allows our solution to provide unified API to other platforms like WPF and Windows Phone 7.&lt;br /&gt;&lt;br /&gt;Hope this helps,&lt;br /&gt;Jimmy&lt;br /&gt;</description></item><item><title>Downloaded Xap with DevForce On Demand Discovery</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Downloaded-Xap-with-DevForce-On-Demand-Discovery/</link><pubDate>Mon, 04 Jul 2011 05:23:13 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>ClientUI</category><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I will need to discuss with our developer about why MEF is not used in ClientUI. I will let you know the update.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>Downloaded Xap with DevForce On Demand Discovery</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Downloaded-Xap-with-DevForce-On-Demand-Discovery/</link><pubDate>Fri, 01 Jul 2011 10:09:36 GMT</pubDate><dc:creator>mlcmds</dc:creator><category>ClientUI</category><description>&lt;p&gt;Hi Handy Surya,&lt;/p&gt;
&lt;p&gt;Thanks a lot for the answer which is spot on and the code snippet .&lt;/p&gt;
&lt;p&gt;I guess I do not need to write the piece of code(shown below)  in the shell Downloaded event handler but rather do it when the xap is downloaded.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;IdeaBlade.Core.Composition.CompositionHost.Add(ApplicationPackage.Source);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt; &lt;/p&gt;
&lt;p&gt;Could you also enlighten me why MEF is not used in ClientUI ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Balachander&lt;/p&gt;</description></item><item><title>Downloaded Xap with DevForce On Demand Discovery</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Downloaded-Xap-with-DevForce-On-Demand-Discovery/</link><pubDate>Fri, 01 Jul 2011 00:30:12 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>ClientUI</category><description>&lt;p&gt;Hello Balachander,&lt;/p&gt;&lt;p&gt;Actually, you need to follow our approaches, not DevForce. We have a similiar code that shows LoadOnDemand App in our ClientUISamples, App.xaml.cs. We ever tested the code along with DevForce and it works fine. Here is the snippet code.&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;private void DiscoverAvailablePackages()
        {
            UXShell.Current.IsInitializing = true;
            ResourceDownloader downloader = new ResourceDownloader();
            downloader.Downloaded &amp;#43;= (o, e) =&amp;gt;
            {
                Stream stream = (Stream)e.Resource;
                XDocument x = XDocument.Load(stream);
                var packages = from package in x.Descendants("ApplicationPackage") select package;
                foreach (XElement package in packages)
                {
                    using (StringWriter writer = new StringWriter())
                    {
                        package.Save(writer);
                        UXShell.Current.Applications.Add(ApplicationPackage.Parse(writer.GetStringBuilder().ToString()));
                        
                    IdeaBlade.Core.Composition.CompositionHost.Add(ApplicationPackage.Source);
                    }
                }
                UXShell.Current.IsInitializing = false;
            };
            downloader.Failed &amp;#43;= (o, e) =&amp;gt;
            {
                throw e.Error;
            };
            downloader.Download(new Uri("Applications.packages", UriKind.RelativeOrAbsolute));
        }&lt;/pre&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Downloaded Xap with DevForce On Demand Discovery</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Downloaded-Xap-with-DevForce-On-Demand-Discovery/</link><pubDate>Thu, 30 Jun 2011 06:04:13 GMT</pubDate><dc:creator>mlcmds</dc:creator><category>ClientUI</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have an application (modelled around your ClientUI sample) where xap's are downloaded on demand.&lt;/p&gt;
&lt;p&gt;While using it with DevForce I ran into a problem from IdeaBlade &lt;strong&gt;'entity type queried is not a known type' &lt;/strong&gt;when I was accessing data from one of the downloaded xaps.&lt;/p&gt;
&lt;p&gt;The article On Demand Discovery hosted here &lt;a href="http://drc.ideablade.com/xwiki/bin/view/Documentation/on-demand-discovery"&gt;http://drc.ideablade.com/xwiki/bin/view/Documentation/on-demand-discovery&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;pointed me to the problem.&lt;/p&gt;
&lt;p&gt;I then implemented a shell manager and assigned it to the UXShell's Default Shell manager.&lt;/p&gt;
&lt;p&gt;In the Downloaded event of the Shell Manager I have made the &lt;strong&gt;On Demand Discovery&lt;/strong&gt; possible by adding the following line of code.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;public void Downloaded(ApplicationActivityEventArgs arg)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string xapName = arg.Application.Source.OriginalString;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var xap = new IdeaBlade.Core.DynamicXap(new Uri(xapName, UriKind.Relative));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IdeaBlade.Core.Composition.CompositionHost.Add(xap);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/em&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Is this the correct way to do it ?&lt;/p&gt;
&lt;p&gt;Why does ClientUI not implement MEF ?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Balachander&lt;/p&gt;</description></item></channel></rss>