开发者

dynamic loading in silverlight

Ill explain a little bit of my project here. I'm trying to make a website in silverlight, my goal is to store all the content in external files, and load them after my silverlight app has loaded. for instance, load the home page, then, while the user is browsing the home page, load the other pages in the backround, and then when a link is clicked, the main content will fade out, and the new page will then fade in its place. My question to you guys is:

  1. whats the best way to create the external files? how should they be created开发者_Go百科/saved?
  2. how can i load them in the backround while the user is browsing, and then display them by fading when a link is clicked?
  3. how can i add features, for my silverlight app to edit, and re-save the files,for instance, adding a picture to a picture gallery and such

any help would be greatly appriciated. the code-behind of my app is in C#, but im new with the whole silverlight idea, so pretty much any advice at this point would be very welcomed!!


My suggestion for this scenario is using a MEF (Managed Extensibility Framework).

It's provide Dynamically Loading a .XAP, Downloading Based on User Interaction, and other's features out of the box. So, I think, use the MEF it's easyest way approach load-content-on-demand scenario.


You don't mention what sort of content you are dealing with. If it's markup (markdown) and images it should be pretty simple

Log every actual content request, and use that data to rank the order you pre-load the cache in. This way the system is self tuning. If there are complex paths to traverse, consider using a neural network process to determine what to pre-load

Silverlight uses the standard browser HTTP request methods and hence cache, so all you have to do is request a resource and it will be cached

You seem to be describing a wiki (editing pages in Silverlight etc). Consider using an existing wiki engine e.g. screwturn.eu and customising the display and editing interface to work via Silverlight. This will save an enormous amount in versioning, resource management, security etc


Similar to the Managed Extensibility Framework which FFire mentioned, you may also want to look into Prism V2. Heres some resources to get you started and find out if its for you.

WPF/Silverlight - Prism - Resources for beginners

from that list heres a good list of example videos about silverlight, modularity, regions etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜