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

Refactor classes to be more object oriented #2

Open
teekay opened this issue Jul 29, 2018 · 0 comments
Open

Refactor classes to be more object oriented #2

teekay opened this issue Jul 29, 2018 · 0 comments

Comments

@teekay
Copy link
Owner

teekay commented Jul 29, 2018

At this point, the code is procedural.

The goal is as follows:

  1. Separate Commands and Queries - the method either calculates, transforms, or otherwise provides a value, or does something that changes the state of the system.
  2. Break down monolothical classes that are doing too much into smaller, specialized ones.
  3. Favor readonly properties over read-write ones: wherever there's a read-write property, the class is just a "dumb" holder of data; instead, it should own its data and only provide them via methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant