hyperoslo / hyperoslo/iOS-playbook
View-models
- Dominant language
- No language data
- Stars
- 228
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Recently we had some discussions on pros and cons of introducing view-models. I still have some concerns and I'd love to have your feedback.
I do see the benefit of moving code out of the view controllers (a.k.a. "dumb view controllers"): unit/automated testing. I just don’t see why it should go to an extra layer (view-model) instead of going to an existing layer (model). To me “model” is more than just a “dumb” data storage: there is code (“business logic”?) which links the data we store to the UI where we show/the user manipulates it. This code should go somewhere. So far it was mostly the view controller which makes unit testing difficult (but not automated testing - that’s another story). Too bad. I just don’t see why it’d be better to add one more layer (more classes, more files). Simple is beautiful.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.