_ _
/_\ _ _ __ _ _ _ | |_ __ _
/ _ \| '_/ _` | ' \| ' \/ _` |
/_/ \_\_| \__,_|_||_|_||_\__,_|
-- By Pepperfish
aranha@pepperfish.net
------[ Contents ]-------------------------------------------------------------
* What is Aranha
* Who provides Aranha
* What do you need to compile Aranha
* How to prepare Aranha
* How parameters work
* How to get Aranha from version control
* Where are Aranha's bugs etc stored
* Where can I get help, ask questions etc
------[ What is Aranha ]-------------------------------------------------------
Aranha is a web-application development platform. Or, in less 'buzzwords'
Aranha is a piece of software written to allow web applications to be written
more cleanly and more easily.
------[ Who provides Aranha ]--------------------------------------------------
Aranha is primarily developed by Daniel Silverstone. It incorporates
the Lua 5.1 core written by Tecgraf, LuaJIT 1.1.2 by Mike Pall and
also it incorporates Rici Lake's comprehensions and constructors
patch.
The modules you will tend to see supplied with Aranha were written by
various people including Daniel Silverstone, Rob Kendrick and Vincent
Sanders.
------[ What do you need to compile Aranha ]-----------------------------------
* A sensible C compilation environment including make and a sensible shell
* A little time
* And a FastCGI enabled webserver for using it
------[ How to prepare Aranha ]------------------------------------------------
First unpack the source (if you're reading this you may already have
managed to). We recommend out-of-tree building, but that's not
essential. Perform the following commands:
$ mkdir BUILD
$ cd BUILD
$ ../configure --prefix=/where/to/install
$ make check
$ [sudo] make install
Obviously you don't need the sudo if you're not installing into a
rootly place.
Now that you have installed aranha, you need to prepare you configuration.
Choose a place which will be your fastcgi root and make the directory...
$ mkdir /some/path
$ cd /some/path
$ ln -s /path/to/aranha/binary aranha.fcgi
$ cat > aranha.conf
preload="preload.lua"
^D
$ cat > preload.lua
Namespace { prefix="/" handler=Class "aranha.uri.classichandler" ("ahtml") }
^D
This prepares a configuration which says *.ahtml == wrapped files
(I.E. code embedded in HTML) and everything else is plain (I.E. code
with embedded html)
Next configure your web server appropriately to pass (for example)
.ara and .ahtml files through to the fastcgi.
Then put these test files in your docroot:
-------------8<-------------[ test.ara ]---------------------------------------
function serialise(xtab)
>>
<<
for k,v in pairs(xtab) do
if type(v) == "table" then
>>- |k$H|:<<
serialise(v)
>>
<<
else
>>- |k$H| = |v$H|
<<
end
end
>>
<<
end
request:parseParams()
if #request._params then
>>Parameters:<<
serialise(request._params)
end
>>Environment:<<
serialise(request.env)
-------------8<-------------[ test.ara ]---------------------------------------
And:
-------------8<-------------[ test.ahtml ]-------------------------------------
Example stuff
<< for k,v in pairs(request.env) do >>
- |k$H| == |v$H|
<< end >>
-------------8<-------------[ test.ahtml ]-------------------------------------
They should both do the obvious thing.
------[ How parameters work ]--------------------------------------------------
In the very simplest of cases foo=bar&wibble=cake will do the obvious
thing. However aranha's parameter parsing system also supports
promotion to tables. So the foo=bar&foo=wibble will make foo into a
table whose array part contains bar and wibble. Also
foo.bar=wibble&foo.baz=cake will do the obvious thing with the hash
portion of the table. You shouldn't rely on the ordering of the
numeric part of tables unless you explicitly define with something
like foo.1=bar&foo.2=baz which will do the right thing.
------[ How to get Aranha from version control ]-------------------------------
Aranha is kept in a version control system called Bazaar-NG. Bazaar-NG
is written in python and is highly portable. You can see more about
Bazaar-NG at http://bazaar.canonical.com/ and you can fetch a copy
from there. Users of Ubuntu Linux can find it in the bzr
package. Other distributions or operating systems may require you to
get the source and install it yourself. It's fairly easy to do.
You will require version 0.8 or better of bzr in order to get aranha because
we use shared repositories and the knit storage format.
Assuming you have bazaar-ng and have identified yourself to it, you can
get the code from the published tree on http://bzr.digital-scurf.org/
$ bzr get http://bzr.digital-scurf.org/trees/managed/aranha/devel
$ cd aranha
$ ./prep-fresh.sh
$ cd BUILD
$ make
------[ Where are Aranha's bugs etc stored ]----------------------------------
Aranha is a project managed in the Launchpad application provided by
Canonical Ltd. You can access the Launchpad using your web browser.
Everything is accessible from http://launchpad.net/projects/aranha/
Should the Launchpad go away, check the following URLs for more information:
* http://www.digital-scurf.org/software/aranha
* http://aranha.pepperfish.net/
------[ Where can I get help, ask questions etc ]------------------------------
The Aranha project has a channel on the Freenode IRC network. It is called
#aranha
and generally you'll find one or two people there who may be able to help.
As the popularity of Aranha increases, so many the number of channels dedicated
to it, but for now there's only the one.
Other than that, you can subscribe to the commits list at
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/bzr-commits-digital-scurf.org
------------------------------------------------------------------[ END ]------