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,
(Continue reading)

Bastian M?üller | 5 Feb 12:54
Picon

Re: Koala update

Bastian Mueller wrote:

Hej,

> (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.
That's almost finished, adding and finding responders works again.

> 
> (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,
>      ...
> 
(Continue reading)

Hannes Mehnert | 5 Feb 18:53

Re: Koala update


Hi,

Bastian M?üller wrote:
>> (4) Create some macros that keep the URL <=> responder mappings
>>      at a central place.
>
> New proposal:
> 
> define responders
>    "/foo/"
>       (argument-regex1) => foo-argument-responder1,
>       (argument-regex1) => begin
>         foo-argument-method1;
>         foo-argument-method2;
>       end;
>    "/baz" () => baz-responder;       // without argument-regex
>    "/blub" => blub-responder;        // normal page-responder
>    ...
> 
> As there are still no comments, I'd like to encourge anyone who's
> working on/with koala to to post his wishes and thoughts.

I like the system Allegro Webactions
[http://opensource.franz.com/aserve/aserve-dist/webactions/doc/webactions.html]
has:
 (("main" "main.clp")
  ("signin" action-sign-in)
  ("choice"   action-check-login "choice.clp")
  ("vote"     action-check-login action-vote)
(Continue reading)

Bastian M?üller | 7 Feb 20:16
Picon

Re: Koala update

Hannes Mehnert wrote:

Hej,

> Bastian M?üller wrote:
>>> (4) Create some macros that keep the URL <=> responder mappings
>>>      at a central place.
>> New proposal:
> 
>> define responders
>>    "/foo/"
>>       (argument-regex1) => foo-argument-responder1,
>>       (argument-regex1) => begin
>>         foo-argument-method1;
>>         foo-argument-method2;
>>       end;
>>    "/baz" () => baz-responder;       // without argument-regex
>>    "/blub" => blub-responder;        // normal page-responder
>>    ...
> 
>> As there are still no comments, I'd like to encourge anyone who's
>> working on/with koala to to post his wishes and thoughts.
> 
> I like the system Allegro Webactions
> [http://opensource.franz.com/aserve/aserve-dist/webactions/doc/webactions.html]
> has:
>  (("main" "main.clp")
>   ("signin" action-sign-in)
>   ("choice"   action-check-login "choice.clp")
>   ("vote"     action-check-login action-vote)
(Continue reading)

Hannes Mehnert | 7 Feb 20:22

Re: Koala update


Bastian M?üller wrote:
> Hannes Mehnert wrote:
>  > It is quite common that some parts are only accessible after a
>  > successful authentication, that's why I would like to have the
>  > possibility to express this directly in the map. So, my current
>  > proposal for the macro would be:
> 
> I understand what you mean and that's a good feature we should have, but 
>   the suggested "chain"-approach isn't perfect. What happens if an 
> action returns false? The action chain stops and then the user gets a 
> blank page. Maybe replacing the action sequence with normal control flow 
> statements is a better solution,
> 
>> define url-map
>>   "/foo" ("\w/\w/\w") => bind-arguments; "foo.dsp",
>> 	 ("") => "foo.dsp";
>>   "/bar" ("\d/\d/\w") => authenticated-user?; bind-arguments; "bar.dsp";
>>   "/foobar" () => admin-user?; foobar-responder;
>>   "/barfoo" () => "barfoo.dsp";
>> end;
> 
> "/foobar" () => if (admin-user?) foo-bar-responder else 
> not-authenticated-responder end;

Actually, rethinking the authentication, I currently prefer that
admin-user? should signal an error (with not-authenticated-error or
similar) if the current logged in user is not an admin. So, no need for
if then else or to check whether a method returned #f.

(Continue reading)

Bastian M?üller | 7 Feb 22:41
Picon

Re: Koala update

Hannes Mehnert wrote:
> Bastian M?üller wrote:
>> Hannes Mehnert wrote:

Hej,

>>  > It is quite common that some parts are only accessible after a
>>  > successful authentication, that's why I would like to have the
>>  > possibility to express this directly in the map. So, my current
>>  > proposal for the macro would be:
> 
>> I understand what you mean and that's a good feature we should have, but 
>>   the suggested "chain"-approach isn't perfect. What happens if an 
>> action returns false? The action chain stops and then the user gets a 
>> blank page. Maybe replacing the action sequence with normal control flow 
>> statements is a better solution,
> 
>>> define url-map
>>>   "/foo" ("\w/\w/\w") => bind-arguments; "foo.dsp",
>>> 	 ("") => "foo.dsp";
>>>   "/bar" ("\d/\d/\w") => authenticated-user?; bind-arguments; "bar.dsp";
>>>   "/foobar" () => admin-user?; foobar-responder;
>>>   "/barfoo" () => "barfoo.dsp";
>>> end;
>> "/foobar" () => if (admin-user?) foo-bar-responder else 
>> not-authenticated-responder end;
> 
> Actually, rethinking the authentication, I currently prefer that
> admin-user? should signal an error (with not-authenticated-error or
> similar) if the current logged in user is not an admin. So, no need for
(Continue reading)

Carl Gay | 9 Feb 20:03
Picon

Re: Koala update

On Feb 7, 2008 2:16 PM, Bastian M?üller <turbo24prg <at> web.de> wrote:
> Hannes Mehnert wrote:
> > Bastian M?üller wrote:
> >>> (4) Create some macros that keep the URL <=> responder mappings
> >>>      at a central place.
> >> New proposal:
> >
> >> define responders
> >>    "/foo/"
> >>       (argument-regex1) => foo-argument-responder1,
> >>       (argument-regex1) => begin
> >>         foo-argument-method1;
> >>         foo-argument-method2;
> >>       end;
> >>    "/baz" () => baz-responder;       // without argument-regex
> >>    "/blub" => blub-responder;        // normal page-responder
> >>    ...
w> >
> >> As there are still no comments, I'd like to encourge anyone who's
> >> working on/with koala to to post his wishes and thoughts.
> >
> > I like the system Allegro Webactions
> > [http://opensource.franz.com/aserve/aserve-dist/webactions/doc/webactions.html]
> > has:
> >  (("main" "main.clp")
> >   ("signin" action-sign-in)
> >   ("choice"   action-check-login "choice.clp")
> >   ("vote"     action-check-login action-vote)
> >   ("thanks"   action-check-login "thanks.clp")))
> >
(Continue reading)

Bastian M?üller | 9 Feb 21:34
Picon

Re: Koala update

Carl Gay wrote:

Hej,

> On Feb 7, 2008 2:16 PM, Bastian M?üller <turbo24prg <at> web.de> wrote:
>> Hannes Mehnert wrote:
>>> Bastian M?üller wrote:
>>>>> (4) Create some macros that keep the URL <=> responder mappings
>>>>>      at a central place.
>>>> New proposal:
>>>> define responders
>>>>    "/foo/"
>>>>       (argument-regex1) => foo-argument-responder1,
>>>>       (argument-regex1) => begin
>>>>         foo-argument-method1;
>>>>         foo-argument-method2;
>>>>       end;
>>>>    "/baz" () => baz-responder;       // without argument-regex
>>>>    "/blub" => blub-responder;        // normal page-responder
>>>>    ...
> w> >
>>>> As there are still no comments, I'd like to encourge anyone who's
>>>> working on/with koala to to post his wishes and thoughts.
>>> I like the system Allegro Webactions
>>> [http://opensource.franz.com/aserve/aserve-dist/webactions/doc/webactions.html]
>>> has:
>>>  (("main" "main.clp")
>>>   ("signin" action-sign-in)
>>>   ("choice"   action-check-login "choice.clp")
>>>   ("vote"     action-check-login action-vote)
(Continue reading)


Gmane