Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revist and revise the Property hierarchy #404

Open
pixelzoom opened this issue Jul 21, 2022 · 1 comment
Open

Revist and revise the Property hierarchy #404

pixelzoom opened this issue Jul 21, 2022 · 1 comment

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 21, 2022

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 phetsims/chipper#1281 (comment) (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 ...

  • Form a subteam, identify the lead.
  • Identify the classes, type aliases, etc. involved in the current implementation. Draw a diagram of how they relate (hierarchy and composition). Share this with the dev team.
  • Enumerate problems with the current implementation. Proritize. Identify what to address through type-checking, what to address via assertions, etc.
  • Design a better Property hierarchy. Draw a new diagram. Share with the team for discussion. Iterate on the design.
  • Implement the new design.

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

@pixelzoom pixelzoom changed the title Revist the Property hierarchy Revist and revise the Property hierarchy Jul 21, 2022
@zepumph
Copy link
Member

zepumph commented Aug 4, 2022

Is this a duplicate of #343?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants