Interesting article. Do you think it’s better (clearer, cleaner, etc) to have 2 separate activate and deactivate methods or one method updateStatus that takes a boolean argument?
activate
deactivate
updateStatus
Hello Doaa,
Yes, that would be in line with what I'm recommending in this article.
Yes, I prefer activate and deactivate. It's no setting boolean only. You may propagate this state into dependencies.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Interesting article. Do you think it’s better (clearer, cleaner, etc) to have 2 separate
activate
anddeactivate
methods or one methodupdateStatus
that takes a boolean argument?Hello Doaa,
Yes, that would be in line with what I'm recommending in this article.
Yes, I prefer
activate
anddeactivate
. It's no setting boolean only. You may propagate this state into dependencies.