Solved

C# RSS Screensaver

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

912 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

23 Experts available now in Live!

Get 1:1 Help Now