Solved

C# RSS Screensaver

Posted on 2012-04-12
2
383 Views
Last Modified: 2012-04-23
Hi Experts,

Not sure what would be the best option here so if I explain the situation perhaps you could all offer how you would do this:

I'm building an RSS driven screensaver.  This will ideally pull in the feed content from the published source and then use that to display content.

The consideration I have is that if for any reason the rss feed is not available it still needs to work.  This is most likely to be because a laptop is off the network.

This is what I was thinking:
Build the application and bundle it with images (which are linked to using the RSS <link> tag) and an rss file with the content and a link/filename for each associated image file.

1) On load, download the rss file and copy it to the resources folder.
2) Parse the rss file, find the links to the images and copy them to the resources folder.
3) Run the screensaver using content/images from the now locally stored rss and image files.

If for any reason the rss download fails, use the defaults in the resources folderwhich will be bundled with the exe.

So, if anyone has any thoughts, ideas, suggestions or would like to say I'm plain wrong and have a much better way of doing things, please go for it.

I'm trying to keep this all in one exe as it's a screensaver.

Thanks All!
0
Comment
Question by:ImaCircularSaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 22

Accepted Solution

by:
ambience earned 500 total points
ID: 37845082
Well ... for a sample iPhone/Android RSS reader application I downloaded stuff to a cache (temp folder). If for some reason the update failed the application would display last cached contents (better than nothing) and I could have improved that with some visual indication showing the staleness of contents like a red border with the color brightness a function of number of days the contents stale. I also put an option in the setting to enable the Caching feature and the user could turn it off (again better to control the staleness age like number of days to keep stale data).

So in your case you can show stale contents for up to some configured time and after that if newer contents were still not available you can resort to showing the stock feed.
0
 
LVL 22

Expert Comment

by:ambience
ID: 37845113
Also, its profitable to implement the HTTP cache control mechanisms (not sure whether the HTTP client you are using already supports that). The HTTP cache control uses two properties max-age, max-stale to control client side caching of contents. With RSS, resources are hardly going to be updated very often and images once downloaded will mostly remain the same. Implementing the eTag (Entity Tags) and If-Modified-Since headers along with HTTP caching semantics would be cool. You might as well save that as a reusable component.

If I were to do it, then I would never add temp stuff to resources folder but rather put it in Temp so that the user can delete to conserve space. I hate apps that steal HD space by downloading/caching unwanted stuff to their own folders or even Commons folder. Putting in temp also clearly shows the intentions that this data is temp so feel free to delete without causing irreversible damage to application.

Just my two cents ..
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question