[Melbourne-pm] CGI quirks and other lightweight web-tools

Sam Watkins sam at nipl.net
Thu Jan 8 17:14:08 PST 2015


On Fri, Jan 09, 2015 at 09:44:12AM +1100, Mathew Robertson wrote:
> Generally speaking whenever I use a framework, in particular
> web-frameworks, they dramatically simplify about 80% of the workload - at
> the expense of making the last 20% near-impossible to work around.

> On the other hand "Libraries are awesome".

I agree, I would rather not use a 3rd party framework.  It seems they
seldom give such value as to be worth the difficulty of learning them,
learning to hack around them, and dealing with their quirks and
annoyances.

My current thoughts on web apps: provide a REST-like interface on the
server side, and do all templating and display using javascript with
html templates (no special [% markup %]) on the client side.

Downside is that it depends on javascript.

Advantages, it's very light on the server and uses very little
bandwidth, transmitting only the data that it needs to.  Pages load
quicker.  It's good to have an API for all aspects of the app.  The
templates are plain html pages, including example content, so it would
be relatively easy for a web designer without app coding skills to work
on improving the templates.

I haven't developed a full app in this style yet, but I started to make
the templating engine and it seems to work okay.

As for CGI, it's a low-level API.  The biggest problem is the cost of
fork and exec each process.  There are many alternatives which avoid
that cost while remaining largely compatible with CGI.  I agree it's not
a great idea to conglomerate your web app in with the apache server.



More information about the Melbourne-pm mailing list