| Brian's profileInside F#BlogGuestbookNetwork | Help |
|
|
November 02 An RSS Dashboard in F#, part oneAs you may know, I am quite active answering questions on forums like StackOverflow and hubfs. I want F# users to get prompt and useful answers to their questions (and yes, I also wanted to be the first person to earn the F# badge on SO). But of course I cannot afford to spend all my time hitting the refresh button in my web browser, just waiting to pounce on new questions. So I need a tool to make it easy for me to keep abreast of forum topics. while still getting my other work done. I’ve created such a tool for myself, which I’ll describe in this blog series. Setting goal for the appAny reasonable web forum will be publishing an RSS feed (or Atom feed) of its posts, so it’s easy to get the data I wanted. The only thing I needed to do was figure out an effective way to present the information. The requirements I set up for myself were
Now, perhaps there is already a great tool out there which I could download that already meets all those requirements. But like many developers, I personally set a few more (selfish) requirements, namely
So without further ado, I present… Brian’s RSS DashboardHere’s a screenshot of the app, which tells half the story by itself (sometimes a picture really is worth a thousand words): The window is divided up into a grid where each cell is a different topic/forum. Within each cell are the six threads with the most recent activity, sorted in order of recency. Each thread displays its title (long titles are truncated with an ellipsis) and how long ago the thread began. The threads are hyperlinks, so if I click one it opens the corresponding thread in my web browser. The app polls the various RSS feeds periodically for new activity. When new activity is detected, a few things happen:
The audio is great for when I’m at my desk working on something else. If I’m in “flow” with whatever I’m working on, I just ignore the audio (my brain seems to tune it out automatically), but otherwise if I can take a break or afford a distraction, I’ll go have a look. This helps me provide quick replies to questions, which makes for happy customers and good StackOverflow reputation points. I only have the “audio” option turned on for a select few feeds (to minimize distraction). The yellow highlight is great for when I return after being away from my desk for a while. When I log on in the morning, first thing I’ll do is glance at the dashboard to see what’s new (yellow). I click on any threads I’m interested in reading (and perhaps responding to) to go visit them in my browser. And then when I’m caught up, I click the big button at the top labeled “Mark all as seen”, which just erases all the yellow highlights. That’s pretty much it! It’s a simple app, nothing fancy, but I’m very pleased with it, because it makes it super-easy for me to keep track of a number of different forums on different web sites. Technology overviewIn subsequent blog entries I’ll walk through all the F# code. Today I’ll just give an overview of the breakdown of the app and the various technologies/APIs that underlie each portion. The app conceptually has four main pieces:
And of course for any UI app, even though there is various background work going on (speech/audio, polling feeds, …) we want to ensure the UI stays up-to-date and responsive. Of course my code never mentions “Thread” or “BackgroundWorker”; instead it’s F# async, MailboxProcessor, and .Net SynchronizationContext FTW! I was very pleased how easy that part was. For next time…If you’re not yet familiar with IObservable, might I suggest that you watch a video or three? It’s cool stuff; a simple set of interfaces for a powerful reactive eventing model. Hopefully you’re aware of RSS feeds (and you’re subscribed to my blog’s feed :), right?), but if not, at least read the paragraph summary on wikipedia. Next time we’ll jump into the code for observable feeds. Fun stuff ahead! Comments (1)
Brian McNamara
has turned off comments on this page.
TrackbacksWeblogs that reference this entry
|
|
|