Web applications use the web browser as the user interface.
The core of the application itself, however, resides on the server.
A wiki is one such web application. The WikiEngine and the PageDatabase
both reside on some server (not necessarily the same one).
The database as well as the engine are interesting resources for
people other than the wiki visitors, thus the usual web browser
interface might not be rich enough.
== Public Specifications ==
The simplest alternative is to publish how the browser communicates
with the engine. Usually one of the following is used:
Parameters
Example:
my $uri = "http://ping.blo.gs/?name=foo&url=bar&direct=1";
require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new('GET', $uri);
return $ua->request($request);
== Use Plain Text ==
The kind of interface mentioned above -- where the client acts as a web browser --
is often difficult to use because the format used is often HTML.
And HTML often changes. So extracting the useful data becomes a pain.
One way to deal with this is to reduce the "fluff" in the format.
Plain text is a very simple alternative.
As an example, OddMuse offers not only a [http://www.emacswiki.org/cgi-bin/oddmuse?action=index list of all pages] but
also a [http://www.emacswiki.org/cgi-bin/oddmuse?action=index&raw=1 plain text list of all pages].
Similarly, it not only offers recent changes as [http://www.emacswiki.org/cgi-bin/oddmuse?action=rc HTML], but also as [http://www.emacswiki.org/cgi-bin/oddmuse?action=rss XML] and [http://www.emacswiki.org/cgi-bin/oddmuse?action=rc&raw=1 plain text].
See also RawMode.
== XML Remote Procedure Calls (RPC) ==
Moving away from HTML does not necessarily have to involve plain text.
Many people enjoy using XML for data exchange.
One way to do this is to use XML-RPC.
Here, the communication between the local application and the remote
engine uses XML documents. The function call and its parameters
are translated into an XML representation, sent over the network,
and on the remote site, the function is called with the appropriate
parameters, and an XML representation of the result is sent back.
The JSP Wiki has specifications for such an API
[http://www.jspwiki.org/Wiki.jsp?page=WikiRPCInterface2].
----
CategoryWikiTechnology