mod-guile-devel
[Top][All Lists]
Advanced

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

[Mod-guile-devel] guile-handler


From: rm
Subject: [Mod-guile-devel] guile-handler
Date: Mon, 29 Jul 2002 18:55:04 +0200
User-agent: Mutt/1.3.24i

Hello list,

i toyed a bit more with the idea of a module-based
'guile-handler'. I hacked together a small testbed that
has the basic functionallity (lacking most of the con-
figuration options since this would mean changes to
some of the strcuts). With this handler one can map 
requests for certain URLs to functions in modules.
Thanks to the almost not-exisiting documentation for
guiles scm_* interface i'm not shure whether i'm doing
things 'the right way' but at least it works. One design
issue i came accross so far:

How should we handle output to the client?

- a transparent redirect (current-output-port will
  point to an apache port that uses the apache api to
  send data to the client). This is an aproach many
  embeded script interpreters have:
    (display (string-append "<h1>" (dynamic-stuff) "</h1>"))
  will do 'the right thing'.

- Have special functions that send data to the client:

  (define (handler request)
    ...
    (send-data request "<h1>" (dynamic-stuff) "</h1>")
    ...)

- Use 'goops' -- make 'display' a generic that can deal with
  a request_rec as it's second parameter:

  (define (handler request)
     ...
     (display (string-append "<h1>" (dynamic-stuff) "</h1>") request) 
     ...)
 Of course, goop's C-api is pretty much undocumented ...

What do you think?

  Ralf
  

    



reply via email to

[Prev in Thread] Current Thread [Next in Thread]