Full introduction to Blog and RSS

Original: Aaron Skonnard

Translation: NorthTibet

Original source: MSDN Magazine Apr. 2004 (The XML Files)

What is Blog?

“Blog” is the abbreviation of Web Log (Translator’s Note: also blog (Chinese mainland is also called blog)). It is an intermediary for the author and reader to interact in a journal style. In the software community, it is becoming more and more popular for people to share ideas and ideas in the form of blogs. For example: http://blogs.msdn.com is a blogging on MSDN.

What is the easiest way to create a blog?

To create your own blog, the easiest way is to register a new user on a site like blogger.com, which provides a web interface for creating custom blogs, and you can use all your blogs immediately. Blog created. There are many sites like blogger.com, and they all provide support for the features of blogs. If you want more control over the blog infrastructure or want to build a blog service system on your own server. You can choose one of the most popular commercial products for blog applications: Radio Userland, Manila, and Movable Type. There are also some easy-to-use free .NET blogging applications you can use, the most popular ones are: .TEXT and dasBlog. Just download them, then follow the installation instructions to install and set up, you can build a working blog service system in minutes.
   Functionally speaking, these two .NET-based blog application systems are comparable. The main difference is that .TEXT requires a database, SQL Server or MSDE, while dasBlog stores all information in an XML file (it is based on the original BlogX framework created by some Microsoft developers). Another difference is that .TEXT is configured in a single installation Support multiple blogs (such as the current http://blogs.msdn.com is the case), and dasBlog supports multiple The blog must be installed multiple times. But dasBlog has a very prominent feature, that is, “Mail to Weblog”, which allows you to post new information via email.
  The new MSDN blog service site and PDC Bloggers are both good places to start looking for software development topics. Just browse one of these sites to read its pre-aggregated content. The scheduled summary will open many personal blogs to you, and gradually you will naturally find some content that you prefer to read. In this way, you can directly book your favorite personal blog summaries.
   For blogs dedicated to XML and Web services, please check the list on MSDN Web Services Developer Center, I personally spend a lot Time to go to these blog sites.

What is a feed (hereafter referred to as a feed) and how to book it?

The blog provides a feed of its content in the form of an RSS document, which can be obtained through a well-known URL. An RSS document is an XML file that contains a large number of discrete news items, such as entry items in a certain blog. (For an example of RSS feed, please refer to Figure 1 font>). Since RSS is an XML format file, it can easily be used by other programs.
  RSS aggregator is a program that reads RSS documents and displays news items. Most aggregators only need to enter the RSS URL, making it possible to order feeds.
  RSS makes reading blogs easy. Most developers who regularly read blogs use some type of aggregator to help them filter the feed content effectively. Aggregators make reading blogs feel like reading emails, because they highlight news items and buffer them for offline reading (see Figure 2).
   There are also some online RSS aggregators that bundle RSS feeds to a single website. The advantage is that it is easy to set up and you can access your feed content from any computer. Of course, its shortcoming is also obvious, that is, it must always be connected when reading.
  RSS is the basis for blogs to become a powerful new form of information exchange. Before the advent of blogs, most developers usually took a lot of time to filter out the annoying and irrelevant information in order to find what they needed.
   Blogs allow readers to choose the synopsis they want to read, and give the control to the readers, thereby effectively constructing their own personalized content stream.
   Other types of sites can also use the advantages of RSS to aggregate content. For example, most mainstream news sites including Wired, CNet, Yahoo, and NPR News provide RSS feeds. Visit Blogdigger and Syndic8, you can find some support RSS site.
   Microsoft’s MSDN provides RSS feeds (RSS feeds) to aggregate newly added technical content to the site. MSDN’s Just Published feed is a main way to keep new MSDN articles and downloads. Even MSDN Magazine has its own RSS feed! You can schedule: http://msdn.microsoft.com/msdnmag/rss/recent.xml to get monthly updates so that you can check the current issue What’s the content? There are currently many kinds of RSS aggregators to choose from, in http://blogs.law.harvard.edu/tech/directory/5/aggregators A fairly complete list can be found on. Some of them are online aggregators, while others are desktop applications. Some are free, others require payment to use.

Which RSS version is the most common?

The answer to this question depends on who you ask. There are many versions of RSS, 0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0. To figure out the differences between these versions is one of the great challenges. Understanding them requires understanding some historical background about them. Netscape created the initial version 0.90 of RSS, which was originally named “RDF Site Summary” or “Rich Site Summary” (the former is the official name in the specification). Netscape created RSS 0.90 for its Web portal. At this time, others saw the potential of RSS. Userland Software was one of the first to start using RSS for its weblog commercial products.
   Version 0.90 is largely based on W3C’s Resource Description Framework (RDF). Many people think that RDF is too complicated, so they all suggest a free simplified version 0.91. This task happened to be given to Userland Software. Userland Software continues to develop a simplified version of RSS, and subsequent versions include: 0.92, 0.93 and 0.94. In order to emphasize the simplification work they have done, they set the full name of RSS as “Really Simple Syndication”.
   While Userland Software continues to focus on simplifying its work, another group of developers is reviving the original RDF version (0.90) because RSS claims to be more flexible. They finally released a version of RSS 1.0, whose official name is “RDF Site Summary.” Due to the use of RDF, this version is completely different from the version controlled by Userland Software. Of course, Userland Software is reluctant to see the fact that RSS 1.0 seems to replace its 0.94 version, so a new version was released and the version number suddenly jumped to 2.0.
   This is the situation today. There are two main competing versions: one is based on RDF 1.0 and the other is not (2.0), but they both share the same name. This is a terrible mess, because the version number leads people to mistakenly think that 2.0 is an improved version of 1.0, when in fact they are two specifications with completely different goals. Another group of developers has already worked hard to resolve this confusion, breaking with the arbitrariness of RSS names by defining a new syndication specification. This solution is called the Atom (atomic) project. This article will discuss in detail later.
   Which version to use is actually irrelevant. Most RSS aggregation mechanisms support all RSS versions (some even support Atom). The final decision depends on whether you want to use RDF, it can be described as turnip cabbage, each has their own love, it depends entirely on what someone believes in Semantic Web It depends on the concept.

What does RSS 1.0 and RSS 2.0 look like?

RSS 1.0 and 2.0 contain the same core information, but their structure is different. I provided an RSS 1.0 document (see Figure 1) and an equivalent RSS 2.0 (see < u>Figure 2) is used for comparison.
You will notice the difference in the root element starting on the right side of the top row. The root element of RSS 1.0 is rdf:RDF, and the root element of RSS 2.0 is rss. rss also contains a mandatory version attribute to indicate the exact format of the RSS used (possible values ​​include: 0.91, 0.94, etc.). Another major difference is that RSS 1.0 documents are namespace-qualified, while RSS 2.0 documents do not. Regardless, the information contained in the two documents is essentially the same.
   Both versions contain the channel element, and the channel element contains three necessary elements: title, description and link. The code is as follows:



<!-- The title of the channel -->




   In addition to these necessary elements, RSS 1.0 also defines three additional elements: image, items, and textinput. Among them, image and textinput are optional. On the other hand, RSS 2.0 provides 16 additional elements, including image, items, and textinput, as well as language, copyright, managingEditor, pubDate, and category. RSS 1.0 allows this type of metadata to be created through extensible elements defined in a separate XML namespace.
   The main difference in structure between these two formats depends on the representation of the item, image and textinput nodes. In RSS 1.0, the channel element contains references to item, image, and textinput nodes, which exist outside the channel node itself. This establishes an RDF association between the channel and the referenced node. As shown in Figure 1, the channel element is associated with an image element and two item elements. In RSS 2.0, the item element is only placed continuously in the channel element (as shown in Figure 2). The item element contains the actual news item information. The structure of item is the same in both versions. The item element usually contains title, link, and description elements, as shown in the following code:



<!-- Item title -->




   In RSS 1.0, title and link are required, and description is optional. In RSS 2.0, either title or description must be provided; the others are optional. These are just the item elements defined in RSS 1.0. RSS 2.0 provides several other optional elements, including author, category, comments, enclosure, guid, pubDate, and source. RSS 1.0 obtains such metadata by defining an extensible element called RSS module in a separate XML namespace. For example, in Figure 1, the date of the item is represented by the element of the Dublic Core module.

有关不同格式的完整信息请参考RSS 1.02.0 Specification.
SRC = So, what is Atom?

As I mentioned earlier, Atom is the name of a project, mainly to develop a new blog summary format to solve the current problems of RSS (confusing version numbers, not a true open standard, Inconsistent expression methods, poor definitions, etc.). Atom hopes to provide a clear version to meet everyone’s needs. Its design does not depend on the supplier at all. Anyone can expand it freely and fully explain it in detail.
   Many blog engines today already support the current summary format. Figure 3 is an example of Atom 0.3 feed, which is the same as the aforementioned Figure 1 and Figure 2 RSS feed is equivalent. Note that the Atom feed is namespace-qualified, but it does not use RDF. This makes Atom and RSS 1.0 and RSS 2.0 have similarities in some places. Whether Atom can be accepted in the future, people will wait and see.
   In addition to defining a new summary format, Atom also hopes to define a standard archive file format and a standard blog editing API (Atom API). For detailed Atom specifications and other Atom resources, please visit The Atom Project.
SRC = What is blogroll?

blogroll is a collection of blog feeds. Most bloggers provide blogroll on their personal blogs. This allows readers to connect to the blogs of other people with similar interests and writing styles. Blogroll facilitates communication on the Internet. By using Outline Processor Markup Language (OPML), people can exchange blogrolls with XML format files. Figure 4 is an example of blogroll.
  Most blog engines manage blogroll by themselves, and generate the corresponding XML format every time a reader requests blogroll. Likewise, most aggregators can import blogroll and automatically subscribe to the summaries it contains. For more information about OPML, see http://opml.scripting.com.
SRC = Can you explain what referrers, trackbacks and pingbacks are?

Most blogging software allows readers to add blog comments. But a more common approach is to allow readers to add an entry link back to the original post in their own blog. Bloggers are happy to track when the connection occurs so that new readers can understand the entire conversation.
   The so-called referrer is an external site. Users can click a hyperlink on the site to reach your website. Many blog engines automatically keep track of readers when they navigate to an entry in your blog. Most engines will display a list of referrers at the bottom of the blog entry so that readers can navigate back to the referrer’s site and know what they have to say about the entry. This is based on an assumption that if they link to it, it might What will be written here. The problem with referrer is that this assumption must be made-there is not enough information to say whether the referenced page actually contains relevant information. In fact, spammers have used this vulnerability to redirect readers for marketing attempts.
  Trackback and pingback have the same specification, which is used to compensate for the above-mentioned problems. Using trackback and pingback, other bloggers can automatically send a ping to your blog to make it clear that they have written an entry that references a particular post.
  This type of anti-chain allows your blog to display a list of all comments in a more obvious way. Most blogging software today supports all these technologies. See TrackBack Technical Specification and Pingback 1.0.
SRC = How do I generate an RSS feed for my site?

Figure 5 illustrates how to use the asp:Repeater control to generate RSS 2.0 feeds in .aspx pages. This page assumes that you have set the DataSource property of the control to the corresponding database result set in the back-end code file.
SRC = I want to aggregate several RSS feeds and display the information on a personal website. Can you explain how to achieve this?
SRC = Because RSS feeds are XML files, as an exercise, you can use your best XML API, for example, System.Xml in Microsoft .NET Framework, Figure 6< /u> contains the ASP.NET Web user control code, which is a piece of code I wrote to aggregate the RSS feeds listed in the blogroll file (.opml). This code assumes that the opml element contains a numberToDisplay attribute to indicate how many items you intend to display for each feed.
SRC =
Figure 7 ASP.NET Web 用户控件

你可以将控件拖到任何.aspx 页面中,它将显示blogroll 文件中列出的不同提要的项, Figure 7 shows the effect of using this control on the Utah .NET User Group website.
SRC = Are there any Web Services APIs for interacting with blogs?

Many blog engines provide their own Web service interfaces to interact with blogs through programming, but there is no standardized thing yet.
.Text and dasBlog both provide certain .asmx endpoints, which can be edited through SOAP, but their interfaces are different. Blogger.com provides an interactive API based on XML-RPC (Blogger API). Userland Software has enhanced the function of the Blogger API and called it MetaWeblog API. These may be recognized weblog APIs today, but they are still not supported by all weblog engines. There is also a separate API for adding comments called Comment API. Similarly, it is not universally supported.
  The Atom team is working hard to solve these problems. The Atom API defines a standard blog API for publishing and editing blog content. For more information, please refer to the The Atom Project website.

Leave a Comment

Your email address will not be published.