This project has moved. For the latest updates, please go here.

MEF + Offline

Feb 2, 2012 at 4:37 AM
Edited Feb 2, 2012 at 4:37 AM

Hi Jeremy,

In your opinion, will it be possible to have an application consisting of 2 or modules (*.XAPs) that are loaded dynamically working offline (OOB)?  I am building an ESS System for a customer that have users with slow connections.  I want to keep the overhead to a minimum thus only loading modules that the user have access to and also that the user uses.  

On top of this I would like the users to be able to work offline and sync back once connected.

Is this possible?

Regards

Jaco

Coordinator
Feb 2, 2012 at 11:17 AM

Yes, it's possible and I've engineered it for customers in the past. The key is to provide your own catalog implementation that is smart enough to download dynamically online when connected, then cache the XAP to isolated storage and load it from the cache when offline. I wrote about this in my upcoming book and also have a blog post here:

http://csharperimage.jeremylikness.com/2010/05/silverlight-out-of-browser-dynamic.html

Feb 5, 2012 at 10:53 AM

Thank you, I will have a look at the link. Was rather hoping it came out the box…

From: jeremylikness [email removed]
Sent: 02 February 2012 02:18 PM
To: jacodv_32@hotmail.com
Subject: Re: MEF + Offline [Jounce:289925]

From: jeremylikness

Yes, it's possible and I've engineered it for customers in the past. The key is to provide your own catalog implementation that is smart enough to download dynamically online when connected, then cache the XAP to isolated storage and load it from the cache when offline. I wrote about this in my upcoming book and also have a blog post here:

http://csharperimage.jeremylikness.com/2010/05/silverlight-out-of-browser-dynamic.html

Coordinator
Feb 5, 2012 at 2:52 PM
Unfortunately not a common enough pattern to come out of the box.
Different people want to handle it in different ways, i.e. as part of
a bigger update/check vs. versioning the XAPs individually, storing in
isolated vs. OOB where it is in the file system, etc. so not generic
enough to implement as a core solution.

Jeremy

On Sun, Feb 5, 2012 at 6:53 AM, [email removed] wrote:
> From: jacodv
>
> Thank you, I will have a look at the link. Was rather hoping it came out the
> box…
>
> From: jeremylikness [email removed]
> Sent: 02 February 2012 02:18 PM
> To: [email removed]
> Subject: Re: MEF + Offline [Jounce:289925]
>
> From: jeremylikness
>
> Yes, it's possible and I've engineered it for customers in the past. The key
> is to provide your own catalog implementation that is smart enough to
> download dynamically online when connected, then cache the XAP to isolated
> storage and load it from the cache when offline. I wrote about this in my
> upcoming book and also have a blog post here:
>
> http://csharperimage.jeremylikness.com/2010/05/silverlight-out-of-browser-dynamic.html
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com



--
Jeremy Likness
MCP - WPF, MCTS – Silverlight, Microsoft Silverlight MVP
Twitter: @JeremyLikness
Blog:     http://csharperimage.jeremylikness.com/
Sterling Database for Silverlight: http://sterling.codeplex.com/
Jounce MVVM+MEF Framework: http://jounce.codeplex.com/
Feb 15, 2012 at 3:33 AM
Edited Feb 16, 2012 at 5:50 AM

OK, so this is my user story.

 

I have a main module, this loads the main menu (Silverlight Navigation) from configured modules (MEF). It also takes care of the security and roles (ASPNET Membership), the logged on user (Entity) gets exported (MEF) along with all his roles and meta data. This can be imported by all subsequent modules that are downloaded / activated (MEF).

 

All the Silverlight projects uses Telerik controls and some of them are hefty items.

 

If possible I would like to setup the following scenario, and this might be ambitious 

· Have solution run offline

· Have all the modules compile to reduced sizes; ie have references as zip files in ClientBin

· When module requires references it gets downloaded to client from the ClientBin if not yet downloaded by another module

· Ability to store data offline and when connectivity is detected sync via WCF service(s)

· Also, a pet hate is the Service Configuration file in each module; is it possible to use MEF to export a service to all modules and not have the service reference in each library?

 

Thank you in advance for the time spent to answer my questions

 

Regards

Jaco

 

-----Original Message-----
From: jeremylikness [email removed]
Sent: 05 February 2012 05:52 PM
To: [email removed]
Subject: Re: MEF + Offline [Jounce:289925]

 

From: jeremylikness

 

Unfortunately not a common enough pattern to come out of the box.

Different people want to handle it in different ways, i.e. as part of a bigger update/check vs. versioning the XAPs individually, storing in isolated vs. OOB where it is in the file system, etc. so not generic enough to implement as a core solution.

 

Jeremy

 

On Sun, Feb 5, 2012 at 6:53 AM, [email removed] wrote:

> From: jacodv

>

> Thank you, I will have a look at the link. Was rather hoping it came

> out the box…

>

> From: jeremylikness [email removed]

> Sent: 02 February 2012 02:18 PM

> To: [email removed]

> Subject: Re: MEF + Offline [Jounce:289925]

>

> From: jeremylikness

>

> Yes, it's possible and I've engineered it for customers in the past.

> The key is to provide your own catalog implementation that is smart

> enough to download dynamically online when connected, then cache the

> XAP to isolated storage and load it from the cache when offline. I

> wrote about this in my upcoming book and also have a blog post here:

>

> http://csharperimage.jeremylikness.com/2010/05/silverlight-out-of-brow

> ser-dynamic.html

>

> Read the full discussion online.

>

> To add a post to this discussion, reply to this email ([email

> removed])

>

> To start a new discussion for this project, email [email removed]

>

> You are receiving this email because you subscribed to this discussion

> on CodePlex. You can unsubscribe or change your settings on codePlex.com.

>

> Please note: Images and attachments will be removed from emails. Any

> posts to this discussion will also be available online at codeplex.com

 

 

 

--

Jeremy Likness

MCP - WPF, MCTS – Silverlight, Microsoft Silverlight MVP

Twitter: @JeremyLikness

Blog: http://csharperimage.jeremylikness.com/

Sterling Database for Silverlight: http://sterling.codeplex.com/ Jounce MVVM+MEF Framework: http://jounce.codeplex.com/

 

 

Coordinator
Feb 20, 2012 at 1:46 PM
Edited Feb 20, 2012 at 1:47 PM

Running offline simply means downloading any external modules and
saving them to isolated storage when online. Storing as XAP shouldn't
be a problem. The references thing is a bit more ambitious - you'd
have to build your own elaborate system that scanned the manifest of
the deployment, looked at the embedded assemblies, then requested the
assemblies from the server if they didn't exist. Possible, but I'm not
sure what you perceive as the value for this. There is the possibility
of over-engineering it trying to tweak down bandwidth requirements
when in fact the complexity you introduce to the code isn't worth the
trade-off of a few less bytes downloaded over the wire.

Storing data offline is a cinch - it's specifically what I designed
SterlingDB for (http://sterling.codeplex.com/)

As for the last bit, I never depend on the client config and always
use the channel factory to generate my proxies on the fly. You can
search my blog for "service" to see some example articles.

Jeremy

Feb 23, 2012 at 7:20 AM

Thank you Jeremy,

I am going to start by getting OOB working and writing data to Isolated Storage. I will look at the dynamic XAP into Isolated Storage later, I agree that the cost might overshadow the possible bandwidth gains

Regards

Jaco

From: jeremylikness [email removed]
Sent: 20 February 2012 04:47 PM
To: jacodv_32@hotmail.com
Subject: Re: MEF + Offline [Jounce:289925]

From: jeremylikness

Running offline simply means downloading any external modules and
saving them to isolated storage when online. Storing as XAP shouldn't
be a problem. The references thing is a bit more ambitious - you'd
have to build your own elaborate system that scanned the manifest of
the deployment, looked at the embedded assemblies, then requested the
assemblies from the server if they didn't exist. Possible, but I'm not
sure what you perceive as the value for this. There is the possibility
of over-engineering it trying to tweak down bandwidth requirements
when in fact the complexity you introduce to the code isn't worth the
trade-off of a few less bytes downloaded over the wire.

Storing data offline is a cinch - it's specifically what I designed
SterlingDB for (http://sterling.codeplex.com/)

As for the last bit, I never depend on the client config and always
use the channel factory to generate my proxies on the fly. You can
search my blog for "service" to see some example articles.

Jeremy

On Tue, Feb 14, 2012 at 11:33 PM, jacodv <notifications@codeplex.com> wrote:
> From: jacodv
>
> OK, so this is my user storie.
>
> I have a main module, this loads the main menu (Silverlight Navigation) from
> configured modules (MEF). It also takes care of the security and roles
> (ASPNET Membership), the logged on user (Entity) gets exported (MEF) along
> woth all his roles and meta data. This can be imported by all subsequent
> modules that are downloaded / activated (MEF).
>
> All the Silverlight projects uses Telerik controls and some of them are
> hefty items.
>
> If possible I would like to setup the following scenario, and this might be
> ambitions.
>
> · Have solution run offline
>
> · Have all the modules compile to reduced size; ie have references as zip
> files in ClientBin
>
> · When module requires references it gets downloaded to client from the
> ClientBin if not yet downloaded by another module
>
> · Ability to store data offline and when connectivity is detected sync via
> WCF service(s)
>
> · Also, a pet hate is the Service Configuration file in each module; is it
> possible to use MEF to export a service to all modules and not have the
> service reference in each library?
>
> Thank you in advance for the time spent to answer my questions
>
> Regards
>
> Jaco
>
> -----Original Message-----
> From: jeremylikness [email removed]
> Sent: 05 February 2012 05:52 PM
> To: [email removed]
> Subject: Re: MEF + Offline [Jounce:289925]
>
> From: jeremylikness
>
> Unfortunately not a common enough pattern to come out of the box.
>
> Different people want to handle it in different ways, i.e. as part of a
> bigger update/check vs. versioning the XAPs individually, storing in
> isolated vs. OOB where it is in the file system, etc. so not generic enough
> to implement as a core solution.
>
> Jeremy
>
> On Sun, Feb 5, 2012 at 6:53 AM, [email removed] wrote:
>
>> From: jacodv
>
>>
>
>> Thank you, I will have a look at the link. Was rather hoping it came
>
>> out the box…
>
>>
>
>> From: jeremylikness [email removed]
>
>> Sent: 02 February 2012 02:18 PM
>
>> To: [email removed]
>
>> Subject: Re: MEF + Offline [Jounce:289925]
>
>>
>
>> From: jeremylikness
>
>>
>
>> Yes, it's possible and I've engineered it for customers in the past.
>
>> The key is to provide your own catalog implementation that is smart
>
>> enough to download dynamically online when connected, then cache the
>
>> XAP to isolated storage and load it from the cache when offline. I
>
>> wrote about this in my upcoming book and also have a blog post here:
>
>>
>
>> http://csharperimage.jeremylikness.com/2010/05/silverlight-out-of-brow
>
>> ser-dynamic.html
>
>>
>
>> Read the full discussion online.
>
>>
>
>> To add a post to this discussion, reply to this email ([email
>
>> removed])
>
>>
>
>> To start a new discussion for this project, email [email removed]
>
>>
>
>> You are receiving this email because you subscribed to this discussion
>
>> on CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
>>
>
>> Please note: Images and attachments will be removed from emails. Any
>
>> posts to this discussion will also be available online at codeplex.com
>
> --
>
> Jeremy Likness
>
> MCP - WPF, MCTS – Silverlight, Microsoft Silverlight MVP
>
> Twitter: @JeremyLikness
>
> Blog: http://csharperimage.jeremylikness.com/
>
> Sterling Database for Silverlight: http://sterling.codeplex.com/ Jounce
> MVVM+MEF Framework: http://jounce.codeplex.com/
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com



--
Jeremy Likness
MCP - WPF, MCTS – Silverlight, Microsoft Silverlight MVP
Twitter: @JeremyLikness
Blog: http://csharperimage.jeremylikness.com/
Sterling Database for Silverlight: http://sterling.codeplex.com/
Jounce MVVM+MEF Framework: http://jounce.codeplex.com/