[Bese-devel] computed-class and ucw mop integraion
Attila Lendvai
attila.lendvai at gmail.com
Sun Dec 17 12:46:38 UTC 2006
dear list,
i've successfully integrated the two beforementioned mop's. there is a
little work left to make slots work as expected when they are both
:computed and :component at the same time.
but even in the current state i can create gui's with automatic
dataflow management (no need for listeners and alike anymore).
fyi, computed-class ( http://common-lisp.net/project/computed-class/ )
is a cells rewrite with an epmhasis on transparent clos integration.
the idea is that each ucw session has a separated computed universe in
which you can define various places as computed places (these are the
"cell"s). when such a cell is computed, the other cells used to
compute its value are recorded and stored as its dependency. whenever
something changes in the computed universe then cells are revalidated
and recomputed when next read.
to get a more concrete idea, the client-value of generic-html-input
should be such a cell and then you can just define some other internal
state as computed and simply specify how it's computed (which most
probably involves reading the client-value). when a callback (coming
from a submit of the browser) changes the client-value slot of a form
element then all other cells depending on it will be automatically
invalidated and recalculated when next read.
then you can just simply read slots in render and stuff will be
recalculated for you transparently. computed-class supports defcfun
and clet for more advanced magic and also customizes the slime
inspector to help dealing with computed-class instances.
a version in scheme with desktop gui:
http://www.cs.brown.edu/~sk/Publications/Papers/Published/ck-frtime/
a javascript variant: http://www.flapjax-lang.org/demos/
now, all we need is drewc's commit... :) i don't want to explore this
any further while the new repos are not up, because this is a great
example of a feature that should be in a plugin.
finally i've customized an appointment display, some of the code to
get a feel of it is available at:
http://paste.lisp.org/display/32688
--
- attila
"- The truth is that I've been too considerate, and so became
unintentionally cruel...
- I understand.
- No, you don't understand! We don't speak the same language!"
(Ingmar Bergman - Smultronstället)
More information about the bese-devel
mailing list