[Bese-devel] entry points other than index.ucw

Marco Baringer mb at bese.it
Tue Dec 21 16:07:14 UTC 2004


Chris Capel <pdf23ds at gmail.com> writes:

>> yeah, that's probably the best solution for now. what i'd like,
>> eventually, is to allow each component to chose what the links it (or
>> a nested component) generate. this will require a component
>> dependency protocol (ala clim's grafting/adopting protocol), which
>> still requires some thought.
>
> I've been thinking about this too. Ideally, there would be a way to
> allow an application to encode its backtracking slots into a URL like
> "myapp.ucw/slot1val/slot2val" and so on. And then, only when the user
> took an action which required some sort of continuations would the
> session information be included (possibly in a cookie, leaving the URL
> nice and pristine). So you can mix REST and continuation approaches
> freely. Is something along these lines what you're thinking of?

not directly, but you could do that with what i'm thinking of (tell me
if this sounds too complex).

i'm going to add two generic functions: parent (given a component
return its parent component) and active-children (given a component
returns the list of components which it will render on the next call
to render-en).

we will have a new method called compute-url which, given a component
and an action-id, should return a uri object which will be used in
forms and anchor tags (the uri class is also new). compute-url is
implemented in terms of another generic function called
update-url. update-url takes a component and a uri and does whatever
it wants to the uri. update-url is called in parent first order so the
"closest" component to the call to <ucw:a can override anything its
parents have done.

this means that you could, by definig the right entry-points and the
"right" compute-url and update-url, methods create either wiki style
links, REST style links, the with backtracking urls you mentioned
above (excellent idea), or anything else you wanted. that's the idea
at least, i'm working on this now and we'll see if in practice it
turns out as nice as it sounds.

> Chris Capel
> -- 
> "What is it like to be a bat? What is it like to bat a bee? What is it
> like to be a bee being batted? What is it like to be a batted bee?"
> -- The Mind's I (Hofstadter, Dennet)

this has been stuck in my head all f'cking day :)

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
     -Leonard Cohen



More information about the bese-devel mailing list