[lispweb] Re: [Lispweb] Webactions in Portable AllegroServe
Ivan Toshkov
ivan at toshkov.org
Tue Apr 27 10:40:32 CDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 26 April 2004 19:58, Kevin Rosenberg wrote:
> Ivan Toshkov wrote:
> > SBCL. I had to tweak portableaserve a little, so that I can compile
> > and run webactions and I've included the patch to the latest CVS (as
> > of April 26, 2004).
>
> Thanks for the patch, I'll review it and can apply it to CVS.
Great! I've mechanically changed most of the occurrences of `excl' to
`acl-compat.excl' and overdid it. The attached patch fixes this.
>
> > So, anybody else tried webactions and want to share their experience?
>
> I use webactions with Allegro on for the Meme web site:
> http://meme.b9.com. It's worked out well for handling logins and
> transparently following pages. For example, to search on Meme requires
> a user to be logged in. So, my map entry for search is:
> ("search" action-check-login action-search "search.clp")
>
> With that, the user is prompted to logged in if they are not already
> logged in and then and the results of any pending searches are
> computed, then the result page is displayed. So, the action-check-login
> doesn't need to know where to direct after after the login is
> performed and the action-search can just assume that a there is valid
> user login for extracting the preferences of the user.
>
> Kevin
>
That's what made me try webactions in the first place. My problems come from
the view (CLP) part. For example, I'm getting hotel availability and want to
show it to the user. After realizing there is no loop in CLP I first used
HTMLGEN package. But with this I loose using Mozilla composer and the like.
So I've created things like dolist, dotimes, nth, slot-value, etc for CLP.
But they don't look that good, because you have to specify where to store the
result, if it's not directly suitable for display. E.g.:
<ext_dolist var="hotel" list="hotels" session>
body..
</ext_dolist>
binds the 'hotel' variable to the consequent values of 'hotels', and
<ext_nth var="hotel" list="hotels" n="hotidx" session/>
sets the value of 'hotel' to the 'hotidx'th element of 'hotels', all of which
are in the session object. Then, to access the 'info' slot, you have to do
this:
<ext_slot-value object="hotel" slot="info" package="hotels" session/>
Also, you basically have 3 global namespaces (session, request and query) and
no local variables, and I've also created a clp function to transfer values
between these 3 namespaces. The result is a very unlispy code.
I'm sure somebody (even I) can do better, but I'm wandering why these are not
accessible out of the box?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFAjn71uUkHlsKSHdcRAqOUAKCY0S2ZBkeJMs1d5Bk76N2HZjMeFgCdG/hy
O9IWzM/D/+qrUYhXmyZCcCk=
=OIhV
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: webactions1.patch
Type: text/x-diff
Size: 683 bytes
Desc: not available
Url : http://www.red-bean.com/pipermail/lispweb/attachments/20040427/ff66b692/webactions1.bin
More information about the lispweb
mailing list