Hosted by Three Crickets

Diligence
Web Framework
For Prudence and MongoDB

Diligence is still under development and incomplete, and some this documentation is wrong. For a more comprehensive but experimental version download the Savory Framework, which was the preview release of Diligence.

Diligence logo: sleeping monkey

Linkback Service

"Linkbacks" are a way to add cross-referencing to hyperlinks: if I link to another page on another site, I can let that other site know that I am linking to it, and then that other site can choose to display a link back to my site. This can be useful for users, as it lets them quickly find relevant sites. But, it's probably more important in terms of SEO: the more links you have, the higher your page's rank will be in search engines. And if you can get a link to your site on a popular site, all the better.
Because linkbacks require trust and mutuality, there are especially popular in the blogosphere, where bloggers often work with each other (sometimes antagonistically!) to create more hits, and thus generate more revenue.
Unfortunately, there's no single standard for linbacking, and all of them are rather cumbersome. Luckily, Diligence does most of the work for you: it features clients and servers for both the Trackback and Pingback specs. As a server, it lets you accept these linkbacks from other sites, respond properly to the remote clients, and register the linkback in a MongoDB collection. As a client, it lets you auto-discover trackback and pingback URLs on remote pages, and do the necessary handshaking.
Pingback is by far the more complicated spec: it requires XML-RPC (we are using Diligence's RPC service for it), and also suggests that you make sure that the other site is indeed linking to you before registering. Trackback is more lightweight, but allows telling the target site more information about how you are linking them.

Usage

Make sure to check out the API documentation for Diligence.Linkback.

Integrating Linkbacks into Your Product

Diligence does a lot for you, but the burden is still on your to understand these non-trivial technologies well enough to integrate them properly into your application. On this page, we're featuring a rather elaborate example of how linkbacks work on this page for the purpose of demonstration. Much of this can be automated for your application: for example, in a blogging application, you might want to go over every new blog post and try out all the links on the page with Diligence.Linkback.discover to see if they support linkbacks, and then to do the linkback automatically without any user interaction. Or, you might prefer to have users explicitly click on a "linkback" feature. Diligence gives you the tools, making it as easy as possible for you to do the rest.

How to Linkback from This Page?

1. Link
First, we need to make sure that we actually have a link to the remote site on our page. Here's a really simple form that lets you add links to this page:
<form id="add" method="POST">
<p>
	<%= Diligence.HTML.input({name: 'addPageUri', size: 70}, {_content: 'Page URL:'}) %>
</p>
<p>
	<%= Diligence.HTML.submit({value: 'Add Link'}) %>
</p>
</form>
<form id="clear" method="POST">
	<input type="hidden" name="clearPageUris" value="true" />
	<p>
		<%= Diligence.HTML.submit({value: 'Clear Link List'}) %>
	</p>
</form>
<p>
	Currently linked pages:
<% for (var i = links.iterator(); i.hasNext(); ) { var link = i.next(); %>
	<a href="<%= link %>">link</a>
<% } %>
</p>
2. Auto-Discovery
We support auto-discovery of trackback and pingback URLs, so you can first try to just enter the linked URL. Make sure it's one of the links you've added above! Pingback will be preferred if both Trackback and Pingback are supported by the page.
3. Or Use Explicit Linkback URLs
In case that doesn't work, you might also have to enter an explicit trackback or pingback URL posted on that page:
<p>
	<%= Diligence.HTML.input({name: 'trackbackUri', size: 70}, {_content: 'Trackback URL:'}) %>
</p>
(Note that you do <i>not</i> need to enter the page URL with trackback, but you <i>do</i> need it it with pingback)
<form>
<p>
	<%= Diligence.HTML.input({name: 'pingbackUri', size: 70}, {_content: 'Pingback URL:'}) %>
</p>
<p>
	<%= Diligence.HTML.submit({value: 'Linkback'}) %>
</p>
</form>
<% if (message) { %>
<p>
<span style="color: red;"><%= message %></span>
</p>
<% } %>

How to Linkback to This Page?

This page contains information about its trackback and pingback URLs. In case your software doesn't support auto-discovery of these, and you need to enter them explicitly, they are:
<p>
	<%= Diligence.HTML.input({value: Diligence.Linkback.getTrackbackUri(conversation.reference), readonly: 'readonly', size: 70}, {_content: 'Trackback URL:'}) %>
</p>
<p>
	<%= Diligence.HTML.input({value: Diligence.Linkback.getPingbackUri(), readonly: 'readonly', size: 70}, {_content: 'Pingback URL:'}) %>
</p> 

The Diligence Manual is provided for you under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. The complete manual is available for download as a PDF.

Download manual as PDF Creative Commons License