phetsims / axon

Axon provides powerful and concise models for interactive simulations, based on observable Properties and related patterns.
MIT License
11 stars 8 forks source link

Revist and revise the Property hierarchy #404

Open pixelzoom opened 2 years ago

pixelzoom commented 2 years ago

Model-View Controller (MVC) is the foundational pattern of PhET sims. "Property" is the foundation of PhET's MVC implementation. "Property" needs to be revisted, and likely revised.

The current Property hierachy was not designed, it has emerged. It is complex, and has gotten even more complex (and problematic) with PhET's switch to TypeScript. It's so complex that I don't have a complete picture of it in my head. That limits my ability to make daily decisions about assigning correct types to things, as well as making recommendations about how to generally improve things.

Based on conversations and meetings, I suspect that it's also confusing to other developers. In https://github.com/phetsims/chipper/issues/1281#issuecomment-1185933099 (Notes on bringing TS code up to the current standards) I said:

... Most of the confusion that I see in APIs tends to be related to the "Property" hierachy ...

This will be a big piece of work, definitely a quarterly epic.

zepumph commented 2 years ago

Is this a duplicate of https://github.com/phetsims/axon/issues/343?