backends.xhtml   [plain text]


<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>The Evolution of Finger: pluggable backends</title>
  </head>
<body>

<h1>The Evolution of Finger: pluggable backends</h1>

<h2>Introduction</h2>

<p> This is the fifth part of the Twisted tutorial <a
href="index.xhtml">Twisted from Scratch, or The Evolution of Finger</a>.</p>

<p>In this part we will add new several new backends to our finger service
using the component-based architecture developed in <a
href="components.xhtml">The Evolution of Finger: moving to a
component based architecture</a>. This will show just how convenient it is to
implement new back-ends when we move to a component based architecture. Note
that here we also use an interface we previously wrote, FingerSetterFactory,
by supporting one single method. We manage to preserve the service's ignorance
of the network.</p>

<h2>Another Back-end</h2>

<a href="listings/finger/finger19b_changes.py" class="py-listing">finger19b_changes.py</a>
<p>
Full source code here: <a class="py-listing" href="listings/finger/finger19b.py">finger19b.py</a>
</p>

<p>We've already written this, but now we get more for less work:
the network code is completely separate from the back-end.</p>


<h2>Yet Another Back-end: Doing the Standard Thing</h2>

<a href="listings/finger/finger19c_changes.py" class="py-listing">finger19c_changes.py</a>
<p>
Full source code here: <a class="py-listing" href="listings/finger/finger19c.py">finger19c.py</a>
</p>

<p>Not much to say except that now we
can be churn out backends like crazy. Feel like doing a back-end
for Advogato, for example? Dig out the XML-RPC client support Twisted
has, and get to work!</p>

</body>
</html>