iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
I have an application (modelled around your ClientUI sample) where xap's are downloaded on demand.
While using it with DevForce I ran into a problem from IdeaBlade 'entity type queried is not a known type' when I was accessing data from one of the downloaded xaps.
The article On Demand Discovery hosted here http://drc.ideablade.com/xwiki/bin/view/Documentation/on-demand-discovery
pointed me to the problem.
I then implemented a shell manager and assigned it to the UXShell's Default Shell manager.
In the Downloaded event of the Shell Manager I have made the On Demand Discovery possible by adding the following line of code.
public void Downloaded(ApplicationActivityEventArgs arg) { string xapName = arg.Application.Source.OriginalString; var xap = new IdeaBlade.Core.DynamicXap(new Uri(xapName, UriKind.Relative)); IdeaBlade.Core.Composition.CompositionHost.Add(xap); }
Is this the correct way to do it ?
Why does ClientUI not implement MEF ?
Balachander
Hello Balachander,
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.
private void DiscoverAvailablePackages() { UXShell.Current.IsInitializing = true; ResourceDownloader downloader = new ResourceDownloader(); downloader.Downloaded += (o, e) => { 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 += (o, e) => { throw e.Error; }; downloader.Download(new Uri("Applications.packages", UriKind.RelativeOrAbsolute)); }
Regards,Handy
Hi Handy Surya,
Thanks a lot for the answer which is spot on and the code snippet .
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.
IdeaBlade.Core.Composition.CompositionHost.Add(ApplicationPackage.Source);
Could you also enlighten me why MEF is not used in ClientUI ?
Regards
Hello,
I will need to discuss with our developer about why MEF is not used in ClientUI. I will let you know the update.
Hello Jimmy,Thanks once again for the insight into the design perspective of choosing to not use MEF but design your own extensibility API !! RegardsBalachanderHello Balachander,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.Hope this helps,Jimmy
Hello Jimmy,
Thanks once again for the insight into the design perspective of choosing to not use MEF but design your own extensibility API !!
Hello Balachander,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.Hope this helps,Jimmy
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname