2017-11-26

web-app

minimal scheme web application framework

loads your config, prepares your assets, initialises and deinitialises your app, starts a server, passes request objects to your handler and transmits your responses

a standard application structure for configuration, client code, modules and more

features

protocol agnostic: socket -> web-app -> socket

exchangeable server (thread-pool scgi, fibers scgi, direct http, ...)

derivative environment configuration files in an s-expression file format

templating with s-expression versions of xml (sxml), javascript (sescript) and css (plcss)

basic routing on any request property with pattern matching

asset processing: transcompilation, bundling, minification, compression, formatting, etc

composable projects. projects can derive from other projects

functional, avoids side-effects: no "set!" used

initialisation does not depend on a server, good for testing

usable with a proxy like nginx for https, automatic chunked-encoding, fast file transfers, keep-alive, websockets, load-balancing, caching and general http robustness

tried and tested recommended application structure

what makes sph-web-app fast?

response objects with procedures that send data while it is generated

plain vectors as records for request and response objects

a request leads to few procedure calls

documentation

sph-web-app manual

dependencies

guile >= 2

sph-lib

optional

sescript for javascript from s-expressions

module.js for modules with the r6rs library syntax in sescript

installation

manual

install all dependencies if there are some

download

download

alternatives: releases, git clone git://sph.mn/sph-web-app, github

unpack

unpack the downloaded archive

for example

tar -xf sph-web-app.tgz

-x is for extract

-f is for the source file name

install

cd sph-web-app
su root
./exe/install

in most cases the installer only copies files

the install script might have a "--help" option that will list more install options

pacman

using aurget:

aurget -S --deps sph-web-app-git

see also

(sph lang template)

(sph scgi)

plcss

sxml

similar to

express - minimalism and expressiveness

rails - convention over configuration, rails engines, asset pipeline

used by

sph-cms

ytilitu.xyz

this website


tags: programming guile library scheme overview start q1 computer project web-app scgi framework web http sph-web-app