[Zope] Acquisition Madness

ender kthangavelu@earthlink.net
Thu, 21 Jun 2001 08:24:44 -0700


--------------Boundary-00=_8HDAKLPL9VZ1FR5746OB
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

i was trying to explain acquisition yesterday to some members of the LA ZUG 
(http://www.lazug.org), and consistently felt like i was shooting myself in 
the head.

so i spent some time this morning and played around with it and wrote up the 
attached, to try and explain acquisition to people. 

hopefully it will be useful to the zope community at large.

if there are any mistakes in it or anyone wants to comment, feel free to 
email me.

cheers

Kapil



--------------Boundary-00=_8HDAKLPL9VZ1FR5746OB
Content-Type: text/html;
  charset="iso-8859-1";
  name="acquisition.html"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="acquisition.html"

PGh0bWw+CjxoZWFkPgo8dGl0bGU+QWNxdWlzaXRvbiBNYWRuZXNzPC90aXRsZT4KPC9oZWFkPgo8
Ym9keSBiZ2NvbG9yPSIjRkZGRkZGIj4KPGgxPkFjcXVpc2l0b24gTWFkbmVzczwvaDE+CjxwPiAg
QWNxdWlzaXRpb24gaXMgYSBwb3dlcmZ1bCBjb25jZXB0IHdoaWNoIGJvaWxzIGRvd24gdG8gJ2Vu
dmlyb25tZW50YWwKICBpbmhlcml0YW5jZScgb3Igb2JqZWN0cyByZXRyaWV2aW5nIGF0dHJpYnV0
ZXMgZnJvbSB0aGVpciBlbnZpcm9ubWVudC48L3A+PHA+ICBFdmVuIGlmIHlvdSBuZXZlciB1c2Ug
QWNxdWlzaXRpb24gZXhwbGljaXRseSBpbiB5b3VyIG93biBQcm9kdWN0cyBvciAKICBkZXBlbmQg
b24gaXQgaW4geW91ciBTaXRlLCBoYXZpbmcgYSB3b3JraW5nIHVuZGVyc3RhbmRpbmcgb2Ygd2hh
dCBpdAogIGRvZXMgd2lsbCBoZWxwIHlvdSB1bmRlcnN0YW5kIHdoYXQgem9wZSBpdHNlbGYgZG9l
cy48L3A+PHA+ICBab3BlIHVzZXMgYWNxdWlzaXRpb24g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RlY2sgYW5kIGRlYWwgb3V0IGNhcmRzCgogICAgICAg
ICZndDsmZ3Q7IGEuYiA9IGIKICAgICAgICAmZ3Q7Jmd0OyBhLmIuZSA9IGUKICAgICAgICAmZ3Q7
Jmd0OyBhLmMgPSBjCiAgICAgICAgJmd0OyZndDsgYS5jLmQgPSBkCgogICAgICAgICZndDsmZ3Q7
ICMgcGxheSBiYWxsCgogICAgICAgICZndDsmZ3Q7IHByaW50IGEuaQogICAgICAgIDAKICAgICAg
ICAmZ3Q7Jmd0OyBwYXEoYSkKCiAgICAgICAgICAgYQoKICAgICAgICAmZ3Q7Jmd0OyBwcmludCBh
LmIuaQogICAgICAgIDAKCiAgICAgICAgJmd0OyZndDsgcGFxKGIpCgogICAgICAgICAgIGIKICAg
ICAgICAgICB8CiAgICAgICAgICAgYQoKICAgICAgICAmZ3Q7Jmd0OyBwcmludCBhLmMuaQogICAg
ICAgIDAKCiAgICAgICAgJmd0OyZndDsgcGFxKGEuYykKCiAgICAgICAgICAgYwogICAgICAgICAg
IHwKICAgICAgICAgICBhCgogICAgICAgICZndDsmZ3Q7IHByaW50IGEuYy5kLmkKICAgICAgICAw
CgogICAgICAgICZndDsmZ3Q7IHBhcShhLmMuZCkKCiAgICAgICAgICAgZAogICAgICAgICAgIHwg
CiAgICAgICAgICAgYwogICAgICAgICAgIHwKICAgICAgICAgICBBCgogICAgICAgICZndDsmZ3Q7
IHByaW50IGEuYy5iLmkKICAgICAgICAyCgogICAgICAgICZndDsmZ3Q7IHBhcShhLmMuYikKCiAg
ICAgICAgICAgKGIpCiAgICAgICAgICAgfCAgXAogICAgICAgIHwgICAgICBiCiAgICAgICAgfCAg
ICAgIHwKICAgICAgICB8ICAgICAgYQogICAgICAgICAgIHwKICAgICAgICAgICBiCiAgICAgICAg
ICAgfAogICAgICAgICAgIGMKICAgICAgICAgICB8CiAgICAgICAgICAgYQoKICAgICAgICAmZ3Q7
Jmd0OyBwcmludCBhLmIuYy5pCiAgICAgICAgMAogICAgICAgICZndDsmZ3Q7IHByaW50IGEuYy5i
LmQuaQogICAgICAgIDAKCiAgICAgICAgICAgZAogICAgICAgICAgIHwKICAgICAgICAgICAoYykK
ICAgICAgICAgICB8ICBcCiAgICAgICAgfCAgICAgIGMKICAgICAgICB8ICAgICAgfAogICAgICAg
IHwgICAgICBhCiAgICAgICAgICAgfAogICAgICAgICAgIGMKICAgICAgICAgICB8CiAgICAgICAg
ICAgYgogICAgICAgICAgIHwKICAgICAgICAgICBhCgogICAgICAgICZndDsmZ3Q7IHByaW50IGEu
Yi5jLmQuZS5pCiAgICAgICAgMgoKICAgICAgICAmZ3Q7Jmd0OyBwcmludCBhLmIuYy5kLmUuY29s
b3IKICAgICAgICAnYmx1ZScKCiAgICAgICAgJmd0OyZndDsgcGFxKGEuYi5jLmQuZSkKCiAgICAg
ICAgICAgKGUpCiAgICAgICAgICAgfCAgXAogICAgICAgIHwgICAgICAoZSkKICAgICAgICB8ICAg
ICAgfCAgXAogICAgICAgIHwgICB8ICAgICAgZQogICAgICAgIHwgICB8ICAgICAgfAogICAgICAg
IHwgICB8ICAgICAgYgogICAgICAgIHwgICB8ICAgICAgfAogICAgICAgIHwgICB8ICAgICAgYQog
ICAgICAgIHwgICAgICB8CiAgICAgICAgfCAgICAgIGUKICAgICAgICB8ICAgICAgfAogICAgICAg
IHwgICAgICAoYykKICAgICAgICB8ICAgICAgfCAgXAogICAgICAgIHwgICB8ICAgICAgYwogICAg
ICAgIHwgICB8ICAgICAgfAogICAgICAgIHwgICB8ICAgICAgYQogICAgICAgIHwgICAgICB8CiAg
ICAgICAgfCAgICAgIGMKICAgICAgICB8ICAgICAgfAogICAgICAgIHwgICAgICBiCiAgICAgICAg
fCAgICAgIHwKICAgICAgICB8ICAgICAgYQogICAgICAgICAgIHwKICAgICAgICAgICBlCiAgICAg
ICAgICAgfAogICAgICAgICAgIGQKICAgICAgICAgICB8CiAgICAgICAgICAgKGMpCiAgICAgICAg
ICAgfCAgXAogICAgICAgIHwgICAgIC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