[Seaside] Using Dynamic Bindings in Seaside rendering

Cees de Groot cg at cdegroot.com
Mon May 12 09:58:37 CEST 2003


On Mon, 2003-05-12 at 05:33, Stephen Pair wrote:
> Besides, if you take this approach in Squeak, the debugger won't work at 
> all with it (since the debugger uses a different process for debugging).
> 
I noticed that :-). OmniBase uses the same method (a bit different
variation, a class-side dictionary keyed on process) to keep a tab on
the 'current' transaction, so under Squeak, you cannot debug processes
that access the current transaction.

Normally, certainly for web processing, I'd say forget about these
special cases and keep the simple thing - you're theoretically right,
but all the web/app servers I know assign a request to a thread/process
and keep that assignment for the duration of the request. However, with
Seaside being such an eminently good example of the usefulness of being
able to separate stack and process, I'm not so sure anymore ;-).

> And a ProcessEnvironment has this who knows what stack the process might 
> be running trickiness.
You'll have to admit here that that's almost always a simple 1:1 mapping
that doesn't chance.

>   Saying that dynamic bindings are tricky is like 
> saying that exception handling is tricky (an exception handler is a 
> dynamic binding after all)...
Exception handlers *are* tricky. That's why a lot of people don't like
them, and use them only for exceptional circumstances, grudgingly...

> they are tricky, until you understand them 
> and know when it is appropriate to use them, and when it is not.  I'd 
> recommend that you have another look at dynamic bindings.
> 
Oh, I understand them enough to decide on their appropriateness and
judge the dangers. That's why I want to make sure that it really is the
best option in this case which involves checking off some 'known good'
alternatives. I'm happy with the solution as long as it is the best one.

(somewhere back in my head this Squeak-E project is still using spare
braincycles. Currently, a dim red question mark is flashing right behind
the question "yes, but by dynamic bindings you can influence
computations that go on lower in the stack - isn't that a security
risk?")





More information about the Seaside mailing list