A full introduction to blogs and RSS

Source: Internet
Author: User
Tags date comments contains include reference versions web services movable type

  What is a Blog?

"Blog" is the short name of Web log (translator Note: That is, blog (also known as the Chinese mainland blogs)). It is an intermediary that the author interacts with the reader in the journal style. In the software community, it is becoming more and more popular to share ideas and ideas in the form of blog. For example: Http://blogs.msdn.com is a blogging on MSDN.

  What's the easiest way to create a blog?

The easiest way to build your own blog is to register a new user with a site like blogger.com, which provides a WEB interface to create custom blogs, and you can immediately use the blog you created. There are a number of sites like blogger.com that provide support for the blog feature. If you want more control over the infrastructure of the blog or want to set up a blog service on your own server. You can choose one of the following commercially available business products for the most popular: Radio userland, Manila, and movable Type. There are also some easy to use free. NET blog applications available, the most popular are:. TEXT and Dasblog. Simply download them and follow the installation instructions for installation and setup, and a running blog service system can be established in minutes.

Functionally, the two Web log applications based on. NET are comparable. The main difference is that. TEXT requires a database, SQL Server, or MSDE, and Dasblog stores all the information in an XML file (it is based on a BLOGX framework created by some Microsoft developers), and another difference. TEXT can support multiple blogs in a single installation configuration (as is the case now for http://blogs.msdn.com), and dasblog to support multiple blogs, it must be installed multiple times. But Dasblog has a very prominent feature, which is "mail to Weblog", which allows you to post new information via email.

The New MSDN Blog service point and PDC Bloggers are a great place to start looking for topics on software development. Just browse through one of these sites to read its aggregated predefined content. Its scheduled summaries will open up a lot of personal blogs to you, and gradually you will naturally find something you prefer to read. In this way, you can directly book your favorite personal blog summary.

For blogs dedicated to XML and Web services, check out the list on MSDN Web service Developer Center, and I personally spend a lot of time on these blog sites.

  What is a feed (hereafter called a feed) and how do you book it?

The blog provides a feed of its content in the form of an RSS document that can be obtained through well-known URLs. An RSS document is an XML file that contains a large number of discrete news items, such as entries in a blog (see Figure 1 for an example of an RSS feed). Because RSS is an XML format file, it is easily used by other programs.

An RSS aggregator is a program that reads an RSS document and displays news items. Most aggregators simply type in the RSS URL, making it possible to schedule a feed.

RSS makes it easy to read blogs. Most developers who often read blogs use some type of aggregator to help them effectively filter feed content. aggregators make reading blogs feel like reading emails because they highlight news items and buffer news items for offline reading (see Figure 2).

There are also online RSS aggregators that bundle RSS feeds to a separate Web site. The advantage is that it is easy to set up and can access your feed content from any computer. Of course, the disadvantage is also obvious, that is, you must always stay connected while reading.

RSS is the root of a powerful new form of information communication. Prior to the advent of the blog, most developers typically spend a lot of time filtering out unwanted irrelevant information in order to find what they need.

By allowing readers to choose the feed they want to read, the blog will hand over control to the reader, thus effectively building its own personalized content stream.

Other types of sites can also use the benefits 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, and you can find some RSS-enabled sites.

Microsoft MSDN provides RSS feeds (RSS feeds) to aggregate new technical content added to the site. The Just published feed for MSDN is a major way to keep MSDN new articles and downloads. Even MSDN Magazine (MSDN Magazine) has its own RSS Feed! Can book: Http://msdn.microsoft.com/msdnmag/rss/recent.xml get monthly updates to see what's in this issue? There are a number of RSS aggregators available to choose from, and a fairly complete list can be found on the http://blogs.law.harvard.edu/tech/directory/5/aggregators. Some of these are online aggregators, while others are desktop applications. Some are free and others need to be paid to use.

  Which RSS version is the most versatile?

The answer to this question depends on who you're asking, the RSS version has several, 0.90, 0.91, 0.92, 0.93, 0.94, 1.0, and 2.0. Figuring out the difference between these versions is one of the big challenges. Understanding them requires some understanding of their historical background. Netscape created the original version of RSS 0.90, initially named "RDF site Summary" or "Rich Site Summary" (the specification says the former is the official name). Netscape created RSS 0.90 for its Web portal, and at this point others saw the potential for RSS usage. Userland Software is one of the first people to start using RSS for its blog commercial products.

Version 0.90 is largely based on the Resource Description Framework (RDF) of the World Wide Language consortium. Many people think that RDF is too complex, so it suggests a free simplified version of 0.91. This task happens to be given to Userland Software. Userland Software continues to develop a simplified version of RSS, followed by a version that includes 0.92, 0.93, and 0.94. To emphasize the simplicity of their work, they set the full name of RSS as "Really Simple Syndication".

While Userland Software continues to focus on its simplification, another group of developers is reviving the original RDF version (0.90), because RSS claims to be more flexible. They eventually released a version of RSS 1.0, whose official name was "RDF Site Summary." Because of the use of RDF, this version is completely different from the version controlled by Userland Software. Userland Software, of course, was reluctant to see the fact that RSS 1.0 seemed to replace its 0.94 version, so a new version was made, and the version number jumped to 2.0 at a draught.

This is the situation today that has created two major competitive versions: one based on RDF 1.0 and the other not (2.0), but all two share the same name. This is a terrible mess because the version number leads people to think that 2.0 is an improved version of 1.0, but in fact they are two completely different specifications. Another group of developers has am to address this messy problem by defining a new Digest (syndication) specification to break with the arbitrary nature of the RSS name. This solution is called Atom (atomic) project. This article will be discussed in detail later.

Using which version is actually irrelevant, most RSS aggregation mechanisms support all RSS versions (some even Atom). The final decision depends on whether or not you want to use RDF, a carrot and a cabbage, and it's all about the semantic Web concept that someone believes in.

  What do RSS 1.0 and RSS 2.0 look like?

The RSS 1.0 and 2.0 formats contain the same core information, but their structure is different. I have provided an RSS 1.0 document (see Figure 1) and an equivalent RSS 2.0 (see Figure 2) for comparison.

You'll notice the difference between the root element at the top right, the root element of RSS 1.0 is RDF:RDF, and the RSS 2.0 root element is RSS. RSS also contains a mandatory version attribute to represent the exact format of the RSS used (possible values include: 0.91, 0.94, etc.). Another major difference is that RSS 1.0 documents have namespace limits, and RSS 2.0 documents are not available. In any case, the information contained in two documents is essentially the same.

All two versions contain channel elements, and the channel element contains three necessary elements: Title, description, and link, with the following code:

<channel>
<title><!--Channel's title--></title>
<description><!--Brief Description--></description>
<link><!--Channel URL--></link>
<!--optional/extensible element-->
</channel>

In addition to these required elements, RSS 1.0 also defines three additional elements: image, items, and textinput, where image and TextInput are optional. RSS 2.0, on the other hand, provides 16 additional elements, including image, items, and textinput, plus language, copyright, Managingeditor, pubdate, and category. RSS 1.0 allows this type of metadata to be created by defining an extensible element in a separate XML namespace.

The main structural differences between the two formats must look at the representation of their item, image, and TextInput nodes. In RSS 1.0, the channel element contains references to item, image, and textinput nodes that exist outside the channel node itself. This establishes an RDF association between the channel and the referenced nodes. 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 continuously emitted 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 two versions. The item element usually contains the title, link, and description elements, as shown in the following code:

<item>
<title><!--title--></title>
<link><!--Item URL--></link>
<description><!--Brief Description--></description>
<!--optional/extensible element-->
</item>

In RSS 1.0, title and link are required, and description is optional. In RSS 2.0, the title or description must provide one of these, and the other is 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, GUIDs, pubdate, and source. RSS 1.0 acquires such metadata by defining an extensible element called an RSS module in a separate XML namespace. For example, in Figure 1, the date of the item is represented by the <dc:date> element of the Dublic Core module.

For complete information on different formats, refer to the RSS 1.0 and 2.0 specifications.

  So, what is Atom?

As I mentioned earlier, Atom is the name of a project, primarily the development of a new blog summary format to address the current problem of RSS (confusing version number, not a true open standard, indicating inconsistent methods, poor definition, etc.). Atom wants to provide a clear version to address everyone's needs, its design is completely independent of the supplier, anyone can be free to expand, complete detailed description.

Many of today's Blog engines already support the current digest format. Figure 3 is an atom 0.3 feed example that is equivalent to the aforementioned Figure 1 and Figure 2 RSS feeds. Note that the Atom feed is qualified with namespace, but it does not use RDF. This makes Atom and RSS 1.0 and RSS 2.0 similar in some places. It remains to be seen whether Atom will be accepted in the future.

In addition to defining a new digest format, Atom also wants to define a standard file format and a standard blog editing API (Atom API). For the Atom detail specification and other atom resources, visit the Atom Project.

  What is Blogroll?

Blogroll is a collection of blog feeds, and most bloggers (blogs) provide blogroll on their personal weblog. This allows the reader to connect to other interesting and writing styles of people who are congenial to the blog. Blogroll facilitates communication on the Internet. By using outline Processor Markup Language (OPML), one can exchange blogroll in XML format files. Figure 4 is an example of blogroll.

Most blog engines manage their own blogroll, and each time the reader requests a blogroll, it produces the corresponding XML format. Similarly, most aggregators can import Blogroll and automatically book the included summaries. See http://opml.scripting.com For more information about OPML.

  Can you explain what referrers, trackbacks and Pingbacks are?

Most blog software allows readers to add blog comments. But the more common approach is to allow readers to add an entry back to the original post in their own blog. Bloggers (Bloggers) are happy to keep track of the time the connection takes place so that new readers can understand the entire conversation.

The so-called referrer is an external site, users click on a hyperlink on the site can reach your site. Many blog engines keep track of themselves when they navigate to a portal of your blog. Most engines display a referrers list at the bottom of the blog entrance so that readers can navigate back to referrer's site and understand what they're saying about the portal, based on the assumption that if they link to it, they might write something about it. The problem with referrer is that this assumption has to be established-there is not enough information to indicate whether the referenced page actually contains the information. In fact, spammers have exploited this vulnerability to redirect readers for marketing attempts.

Trackback and Pingback are the same norms that are used to remedy the above problems. With Trackback and Pingback, other bloggers can automatically send a ping to your blog to make it clear that they have written a reference to a particular post.

This type of reverse chain allows your blog to display a list of all comments in a more visible way. Most of today's blog software supports all of these technologies. See also TrackBack Technical specification and Pingback 1.0.

  How do I generate an RSS feed for my site?

Figure 5 provides an example of how to generate an RSS 2.0 feed in an. aspx page using the Asp:repeater control. This page assumes that you have set the control's DataSource property to the corresponding database result set in the back-end code file.

  I want to aggregate a few RSS feeds and display the information on my personal website, can you explain how to do that?

Because RSS feeds are XML files, as an exercise, you can use your best XML APIs, such as System.xml,figure 6 in the Microsoft. NET Framework, to include the asp.net Web user control code, which I write with To aggregate a piece of code for the RSS feed listed in the Blogroll file (. opml). This code assumes that the OPML element contains the Numbertodisplay attribute to indicate how many items each feed you intend to display.

  Figure 7 asp.net Web user control

You can drag the control to any. aspx page, which displays the items for the different feeds listed in the Blogroll file, and Figure 7 shows the effect screen for the Utah. NET User Group Web site that uses this control.

  Are there Web Services APIs that interact with the blog?

Many blog engines provide their own WEB service interfaces, which are programmed to interact with blogs, but there is no standardized thing yet.

. Both Text and Dasblog provide some. asmx endpoints that can be edited using SOAP, but their interfaces are different. Blogger.com provides an interactive API (Blogger API) based on XML-RPC. The Userland Software has enhanced the functionality of the blogger API and called it the MetaWeblog API. These may be recognized today as blog APIs, but are still not supported by all blog engines. There is also a single API for adding comments called the Comment API, which is also not universally supported.

The Atom Group is working to address these issues, and the Atom API defines a standard blog API for publishing and editing blog content. Please refer to the Atom Project Web site for information.

Send questions and comments to aaron:xmlfiles@microsoft.com.

Author Introduction

Aaron Skonnard teaches at Salt Lake City Northface University. Co-author of the Essential XML Quick Reference (Addison-wesley, 2001) and Essential XML (Addison-wesley, 2000), often addressed at the Conference. He can be contacted in http://www.skonnard.com. This article is from the April No. 2004 issue of MSDN Magazine, available through local newsstands, or it is best to subscribe.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.