[plt-scheme] best servlet development approach?

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Mon May 19 13:34:58 EDT 2003

Don Felgar wrote:

> Third: The XML module will choke on the empty list or "incorrectly"
> nested lists.  Until recently I was using Oleg's SSAX XML
> representation which is very accomodating.  It does the right thing
> with eg '((p "hello")) '() and I think the unspecified value.  It uses
> (@) to specify an attribute list, whereas PLT uses a list only.  PLT's
> way is arguably better in that it forces the programmer to be less
> sloppy, but on the other hand I don't know how to handle some
> situations with PLT, for instance
>      `(html (head) (body ,(if condition '(h1 "Page Title")))) because
> if 'condition' is false, then the XML parser will choke on the
> unspecified value.  There are a couple of workarounds that I know of,
> neither very satisfactory.

Yeah, this is yucky.  We tend to use things like

  `(xxx ,@(if condition '((...)) '()))

but this is ungainly, and worse it forces you to propagate the
conditionals and (to avoid copying code) create abstractions.  Oleg's
system is clearly superior.

> Fourth and most important: don't judge web-server by the example
> servlets. [...]

This is interesting feedback.  We have some significant applications
that have been built using the server, such as a conference paper
submission and review manager.  These are probably too large to be
provided as "examples", though.  Can you think of something that is
useful (convincing) yet accessible that would have saved you six

Thanks very much!


Posted on the users mailing list.