On 6 Jul 2007, at 4:07 am, Mario Domenech Goulart wrote:
If I understand correctly, this is somewhat similar to a sort of url dispatcher once I implemented (without type declarations) but never bothered to use: http://schemers.ucpel.tche.br/mario/url-dispatcher.html (code at http://schemers.ucpel.tche.br/mario/url-dispatcher.scm).
Yeah! I looked at that with interest when it came up on IRC. It comes at it from a different angle, though, registering handler functions rather than having Spiffy choose files from the filesystem and look up handlers for them. I can imagine it being useful for more RPC-like services - one should be able to write a spiffy handler that uses your mechanism. The file might contain a bunch of define-callable-url forms, with the register- dispatcher being implicit; any request that goes to that file has its next path component treated as a callable-url method name, and the rest treated as arguments. It'd do its own argument processing rather than using the wings one - which is fine, because wings won't force it on you where it's not wanted ;-) Such a handler would basically make it easy to set up REST APIs for your web apps. Reading that has reminded me of something I forgot about: I should add support for defining a 'rest' argument in the positional arguments, which gets a list of all the remaining path info components. Why's http:find-resource need hacking? I vaguely remember some other mention of path info not being reported well in spiffy - ah yes, in the source of the cgi egg. Is there some fundamental thing we need to fix to allow pathinfo handling?
Best wishes, Mario
ABS -- Alaric Snell-Pym Work: http://www.snell-systems.co.uk/ Play: http://www.snell-pym.org.uk/alaric/ Blog: http://www.snell-pym.org.uk/?author=4 _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
