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

Re: loading additional code

Wojciech Sobczuk <sopel@freebsd.hbz.pl> writes:

> which way would be better?  i'd like to cache the 'servlets' and
> invoke functions defined by them from various threads - which way
> allows me to accomplish it?  in the future - i'd like to make sure
> that the code inside a 'servlet' isn't able to access any data
> outside it's unit - how will that work with caching the code?
You also want to be able to load things up like database connections
when the server (or threads) are launched.

> 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:

(display "hello world")

> 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.

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

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

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/