[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loading additional code

On Sat, Jan 05, 2002 at 11:49:29PM +0100, David N. Welton wrote:
> > i'm also planning to develop some kind of JSP equivalent for scheme.
> > i don't think custom tags will be needed, because scheme is so
> > readable and 'natural' that it can be seamlessly included in the
> > HTML code like:
> > 	<(reqparam "foo")>
> > would display a request parameter "foo", contrary to the long and dirty
> > java code for the same:
> > 	<%= request.getParameter("foo") %>
> <? ?> are the correct markers to use for processing instructions in
> xml, possibly accompanied by an identifier like this:
> <?mzwebscheme 
> (display "hello world")
> ?>

true!  but my main aim is - make it simple, developer friendly and quick to
work in.  i'm tired of all this formalism which doesn't give anything.
i'm the one parsing the document - why not use <(.  java people didn't fear to
use % instead of ?, why would i?
if i use '(' - it will embed scheme really nicely into the page - because a
programmer would have to write the '(' to start a piece of scheme code.

> > is this the right way to go?  or perhaps i should experiment with
> > XML related code in http://pobox.com/~oleg/ftp/ and go some other
> > way?
> You might consider doing some tooling around with the ports - making a
> special output port or something along those lines, so that you avoid
> having a web-specific output command.  I don't know much yet about
> mzscheme's internals, but maybe you 2could even replace the standard
> output with your web one for scripts that are run, so that you can run
> more or less standard bits of scheme.

yes, i'll make a custom port and set it as default inside the interpreted
page/script - that way whatever the programmer outputs - will go to the client.

> Or instead of writing the whole thing from the ground up, you could
> bolt it onto Apache:-)

well.. yes, but then it would be an OS inside an OS.  i've thought of this,
but that would include C coding - and i'm writing this to learn Scheme (among
other reasons).

besides, i've had a look at a comparison between apache and a scheme server, and
the scheme version was a bit slower (with static documents), it will probably
be even faster with dynamic stuff.  why?  because i'm thinking all this out
from bottom up, knowing what apache has problems with from the start.  so i don't
repeat their mistakes.

> You might also look at things like 'BRL' which do web/scheme (he uses
> Kawa though, if I'm not mistaken).

browsing it's project page, and reading docs - looks nice.
looks like this guy thought of the scheme JSP version before me :)  thanks for
this resource.  n.b. he also ignores the <? standard :)

> Ciao,
> -- 
> David N. Welton
>    Consulting: http://www.dedasys.com/
> Free Software: http://people.debian.org/~davidw/
>    Apache Tcl: http://tcl.apache.org/
>      Personal: http://www.efn.org/~davidw/