on previous questions answered on previous pages.
When I started
to model
this with Magaritte, I quickly hit some roadblocks trying to
implement the
dynamic "descriptionFoo" since these are (a) cached and (b) have no
access to
"self" since they are class-side. So I've managed to come up with
something
that sorta works instance-side, but I'm not very happy with it, as
I wonder
for example how many times "myModel description" will be called
during a
render, and whether I should try to cache that.
It is perfectly fine to override #description on the instance-side
and return a dynamically composed object depending on the state of
self (or the current context, whatever).
While rendering the component keeps a reference onto the returned
description, so #description should only be called once. However
calling #description is usually not a bottleneck, only when
traversing a huge graph of thousands of objects you will find a
measurable speedup when using the cached descriptions.
Does anyone have some examples of how to do things
like a basic
"gather info
from a multipage query, some of which depends on earlier answers"
task would
work and look like?
Sounds like an interesting design problem.
Do you need the model to be adaptive, so that end users can define
questions and model the flow on the fly? Or are the questions and
flow hard-coded?
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch