[Seaside] Persistent object framework

Avi Bryant avi at beta4.com
Fri May 14 02:34:32 CEST 2004


On May 13, 2004, at 7:26 AM, Jason Dufair wrote:

> This does make sense.  But it seems a bit cumbersome.  Perhaps we could
> have a mechanism via the #addDependent: / #changed: mechanism that 
> could
> watch for changes and handle the index updating without the developer
> explicitly having to manage it.

Sure.  Since #changed calls #update: on its dependents, you wouldn't 
even have to change my proposed protocol.

> Even better, if we could somehow have a way to replace
>
> people := mgr findAll: Person where: #name is: 'John'.
>
> with something like
>
> people := Person store select: [:each | each name = 'John']
>
> and just have it "do the right thing", index-wise.  What do you think?

If we had a sophisticated enough index system that we could put 
arbitrarily complex boolean expressions in that block and it would come 
up with an optimal search strategy, then I'd be all for it.  Since 
we're talking about simple single-index queries, however, I'd 
personally rather keep the API honest and make it equally simple.  It's 
easier to tell when you're doing something slow that way.

Avi



More information about the Seaside mailing list