Solved

C# RSS Screensaver

Posted on 2012-04-12
2
379 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
  • 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now