2

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/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!!

caesay
  • 16,932
  • 15
  • 95
  • 160
  • 1
    Before I answer I'm curious as to the algorithm you might be thinking of using to predict which of the other pages that might be navigated to that should be downloaded in the background or are you intending to download them all whether they are need or not? Also what do you expect to gain by this behaviour the Xaml itself generally not that large, are you wanting the destination page loaded and rendered including all the images before fading it in? – AnthonyWJones Feb 06 '10 at 20:46
  • 1
    The idea i had, (allthough im very welcome to any better ideas), were to, load the main pages, and if they were clicked, all well and good, just fade out/in with the new page, But, if for instance a non-standard page was clicked, it could show a loading symbol in the center of the page, while it loads the page selected. Also, I do want the destination page loaded and ready, so that when it fades in, it will be completely ready for viewing. – caesay Feb 08 '10 at 00:42

3 Answers3

3

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.

A1exandr Belan
  • 4,442
  • 3
  • 26
  • 48
  • well its not really a litteral answer to my question, but the bounty is expiring soon and im going to accept you just based on the fact you gave me something to point me in the right direction – caesay Feb 17 '10 at 21:56
0

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

TFD
  • 23,890
  • 2
  • 34
  • 51
  • Thankyou for your answer, but im looking for a little more detail and specifics, if there are no better answers, before the bounty ends ill accept your answer. – caesay Feb 11 '10 at 03:39
  • You would first need to be more specific on content, application tasks etc – TFD Feb 11 '10 at 04:06
  • well my idea would be to have that all the content would be in a text files, and then images would be in a folder, and say, in the text file if [insertimage"hello.jpg"] showed up for instance, it would render the text with the image, alternatively to that, there would also be some html/css pages beside that, that could be determined by the file extention and rendered that way – caesay Feb 12 '10 at 23:29
  • No, its not, its simply a website, say i want employees to be able to add content easily without complete access to the files – caesay Feb 14 '10 at 17:42
  • I meant sounds like a wiki based solution. Your site may not be a wiki in the tradition sense, but a wiki engine would be a simple starting point for the content management – TFD Feb 14 '10 at 21:39
0

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.

Community
  • 1
  • 1
bic
  • 2,201
  • 26
  • 27