Bastian MŸüller | 3 Feb 02:55
Picon

Koala update

Hej,

as already discussed in #dylan, i'd like to put some effort
into koala. The changes include:

(1) Replace the simple URI handling with a mostly RFC 3986
     compliant URI library soon to be put into /libraries/.
     Currently, koala percent-decodes the whole URL, ie.
     destroys it.

(2) Replace the date handling in the logging functions with
     format-date.

(4) Create some macros that keep the URL <=> responder mappings
     at a central place. hannes suggested something like
     (including my ideas):

   define responders
     "/foo/" (regex)      // with argument-regex (see below)
     begin
       method1;           // several methods
       method2;
       method3
     end,
    "/bar/" (regex)
       method4,
    "/baz/" ()            // without argument-regex
       method5,
    "/blub",              // normal page-responder
       method6,
     ...

     where regex is an optional "argument-regex" for the URL
     that contains named groups that the responders get called
     with. Example:

"((?P<year>\d/)((?P<month>\d/)((?P<day>\d/)((?P<title>\w/)))))"

     My idea is, that normal responders stay as they are right now,
     and "prefix responders" become "regex responders".
     The argument-regex is optional and defaults to "(.*)", so
     that the behaviour for the former prefix responders stays.

     hannes also suggested a responder-definer like:

   define responder name (url) (arg-regexp) methodname end;

     I think we should remove the single responder-definer
     and have the mapping at a central place.

Please feel free to post your wishes and thoughts.

kind regards,
   Bastian
--

-- 
Gd-hackers mailing list
Gd-hackers <at> gwydiondylan.org
https://www.opendylan.org/mailman/listinfo/gd-hackers


Gmane