2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
5
<title>Introduction</title>
11
<h2>Who is this tutorial for?</h2>
13
<p>This tutorial is for people who want to build interactive client-server
14
functionality where a web-browser is the client. It will show you how to build
15
a live, interactive chat application that requires nothing more than a web
16
browser that supports JavaScript.</p>
18
<p>The interesting thing about a chat application, which shows why Nevow Athena
19
is special, is that it involves two-way communication. In other words, it
20
involves not only the recently-popular AJAX (the web browser sending commands
21
to the server without loading a new page) but also the trickier and, in our
22
opinion, somewhat cooler technique known as COMET (the web server
23
sending commands to the <em>browser</em>).</p>
25
<h2>Who is this tutorial <em>not</em> for?</h2>
27
<p>Nevow Athena is <em>not</em> for people who want a normal web application
28
framework. If you want one of those, you should use
29
non-Athena-<a href="http://divmod.org/trac/wiki/DivmodNevow">Nevow</a>,
30
<a href="http://www.djangoproject.com/">Django</a>,
31
<a href="http://turbogears.org/">TurboGears</a>, or maybe even
32
<a href="http://rubyonrails.org/">Ruby On Rails</a>. Athena doesn't work in terms
33
of pages, links, or HTTP requests and responses; it is a client-server
34
framework that works in terms of widgets, JavaScript objects, and symmetric
35
asynchronous message queues.</p>
37
<p>However, as alluded to above, Athena is part of a larger framework, Nevow,
38
which can be used to build more general-purpose and <q>traditional</q>
43
<p>AJAX isn't a technology in and of itself, bur rather an amalgam of
44
technologies used together in order to accomplish the goal of making web
45
applications more responsive than traditional delivery and interactive
46
mechanisms, such as HTML forms submitted to a server.</p>
48
<p>In particular, AJAX consists of the following:</p>
50
<li>Asynchronous communications from a user's browser to a server</li>
52
<li>Exchanged data (usually XML or JSON)</li>
57
<p>Historically, the focus of AJAX technologies was user-event driven. However,
58
with the need to update the user's browser with events generated at the server,
59
a solution more sophisticated than AJAX was needed; this has been dubbed COMET.
60
Athena is implemented using both AJAX and COMET techniques, and therefore
61
allows two-way browser <-> server communications.</p>
63
<h2>Athena Basics</h2>
65
<p>We've provided brief background information on AJAX/COMET, but what is the
66
purpose of Athena? What makes Athena different than other solutions? Here are a
67
few key points that should help with these questions::</p>
69
<li>Athena exists to make writing COMET web applications easy.</li>
70
<li>Athena is written in Python and JavaScript</li>
71
<li>It is written to be used with Nevow, a <a
72
href="http://twistedmatrix.com/">Twisted</a>-based web framework.</li>
73
<li>Similar to Twisted's <a
74
href="http://twistedmatrix.com/projects/core/documentation/howto/pb-intro.html">Perspective
75
Broker</a>, Athena employs remote calls.</li>
78
<p>Athena was written by Twisted and Divmod developers (in addition to
79
contributing members of the community) in order to bring the outdated and
80
Nevow-incompatible Woven LivePage technology to Nevow. In addition, it was an
81
opportunity to improve upon the original design and incorporate new features to
82
address the growing needs of developers.</p>
84
<h2>Target Applications</h2>
86
<p>Good candidates for Athena web applications would include those where the
87
application needs to respond to user input and/or updates from servers, such
90
<li>conference software (e.g. whiteboard, shared text, chat, etc.)</li>
92
<li>interactive, multi-player games</li>
93
<li>social networking tools</li>
94
<li>office applications (e.g., spreadsheets, word processors, etc.)</li>
97
<h2>Target Developers</h2>
99
<p>Anyone who wants to create interactive, web-based applications is a
100
potential Nevow/Athena user. It's best to have some background in writing web
101
applications, and in addition, to know how to use Nevow. However, we hope that
102
this tutorial will be just as useful for beginners as experienced