Two different approaches to setting up RSS feeds in ASP.Net MVC

I was actually looking for just one way of implementing RSS with ASP.Net MVC Framework as part of a new feature for GigJunkie (look for the announcement in the GigJunkie blog in a few weeks)…I actually was about to implement this

Brad Abrams : RSS Feed with the new ASP.NET MVC Framework.

when I found this:

ASP.NET MVC RSS Feed Action Result
Which method is better is a matter of opinion. In terms of generating a well formed RSS or ATOM document without needing to know too much details about the standard itself, the 2nd link is better since it uses already established Windows Communication Foundation (WCF) objects such as RSS20FeedFormatter, Atom10FeedFormatter, SyndicationFeed and SyndicationItem to wrap your content inside the appropriate tags within the XML document.

However, there are some limitations to this approach as you are trusting these pre-defined objects to adhere to the defined standard and place values in the correct or expected appropriate position within the XML. This can result in some issues, as for example when I realised that unless declared in the constructor as a parameter, I found no property of the SyndicationFeed object that would directly manipulate the value of the rendered <description> tag’s contents of an RSS 2.0 feed. I had assumed editing the SyndicationFeed’s Content property would apply these changes, however they instead created an <a10:content> parameter which contained my content instead. The reason I needed the <description> values edited are because these are what are displayed in Live feeds inside Firefox and Outlook. <a10:content> although inside the feed, is not rendered in any particular way. A slight variation on how I built the content was required, but still, it was a little annoying to have to discover it was an issue in the first place.

So that means there are still merits of using the 1st link’s method, since you as the developer, are in essence, in full control of ensuring that the View renders the proper parameters and that all ViewData is in the appropriate locations within it. This has its benefits, in cases for example where the standard may change or be upgraded before the Framework objects themselves have had a chance to be updated as well. The counter to this is, of course, that you are also fully responsible for a shoddy implementation of the XML specification if you are not thorough with the RSS and ATOM specification guidelines.

DateTime.ToString Method

DateTime.ToString Method.

It’s always good to remember what a useful override of the ToString() method on any object can do. Perfect example is C# DateTime whose ToString() method can take parameters that determine the formatting of the returned value.

Examples for DateTime’s .ToString(“format“) method include the following (where format is replaced by the coding value assigned):

d :08/17/2000
D :Thursday, August 17, 2000
f :Thursday, August 17, 2000 16:32
F :Thursday, August 17, 2000 16:32:32
g :08/17/2000 16:32
G :08/17/2000 16:32:32
m :August 17
r :Thu, 17 Aug 2000 23:32:32 GMT
s :2000-08-17T16:32:32
t :16:32
T :16:32:32
u :2000-08-17 23:32:32Z
U :Thursday, August 17, 2000 23:32:32
y :August, 2000
dddd, MMMM dd yyyy :Thursday, August 17 2000
ddd, MMM d "'"yy :Thu, Aug 17 '00
dddd, MMMM dd :Thursday, August 17
M/yy :8/00
dd-MM-yy :17-08-00

The Lounge Advertising Network

The Lounge Advertising Network.

When looking to promote your website, check these guys out…Scott Hanselman does.

Mozy Online Backup, Backup Software, and Remote Office Backup Solutions – Mozy.com – Home

Mozy Online Backup, Backup Software, and Remote Office Backup Solutions – Mozy.com – Home.

I need to acquire something like this pretty soon….Live Mesh Beta at home and Carbonite at work seem to be working for now though. Wouldn’t like to have the crash happen first though before I realise what it was I didnt like about these two that Mozy offered for that small $5/mth fee…

Eric Polerecky » ASP.NET MVC View Content Page vs. View Page

Eric Polerecky » ASP.NET MVC View Content Page vs. View Page.

Would you believe the only difference is that a View Content Page uses master pages, whereas A View Page does not?

Somehow anti-clamatic for me 😦

How to define multiple CSS attributes in JQuery? – Stack Overflow

How to define multiple CSS attribes in JQuery

Experimenting with JQuery and CSS layouts today…wondering if defining CSS with JQuery will also take care of different browser quirks?

YouTube – nigahiga’s Channel

YouTube – nigahiga’s Channel.

Another example of the power of technology for making normal folks famous….I doubt I would be able to laugh at these videos watching NBC… 🙂