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

Convention for naming model-element classes #70

Closed
pixelzoom opened this issue Jun 28, 2022 · 3 comments
Closed

Convention for naming model-element classes #70

pixelzoom opened this issue Jun 28, 2022 · 3 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Jun 28, 2022

For code review #41 ...

PhET convention does not typically use the suffix "Model" for naming model-element classes. So recommended to rename:

  • PipeModel => Pipe
  • WaterCupModel => WaterCup

IntroModel is fine, since it is PhET convention to name the top-level model "container" with a "Model" suffix.

@pixelzoom
Copy link
Contributor Author

Be careful to preserve git history when renaming files. WebStorm/git can be a bit unpredictable about how it handles renames.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jun 28, 2022

Also by convention, parameters and fields of type PipeModel and WaterCupModel should be renamed. For example, in WaterCup2DNode.ts:

-  private readonly waterCupModel: WaterCupModel;
+  private readonly waterCup: WaterCup;

marlitas added a commit that referenced this issue Jul 19, 2022
marlitas added a commit that referenced this issue Jul 19, 2022
marlitas added a commit that referenced this issue Jul 19, 2022
marlitas added a commit that referenced this issue Jul 19, 2022
@marlitas
Copy link
Contributor

Models renamed. Closing.

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