mrhangz / Survey

0 stars 0 forks source link

Code review #34

Open peepo3663 opened 7 years ago

peepo3663 commented 7 years ago

Singleton and non-singleton elements Pods inherit! :search_paths no benefit at all

Every Viewmodels why had network manager and token manager, separate it. 
Manager should do it own not rely on a ViewModel class. (That why loading images are slow) A token manager also.

Token manager should recheck token expired by manager and attached to network manager https header automatically Should not check when occurring error

Wrap and unwrap properties sometimes are not safe in a lot of places

Delegates can be weak in many places

Models class could be improved in model mapping chain (for e.g. Questions and Answers mapping in Survey model).

Could use guard let instead of checking object != nil to cleaner code

Encapsulated in properties should be better

mrhangz commented 7 years ago

Thank you for the reviews. I'm refactoring the code. Will submit new PR tomorrow.

mrhangz commented 7 years ago

PR submitted https://github.com/mrhangz/Survey/pull/35