2018-03-09

web-app

minimal scheme web application framework

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

an framework for configuration, client code, socket-based communication, http, modules and more

status: should work with guile 2.2

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

basic routing on any request property with pattern matching

composable projects. projects can derive from other projects

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

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

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

initialisation separate from server implementations. 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

scgi support

tried and tested recommended application structure

what makes sph-web-app fast?

response objects can have procedures that will send data while it is generated

plain vectors as records for request and response objects

requests have little overhead as few calls are made and little data has to be prepared

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 functional