What is mod_spin
mod_spin
is an Apache 2.2+ module that provides the following functionality (in conjunction with some other modules):
- a simple template language with data replacement capabilities only
- persistent application and session tracking
- dynamic linking of applications into Apache 2 as shared libraries
- parameters, cookies and multipart/form-data parsing via libapreq2
- simple API for (kind of) MVC controller functionality
- simple API for pooled (or not) access to SQL databases
mod_spin
is written in C, just like Apache 2.2 itself and it uses APR, which was written to be cross platform, secure and perform well. Generally speaking, you should see speed improvements when compared to Java, PHP and Perl solutions, sometimes even by an order of magnitude.
If you want to find out more, check out the documentation.
What does the template language look like
Not surprisingly it is similar to Velocity, but with far fewer directives/commands (i.e. it is even simpler):
#for(${reference}) some text within the loop and a ${reference.column} #end #if(${reference}) some text to replace if ${reference} is not NULL #else some text to replace if ${reference} is NULL #end #unless(${reference}) some text to replace if ${reference} is NULL #else some text to replace if ${reference} is not NULL #end
The above is the full set of available language constructs in mod_spin
template language.
So, mod_spin
is vapourware
A stable release, version 1.2.0, is now available. All previous versions are now end of life and many known bugs in them will never be fixed. Do not use them.
Note, however, that the binary RPMS have been built on Fedora 12, and you should always pick the correct version of the RPM, as any other may not work. You can download packages below:
- /pub/mod-spin/mod_spin-1.2.0.tar.bz2
- /pub/mod-spin/mod_spin-1.2.0-1.fc12.src.rpm
- /pub/mod-spin/mod_spin-1.2.0-1.fc12.i686.rpm
- /pub/mod-spin/mod_spin-devel-1.2.0-1.fc12.i686.rpm
A skeleton application is available from here:
- /pub/spinapps/app/spin_app-1.2.0.tar.bz2
- /pub/spinapps/app/spin_app-1.2.0-1.fc12.src.rpm
- /pub/spinapps/app/spin_app-1.2.0-1.fc12.i686.rpm
To run mod_spin
, you have to install libapreq2
RPMS, which are available from Fedora
.
What is in the works
Note that all development of mod_spin ceased.
The usual set of apps has also been released for this version. Simply look for the latest versions here:
How is mod_spin
licensed
mod_spin
is licensed under the GNU Lesser General Public Licence (LGPL).