adilanchian / Mocklook

iOS Engineer Challenge for Outlook iOS Mobile Team!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class Design: Separation of logic

adilanchian opened this issue · comments

Feedback: "Separation of logical unit of work can also be improved. For example, the mock data should not be part of the same class as the manager that provides the data. The mock data should have been added as a data source to the manager, this way we can always plug in a real data source without changing any code."

  • Be as modular as possible. If you see that logic of a certain unit is being intertwined, take a step back and modularize them.

I went ahead and separated the random appointments generation logic into a separate class that acts as a datasource. I then reworked the appointment manager logic.

I believe I have finished with this task and am ready to merge into merge-review