[plt-scheme] web-server and templates

From: Mike T. Machenry (dskippy at ccs.neu.edu)
Date: Sat Aug 14 13:37:44 EDT 2004

Yeah, I did something like this a while back. It's basically just simple 
copy of what Mark Jason Dominus did with his Text::Template Perl module.

Here's my code page
http://www.ccs.neu.edu/home/dskippy/code/

text-template.ss is on there. It needs regexp-split.ss which is a 
regexp-split function because there wasn't one in PLT when I wrote this. You 
should be able to use the PLT one now instead. I'm not sure if this code 
still works with current PLT Scheme, it's been a while

MDJ's page.
http://www.plover.com
MDJ's Text::Template
http://perl.plover.com/#text-template

-mike

On Sat, Aug 14, 2004 at 09:35:06AM -0700, Jordan Johnson wrote:
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> Greetings all,
> 
> Has anybody made a template language based on the web-server 
> collection?  I'd like to be able to split the HTML out into templates 
> and hand it off to somebody else who's more interested in web design 
> than I.
> 
> Currently I've just been including files of the form
> 
> (module mytemplate
>   (provide mytemplate-func
>   (define (mytemplate-func var ...)
>     (string-append <string-or-var> ...)))
> 
> and putting the HTML in long strings--which has two annoying problems:  
> I've got to watch for quotes in the HTML text, and these modules don't 
> seem to get recompiled when I visit the refresh-servlets URL.
> 
> Anybody have a better alternative?
> 
> Best,
> jmj
> 
> --
> Jordan Johnson -- Mammalian Biped
> 


Posted on the users mailing list.