Despite having my house flooded (and my daughter and wife subsequently come down with some vomiting illness, and problems with the power supply in the house due to water in the sockets, and ... I won't go on!), I've pressed ahead a little with wings :-)
I'm still working on the URL parser. I'm awaiting word from Peter Bex on how Spiffy will one day hand me extra URL path information, so for now, the URL parser is just given a list of strings as path information and an alist of URL query-string parameters. But we now have both positional and named arguments to pages, and I've started writing up a (rather terse, for now) manual describing the syntax of argument definitions. Oh, and I've implemented a few suggestions from Peter, such as (? <predicate>) to allow arbitrary validity-checking functions for arguments. I've found the 'match' macro that comes with Chicken really helpful for parsing the argument definitions! Also, I've written an extensive bunch of unit tests, using Alex Shinn's test egg. It's good to make sure that a range of cases is handled correctly. My previous work on the wings environment system had already produced a Spiffy file type handler wrapper, which takes an existing handle (eg, web-scheme) and makes it look for ".wings" files alongside the files being handled, which contain metadata to load into the Wings environment for that request. I'll soon be extending it to look up argument declarations located in said metadata files, and apply them to the actual URL query string and path info, to produce an alist of nicely processed bindings which will go into the environment for use within pages. But first, I'll write the function that converts an alist of bindings, a base URL, and a URL parser argument declaration, and produces a URL with the desired arguments correctly formatted. Why so much fuss over simple URL argument processing, you may ask, when there are bigger fish to fry (like an MVC system, or widgets, or continuations)? Well, I think that decent URL argument processing is important, since other things build on top of it. And the URL parser in Rails sucks, naturally. By not having up-front declarations of argument types, it leaves validity checking to the programmer, and just gives you strings rather than nicely processed integers/booleans/whatever. However, the next phase will be to enter into MVC terrain, with the definition of a core abstraction for a model, designed to encompass the "common case" of an SQL database as well as more unusual things... 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
