vendredi 26 avril 2019

Ownership responsibility and reusability

I had a disscusion with a collegue about approaches to these topics in our project. Im making a Progress System, in short a ProgressMonitor class and a Task class, ProgressMonitor handles an array of tasks. All pretty straight forward stuff. But when it came to the tasks ui, we had to opinions. Each task has his own UI. We agree we should have an HUD class for handling UI. The difference in opinion is, he wants the HUD to handle each specific task's UI and so the HUD class would grow quite big and the task would have near to no logic about its UI. My opinion, The HUD would only handle the logic that is the same for all things in our project that need UI's, and all specific logic is handle by the objects that need UI. Advantage of his is some ownership (objects that need to acces some ui info can easily get it from HUD) My advantages, HUD stay light clean and reusable.

What would be more correct acording to OOP?

Aucun commentaire:

Enregistrer un commentaire