[Seaside-dev] Configurable current request context variable

Esteban A. Maringolo emaringolo at gmail.com
Wed May 10 17:55:38 UTC 2017


What are the benefits of an exception based dynamic variable versus a
process variable?

It seems to me that the process variable is "cleaner" since it doesn't
require any exception handler.

I'm currently doing Seaside in Cincom Smalltalk and I confirm the
Process object has an `environment` variable that holds a dictionary
(and can fallback lookup to a global ProcessEnvironment singleton).

What I don't understand is how would the subclassing work.
If WADynamicVariable is suposed to subclass GRDynamicVariable how
would the platform specific classes play here?

Regards!

Esteban A. Maringolo


2017-05-10 14:16 GMT-03:00 Max Leske <maxleske at gmail.com>:
> Good news: VA doesn't have dynamic variables either but their process also has an environment (called #attributes). If there's no other platform to look out for, we could simply replicate the DynamicVariable behaviour for each platform without depending on DynamicVariable. There would only be
>
> GRDynamicVariable
> ^
> |
> WAPharoDynamicVariable / WAVWDynamicVariable / WAVADynamicVariable
>
> They would only differ in the name of the environment and possibly lookup semantics and GRDynamicVariable could hold all of the logic (it would mostly be a copy of DynamicVariable).
>
> Of course, we could also offer the choice between the exception based and process based variants.
>
> What do you think?
>
> Cheers,
> Max
>
>
>
>> On 10 May 2017, at 16:44, Philippe Marschall <philippe.marschall at gmail.com> wrote:
>>
>> On Mon, May 8, 2017 at 8:57 AM, Max Leske <maxleske at gmail.com> wrote:
>>>
>>>> On 7 May 2017, at 23:09, Philippe Marschall <philippe.marschall at gmail.com> wrote:
>>>> In theory we could say that the dialect has to provide a
>>>> GRDynamicVariable, we could provide a GRExceptionBasedDynamicVariable.
>>>> Dialects that have a DynamicVariable class could provide
>>>> GRDynamicVariable as a subclass of DynamicVariable. Dialects that do
>>>> not have a DynamicVariable class could provide GRDynamicVariable as a
>>>> subclass of GRExceptionBasedDynamicVariable.
>>>
>>> Yes, that sounds like a good idea. I don't have a clear picture of how your suggestion would be implemented with Grease. So if you could help me out there, I'd appreciated it.
>>
>> It would be sort of a kludge
>>
>> In Pharo we would have
>>
>> DynamicVariable (Pharo)
>> ^
>> I
>> GRDynamicVariable (Grease-Pharo-Core)
>> ^
>> I
>> WADynamicVariable (Seaside-Core)
>>
>> In a dialect without dynamic variables we would have
>>
>> Notification (Dialect)
>> ^
>> I
>> GRExceptionBasedDynamicVariable (Grease-Core)
>> ^
>> I
>> GRDynamicVariable (Grease-Dialect-Core)
>> ^
>> I
>> WADynamicVariable (Seaside-Core)
>>
>>
>> Cheers
>> Philippe
>> _______________________________________________
>> seaside-dev mailing list
>> seaside-dev at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


More information about the seaside-dev mailing list