[Q] DependentsArray has weakreferences

Diego Gomez Deck DiegoGomezDeck at ConsultAr.com
Sun Mar 10 11:36:30 UTC 2002


Hello again...

[snip]
>> The "view here" is an Proxy that knows how to send a message 
>> to the other side.  The framework doesn't have strong 
>> references to the proxies (only weak references to use the 
>> same instance for the same remote object, so you have a type 
>> of identity in the local image)
>
>Interesting. But shouldn't the framework hold a strong pointer to the
>proxy and the proxy a weak pointer to the model? If I understand you
>correctly than this would model your dependencies much better. If the
>model goes away then the proxy can be destroyed on the client side. If
>not, then it can only be destroyed via a remote message.

The framework knows nothing how the objects are used... only pass remote-references to object that pass by-reference and copies for the other objects.  The remote-references objects (proxies) send every message that receives to the other side, more or less thats all (there are a gc work, but it's not relevant for this discussion)... When you receive a remote-refence (proxy) object you don't realize it, after all you only want to send messages.

Let's see the example for a remote-model, local-view use:

| remoteObject localView |
remoteObject := SomeWayToGetARemoteReference. "by name or executing a method in prior remote reference"

localView := SomeLocalView on: remoteObject. "the view will send 'self model: remoteObject' in some moment and it'll wait for #update: messages "

localView openInWorld. "or some other way to open the view"

One the the most important goals of rST is transparency... the View don't need to realize that the model is remote or local.

[snip]
>Cheers,
>  - Andreas


Diego Gomez Deck




More information about the Squeak-dev mailing list