ajvincent / es-membrane

An ECMAScript implementation of a Membrane, allowing users to dynamically hide, override, or extend objects in JavaScript with controlled effects on the original objects.
ISC License
109 stars 13 forks source link

Definitions and namings for more complex distortions #190

Open ajvincent opened 5 years ago

ajvincent commented 5 years ago

@tvcutsem, @erights, I need some help defining a couple additional concepts.

This is a natural expansion of membranes we haven't considered (or formally defined) yet. Suppose we have a collection of three object graphs:

  1. The "wet" object graph has <div id="branch0"><child1/><child2/><child3/></div>.
  2. The "dry" object graph has <div id="branch0">&children;<child3/></div>.
  3. The "damp" object graph mirrors / tracks the "dry" object graph.

This would be a membrane with two types of special distortions between wet and dry.

One type breaks the perfect mirroring we expect, but in the packed arrays of the childNodes property of the branch0 element. I really don't have a name for this type of distortion yet. Collection distortions, perhaps? (For the purposes of this ticket, let's call these "type alpha" distortions until we come up with a better name.) This definition is critical to the 0.10 milestone.

The other type has an object graph of proxies reacting to another object graph of proxies instead of the origin graph. This is a willful violation, Mark, of the part of our shared talk where Bob shouldn't see Alice's expandos, (slide 16) - specifically, we want Bob to see those expandos, but not have a direct connection to the original object. I don't have a name for this type of distortion, either. Indirect distortions? Multi-level distortions? Non-origin distortions? (For the purposes of this ticket, let's call these "type beta" distortions until we come up with a better name.)

This should be a part of the illustrations & documentation around membranes.

ajvincent commented 5 years ago

"Type beta" also brings up the risk of circular references, if we're not careful.

cliveb commented 5 years ago

@ajvincent "attenuated", "thin" or "reduced" object graph?
From recap of Sophia Drossopoulou's research talk at Splash (site slow to load in Singapore) http://clive.tries.fed.wiki/view/capabilities-based-dom

ajvincent commented 5 years ago

@cliveb I'm not seeing the connection... but then again, I'm not seeing the talk either. So I need more background.

cliveb commented 5 years ago

@ajvincent On second thoughts, SophiaD is dealing with authority attenuation in the DOM. I jumped the gun attempting to give input because you are defining es-membrane special distortions between wet and dry types analogous to patterns in synthetic membranes. I now think "type alpha" and "type beta" are familiar to readers in the es-domain. I don't see better names from artificial cells. https://en.wikipedia.org/wiki/Artificial_cell#Encapsulated_cell
authority-attenutation-in-the-dom

ajvincent commented 5 years ago

We're going to call "type alpha" distortions as "collection distortions".

ajvincent commented 5 years ago

Darya and I are suggesting the name "over-the-shoulder distortions" for type beta. The model is instead of Alice and Bob being totally isolated from each other, Bob is looking over Alice's shoulder at the same objects, and thus Bob is explicitly privileged to have access to Alice's distortions.

Alice's distortions and proxy act in between Bob's distortions and proxy, and the original underlying object.

ajvincent commented 5 years ago

I think a better name for type beta would be "interposing distortions". We're directing the membrane to interpose Alice between Bob and the original object.

cliveb commented 5 years ago

"interposing distortions" ties to the nomenclature in Tom Van Cutsem's work that I discovered via image search. Looks good, although I still wish for simpler such as wrap-up, unwrapped, alas simpler may not without inventing new words.