<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bin-Blog &#187; format</title>
	<atom:link href="http://www.bin-co.com/blog/tag/format/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bin-co.com/blog</link>
	<description>Learn about the latest in Web Development - as soon as I do.</description>
	<lastBuildDate>Tue, 13 Oct 2009 18:55:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Rules for Creating an RSS Feed</title>
		<link>http://www.bin-co.com/blog/2008/07/rules-for-creating-an-rss-feed/</link>
		<comments>http://www.bin-co.com/blog/2008/07/rules-for-creating-an-rss-feed/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 17:51:29 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[rule]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=117</guid>
		<description><![CDATA[Some rules for creating an RSS feed.]]></description>
			<content:encoded><![CDATA[<p><a href='http://feeds.feedburner.com/bin-blog'><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/07/rss_feed.png" alt="" title="RSS Feed" width="158" height="158" class="alignnone size-full wp-image-118 intro" align="right" /></a></p>
<p class="intro">Most of us don&#8217;t have to worry about creating an RSS feed for our sites &#8211; the <abbr title="Content Management System">CMS</abbr> tool will do that automatically. But there are times when you are creating a custom application &#8211; when you have to create an RSS feed yourself. Creating it is easy &#8211; they don&#8217;t call it <strong>Really Simple</strong> Syndication for nothing. But there are a few rules(or rather, guidelines) that are ignored by most &#8211; make sure you follow them.</p>
<p>I am by no means an expert on this format &#8211; but I have created <a href="http://www.openjs.com/rss.php?no_redirect=1">RSS feeds</a> and have <a href="http://www.bin-co.com/blog/2008/02/alertle-launched/">worked</a> on  <a href="http://www.alertle.com/">applications</a> to <a href="http://www.bin-co.com/php/scripts/xml2array/">parse</a> it. So I have seen my share of bad implementations.</p>
<h2>Use RSS rather than Atom</h2>
<p>I prefer using <a href="http://en.wikipedia.org/wiki/RSS_(file_format)">RSS</a> as opposed to the <a href="http://en.wikipedia.org/wiki/Atom_(standard)">Atom format</a>. But Atom is now supported on almost all feed readers &#8211; so this preference may change. But for now, I like RSS better than Atom.</p>
<h2>Last-Modified</h2>
<p>Make sure your feed has the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29">last modified header</a>. This will prevent unnecessary downloading of the feed if there are no new articles. It <a href="http://feedparser.org/docs/http-etag.html">saves both the site&#8217;s and the user&#8217;s bandwidth</a>.</p>
<p>This is extremely easy in PHP&#8230;</p>
<pre><code class="php">$last_edited = '2008-07-17 01:02:03'; // This should be the time of the latest post.
header("Last-Modified: " . date('r',strtotime($last_edited)));</code></pre>
<h2>10 Posts</h2>
<p>Make sure you provide a limited number of posts in the feed &#8211; the perfect number, in my opinion, is 10. It can increase or decrease a bit &#8211; its no big deal. If your posting frequency is high, the number should increase. And if the frequency is low, the number of items in the feed can go down.</p>
<p>But make sure that you are not including all the posts from the beginning of time until now. This is a big waste of bandwidth. Unfortunately, many have adopted this method. For example, take this feed &#8211; <a href="http://www.catandgirl.com/rss.php">Cat and Girl Comic feed</a>.</p>
<p>The other extream is just as bad &#8211; providing just the latest item in the feed. If the author writes two posts in quick succession, the viewers may not get an article. An example for this in the <a href="http://www.viruscomix.com/rss.xml">subnormality comic</a>.</p>
<h2>Validate it</h2>
<p>XML is not as forgiving as HTML &#8211; so make sure you <a href="http://www.feedvalidator.org/">validate your feed</a> before releasing it upon the world.</p>
<h2>Use FeedBurner</h2>
<p>When it comes to deployment, using <a href="http://www.feedburner.com/fb/a/home">FeedBurner</a> is a better option that using your own server. In addition to its statistics, it will also act as a <abbr title="Content Distribution Network">CDN</abbr> lowering the load on your server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/07/rules-for-creating-an-rss-feed/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Document Formats</title>
		<link>http://www.bin-co.com/blog/2008/04/document-formats/</link>
		<comments>http://www.bin-co.com/blog/2008/04/document-formats/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 18:20:39 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[document]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/2008/04/document-formats/</guid>
		<description><![CDATA[In FLOSS circles, March 26 is celebrated as the Document Freedom Day. Document Freedom Day (DFD) is a global day for document liberation. It will be a day of grassroots effort to educate the public about the importance of Free Document Formats and Open Standards in general. This is when I realized that people actually [...]]]></description>
			<content:encoded><![CDATA[<p><img class="intro" align="right"  src='http://www.bin-co.com/blog/wp-content/uploads/2008/04/documents.jpg' alt='Documents' /></p>
<p class="intro">In FLOSS circles, March 26 is celebrated as the <a href="http://www.documentfreedom.org/">Document Freedom Day</a>. </p>
<blockquote><p>Document Freedom Day (DFD) is a global day for document liberation. It will be a day of grassroots effort to educate the public about the importance of Free Document Formats and Open Standards in general.</p></blockquote>
<p>This is when I realized that people actually use the office packages daily. I almost never use it. According to me there are three options to store text data.</p>
<ul>
<li>Plain Text</li>
<li>HTML</li>
<li>Database</li>
</ul>
<h2>Plain Text</h2>
<p>The <strong class="highlight">simplest format</strong> there is. If there is something I should remember, I just put it in a text file and save it to the desktop. I used to use it a lot earlier &#8211; but I don&#8217;t use it much nowadays due to searchability issues. There are quite a few <a href="http://ifacethoughts.net/2007/09/27/we-need-more-txt/">advantages in using the text format</a></p>
<h2>HTML</h2>
<p>If I <strong class="highlight">need any formatting in the text, I create the document in HTML</strong>. It is easier for me to create the formatting using HTML code that using WYSIWYG Word Processors(like MS Word). I write all my blog posts in HTML &#8211; perhaps the only occasion where I need formatting.</p>
<h3>Database</h3>
<p>My favorite method to store text data is in a database. I am a web developer &#8211; so I always have a Web Server and Database server running on my system &#8211; so this system is perfect for me. </p>
<h3>Interface</h3>
<p>Remove that scared look on your face &#8211; I don&#8217;t use <a href="http://binnyva.blogspot.com/2006/08/managing-databases-with-mysql-clients.html">phpMyAdmin</a> or any Database Administration tools as the interface to save/view the data. I use my own custom scripts or WordPress.</p>
<p>The best example of this is <a href="http://txt.binnyva.com/">txt</a>. Txt is my code snippets/commands repository. You can view the full story in the <a href="http://binnyva.blogspot.com/2007/03/saving-code-snippets-part-2.html">Saving Code Snippets</a> post.</p>
<p>That&#8217;s an online example &#8211; I also have a personal wordpress blog running in my local server. I use it to record events, purchases, store receipts etc.</p>
<h3>Advantages</h3>
<dl>
<dt>Tagging</dt>
<dd><strong class="highlight">Tagging is heaven-sent to make information more findable</strong> &#8211; any del.icio.us user should know that. I used to install Ultimate Tag Warrior to get this feature &#8211; but WordPress now supports tags natively.</dd>
<dt>Searching</dt>
<dd><strong class="highlight">Searching for data within a database is much more easier, faster and provides more relevent results</strong> than searching for the data in a collection of file. Even if you are using a file indexing software like Google Desktop Search or Beagle/<a href="http://lindesk.com/2007/04/desktop-searching-in-linux-with-recoll/">Recoll</a>(for linux users), I find database searching more easier. Another advantage of using database to search is that you can <strong class="highlight">create complex queries if you know SQL</strong>.</dd>
</dl>
<h3>Disadvantages</h3>
<dl>
<dt>Not for everyone</dt>
<dd>Let&#8217;s face it &#8211; installing and maintaining a web/database server is a tad in the geek zone. An average Joe will find it just a little bit out of their league.</dd>
<dt>Overhead</dt>
<dd>Running a web server and a database server is a bit demanding on the RAM.</dd>
<dt>Backing up a little more complicated &#8211; but easier</dt>
<dd><a href="http://txt.binnyva.com/2007/03/mysql-database-backuprestore/">Backing up the data in a Database</a> is not as straight forward as backing up files &#8211; but its actually easier if you know how.</dd>
</dl>
<h2>Online</h2>
<p>One extra method to store the data &#8211; online.  This <strong class="highlight">data is stored in a database &#8211; but you don&#8217;t have the disadvantages associated with using a database</strong>. More and more people are turning to this method now. I did not include it in the initial list because its not a data format &#8211; its more of a data storing method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/04/document-formats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

