The previous article "How Much Do You Know About Blog Systems: Unveiling the Unknown Secrets (Part 2)" introduced the key points of basic blog functionality design. This article introduces blog protocols or standards.
Table of Contents
Due to the length of the article, it will be divided into 4 parts. The table of contents is as follows:
- The Past and Present of "Blog"
- My Blog Story
- Who Is the Audience of the Blog?
- Key Points of Basic Blog Functionality Design
- 4.1 Post
- 4.2 Comment
- 4.3 Category
- 4.4 Tag
- 4.5 Archive
- 4.6 Page
- 4.7 Subscription
- 4.8 Version Control
- 4.9 Theme and Customization
- 4.10 Users and Permissions
- 4.11 Plugins
- 4.12 Image and Attachment Handling
- 4.13 Profanity Filtering and Comment Moderation
- 4.14 Static Generation
- 4.15 Notification System
- Blog Protocols or Standards
- 5.1 RSS
- 5.2 ATOM
- 5.3 OPML
- 5.4 APML
- 5.5 FOAF
- 5.6 BlogML
- 5.7 Open Search
- 5.8 Pingback
- 5.9 Trackback
- 5.10 MetaWeblog
- 5.11 RSD
- 5.12 Reader View
- What Knowledge Points Are There in Designing a Blog System
- 6.1 Should Time Zones Always Use UTC?
- 6.2 HTML or Markdown
- 6.3 MVC or SPA
- 6.4 Security
- Conclusion
5.1 | RSS
RSS (Really Simple Syndication) is an XML-based standard widely used in content websites including blogs. It was invented by Dave Winer in 1999, and the child computer genius Aaron Swartz participated in defining the specification. Unfortunately, the latter committed suicide in January 2013 at the age of 26.
RSS is also one of the most iconic features of a blog system. Its widespread use in blogs has made it a de facto standard. A blog system without RSS is as interesting as a phone without a camera.
The file extension for RSS is usually .rss or .xml, but it can also be left undefined (e.g., Moonglade's RSS). The content is an XML description of recently published blog posts, including title, time, author, category, summary (or full text), and other information.

RSS is meant for machines to read, and can be used for content synchronization between websites. For example, in the past, Renren (formerly Xiaonei) could import blog posts as diaries via RSS. For ordinary users, an RSS reader application is needed to subscribe to blogs. Typically, such a reader subscribes to not just one author's blog, but all blogs the user cares about. Readers are usually cross-platform and cross-device, allowing users to subscribe to RSS feeds on computers, tablets, phones, or even Raspberry Pi.


Some browsers (e.g., early Firefox) can automatically recognize a blog's RSS address and allow subscription within the browser. The auto-discovery principle is to find something like this in the <head> of the page:
<link rel="alternate" type="application/rss+xml" title="Edi Wang" href="/rss" />
However, RSS has a drawback: it cannot be actively pushed from the server to the client; the client must pull it automatically from the server. Over the past decade, with the rise of mobile devices, push notification services have compensated for RSS's shortcomings, and major platforms have launched their own mobile apps. As a result, RSS has been abandoned by many websites. But that doesn't mean RSS is useless; many websites still provide RSS subscriptions. For example, Microsoft Channel 9's RSS: https://channel9.msdn.com/Feeds/RSS/, and the domestic blog site cnblogs' RSS: http://feed.cnblogs.com/blog/sitehome/rss. Interestingly, the logo of cnblogs is actually an RSS icon.
For building a blog system, you usually won't create a dedicated mobile app, and users won't download a separate app for every blog. Moreover, blogs still need to sync with other blogs and websites; it's not feasible to develop a custom sync protocol for every partner. Everyone still uses the widely accepted standard RSS. Therefore, RSS is still the best way to push articles in a blog system in 2020.
Reference: https://en.wikipedia.org/wiki/RSS
5.2 | ATOM
ATOM serves almost the same purpose as RSS, but ATOM was created to address some design flaws of RSS. For example, for the publication date of an article, ATOM uses RFC 3339 timestamps, while RSS uses the RFC 822 standard. ATOM can also identify the language of an article and allows payloads containing XHTML, XML, and Base64 encoded content, which RSS does not permit.
Many blog systems (including my Moonglade) provide both RSS and ATOM feeds.
Reference link: https://en.wikipedia.org/wiki/Atom_(Web_standard)
5.3 | OPML
"OPML (Outline Processor Markup Language) is an XML format for outlines (defined as 'a tree, where each node contains a set of named attributes with string values'). It was originally developed by UserLand as the native file format for outlining applications in their Radio UserLand product, and has since been used for other purposes, most commonly to exchange lists of web feeds between web feed aggregators.
The OPML specification defines an outline as a hierarchy of elements, an ordered list. The specification is fairly open, making it suitable for many types of list data.
Mozilla Thunderbird and many other RSS reader websites and applications support importing and exporting RSS feed lists in OPML format."
Reference: https://en.wikipedia.org/wiki/OPML
In simple terms, for a blog, OPML tells the reader which subscription sources the blog has and their respective subscription addresses. Typically, each article category is a feed source, and all articles together form another feed source.

5.4 | APML
APML stands for Attention Profiling Mark-up Language, even less known than OPML. APML is now very rare on the internet, even more so than WP. As one of the historical relics of the blog industry, I'll briefly introduce it out of nostalgia.
Similar to OPML, it is an XML-formatted declaration file used to describe topics or interests of a person, and can be shared with other readers or bloggers. It helps readers or the blog system itself provide services or more targeted ads based on user interests.
Reference link: https://en.wikipedia.org/wiki/Attention_Profiling_Mark-up_Language
WordPress can achieve APML through plugins, while BlogEngine has APML built-in. My Moonglade does not support APML.
5.5 | FOAF
FOAF stands for Friend of a Friend. It is also a machine-readable file that describes the social relationships of a person. In blogs, FOAF can be used to represent "blogroll" links between the blogger and other blogs. However, this blogroll is meant for machines to read, so that machines can understand who your friends are, and thus recommend content from friend blogs to readers.
WordPress can achieve FOAF via plugins, BlogEngine has FOAF built-in, and my Moonglade does not support FOAF. FOAF's status is similar to APML—almost extinct.
Reference link: https://en.wikipedia.org/wiki/FOAF_(ontology)
5.6 | BlogML
BlogML is a set of data standards across blog systems. Any blog system that implements BlogML can import/export articles and other data with each other, even if they use different languages or platforms. It's like how HTML5 is a standard, and Edge, Chrome, Firefox are browsers; content written for HTML5 works across all these browsers.
BlogML was also born in the .NET community and later became a standard. Besides .NET-based systems like BlogEngine, even PHP-written WordPress supports BlogML. In the past, Windows Live Spaces, Subtext, DasBlog, etc., also supported BlogML. My Moonglade does not support BlogML.
The current standard schema for BlogML is 2.0, updated on November 25, 2006. It seems this standard has also...
Reference: https://en.wikipedia.org/wiki/BlogML
5.7 | Open Search
If a blog implements the Open Search specification, the blog's search functionality can be automatically integrated into the user's browser. This makes it convenient for users to directly use your blog's search service as a search engine (like Bing or Google) from the browser address bar.

Implementing Open Search requires two steps. First, add a link in the <head> of the web page pointing to the OpenSearch definition file:
<link
type="application/opensearchdescription+xml"
rel="search"
title="Edi Wang"
href="/opensearch"
/>
Then output the OpenSearch file:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Edi Wang</ShortName>
<Description>Latest posts from Edi Wang</Description>
<image height="16" width="16" type="image/vnd.microsoft.icon"
>https://edi.wang/favicon.ico</image
>
<Url type="text/html" template="https://edi.wang/search/{searchTerms}" />
</OpenSearchDescription>
The file describes the blog's name, description, icon, and URL pattern for search content. Once the browser identifies this file, it automatically registers your blog in the search engine list. Then readers can directly type keywords in the browser address bar and see your blog's own search results page.


For specific Open Search specifications and standards, refer to: https://en.wikipedia.org/wiki/OpenSearch
5.8 | Pingback
Pingback is used for communication between blog systems. When your article is referenced by someone else, you receive a pingback request. When you reference someone else's article, you send a pingback request to their blog. Therefore, completing a pingback requires both sides' blogs to support the pingback protocol. Since it is a standard protocol, pingback does not require both blogs to use the same blog product. For example, my Moonglade written in .NET Core can ping perfectly with WordPress written in PHP. Pingback is not limited to blogs; any CMS or content website that wants to support pingback can do so.
The technical principle of Pingback is not complicated.
Sending a Pingback request:
Given your article's URL A and the referenced article's URL B, request B to see if it has a pingback endpoint. If it does, construct an HTTP Request with an XML body:
<methodCall>
<methodName>pingback.ping</methodName>
<param>
<param><value><string>A</string></value></param>
<param><value><string>B</string></value></param>
</param>
</methodCall>
Thus, the website where B resides knows that article A referenced article B. After processing the pingback, it sends a success or failure response to the website of A.

Receiving a Pingback request:
Your article URL A is referenced by someone else's article B, and you receive a pingback XML. First, you need to verify whether the pingback request looks suspicious to ensure security. For example, check if it has a normal methodName, valid URLs for both sides, whether the URLs are accessible, and whether there are strange URLs (like localhost or specially crafted URLs with potential attack behavior). After ensuring the pingback request is fine, request B's page, scrape B's page title and IP address, record them in your database, and associate them with article A.
Received pingbacks are usually automatically added as comments under the article, but this design is not part of the specification; you can implement it freely. For example, Moonglade centralizes pingbacks in the backend for the blog administrator to review.

Reference: https://en.wikipedia.org/wiki/Pingback
5.9 | Trackback
Trackback allows a website to notify another website of updates. It is one of four types of linking methods that enable authors to request notification when someone links to their documents. This allows authors to track who links to their articles.
Reference: https://en.wikipedia.org/wiki/Trackback
Although similar in function to Pingback, Trackback usually requires manual sending and requires providing a summary of the article to the other party. In contrast, Pingback is a fully automatic operation completed by both blog systems together.
5.10 | MetaWeblog
MetaWeblog is a set of Web Services based on XML-RPC. This API defines several standard interfaces for CRUD operations on common blog content such as articles, categories, and tags. Any blog system that implements these interfaces allows bloggers to write posts using a client installed on their computer instead of logging into the blog backend via a browser. Mainstream clients include Windows Live Writer and Microsoft Word. In the client, you can fully edit articles, insert images, set categories, and even synchronize the blog's theme into the client.
It may seem like another outdated blog protocol, but as of 2020, the latest version of Microsoft 365 still fully supports blog systems that implement the MetaWeblog API.

Other blog APIs similar to MetaWeblog include Blogger API, Atom Publishing Protocol, and Micropub.
Reference: https://en.wikipedia.org/wiki/MetaWeblog
My blog once fully implemented MetaWeblog + RSD with a 996 007 schedule back in 2012, but now at 30, I don't plan to implement it in .NET Core for now. After all, how many people are still using Live Writer and Word to write blogs (cries).
5.11 | RSD
Really Simple Discovery (RSD) is an XML format and a publishing convention that allows client software to discover the services exposed by a blog or other web software. It reduces the information needed to set up an editing/blogging software to three well-known elements: username, password, and blog URL. Any other critical settings should be defined in the RSD file associated with the website, or can be discovered using the provided information.
To use RSD, the website owner places a link tag in the <head> of the homepage indicating the location of the RSD file. An example used by MediaWiki is:
<link
rel="EditURI"
type="application/rsd+xml"
href="https://en.wikipedia.org/w/api.php?action=rsd"
/>
Then the RSD file represents the interfaces of various APIs:
<?xml version="1.0"?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
<service>
<apis>
<api name="MediaWiki" preferred="true" apiLink="http://en.wikipedia.org/w/api.php" blogID="">
<settings>
<docs xml:space="preserve">http://mediawiki.org/wiki/API</docs>
<setting name="OAuth" xml:space="preserve">false</setting>
</settings>
</api>
</apis>
<engineName xml:space="preserve">MediaWiki</engineName>
<engineLink xml:space="preserve">http://www.mediawiki.org/</engineLink>
</service>
</rsd>
Reference: https://en.wikipedia.org/wiki/Really_Simple_Discovery
RSD is almost always used together with the MetaWeblog interface mentioned above. This allows tools like Windows Live Writer and Microsoft Word to automatically discover the blog's MetaWeblog service without manually entering the URL.
5.12 | Reader View
Most browsers and clients have a reader view that allows readers to view articles in a layout completely different from the blog website's page style. For example, the normal page of a certain article on my blog looks like this:

When the browser recognizes that my blog supports reader view, the immersive reading button lights up:

After entering immersive reading mode, the browser automatically extracts the article content, identifies the article's title, sections, and images, removes navigation bars, sidebars, and other elements unrelated to the article, and allows users to control text size, background color, and even read the article aloud.

Not only my blog has reader view; well-designed blogs and news content sites also have it, such as Azure's:

Additionally, websites that support reader view will definitely not have poor SEO. Therefore, when designing a blog system, consider supporting reader view.
The next article will mainly introduce [Knowledge Points in Designing a Blog System]. Stay tuned!
