1
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html lang="en" xmlns="http://www.w3.org/1999/xhtml">
3
<title>Twisted Documentation: Philosophy</title>
4
<link href="../howto/stylesheet.css" rel="stylesheet" type="text/css"/>
8
<h1 class="title">Philosophy</h1>
9
<div class="toc"><ol><li><a href="#auto0">Abstraction Levels</a></li><li><a href="#auto1">Learning Curves</a></li></ol></div>
14
<h2>Abstraction Levels<a name="auto0"/></h2>
16
<p>When implementing interfaces to the operating system or
17
the network, provide two interfaces:</p>
20
<li>One that doesn't hide platform specific or library specific
22
For example, you can use file descriptors on Unix, and Win32 events on
25
<li>One that provides a high level interface hiding platform specific
27
E.g. process running uses same API on Unix and Windows, although
28
the implementation is very different.
32
<p>Restated in a more general way:</p>
35
<li>Provide all low level functionality for your specific domain,
36
without limiting the policies and decisions the user can make.</li>
37
<li>Provide a high level abstraction on top of the low level
38
implementation (or implementations) which implements the
39
common use cases and functionality that is used in most cases.</li>
42
<h2>Learning Curves<a name="auto1"/></h2>
44
<p>Require the minimal amount of work and learning on part of the
45
user to get started. If this means they have less functionality,
46
that's OK, when they need it they can learn a bit more. This
47
will also lead to a cleaner, easier to test design.</p>
49
<p>For example - using twistd is a great way to deploy applications.
50
But to get started you don't need to know about it. Later on you can
51
start using twistd, but its usage is optional.</p>
55
<p><a href="../howto/index.html">Index</a></p>
56
<span class="version">Version: 10.0.0</span>
b'\\ No newline at end of file'