# Design Patterns by Tutorials: MVVM

**URL:** <https://forums.kodeco.com/t/design-patterns-by-tutorials-mvvm/41939>\
**Category:** 🎓 Courses & Articles\
**Created:** [April 25, 2018, 4:08pm UTC](https://forums.kodeco.com/t/design-patterns-by-tutorials-mvvm/41939 "2018-04-25T16:08:38Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![jstrawn](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jstrawn/32/104245_2.png) [@jstrawn](https://forums.kodeco.com/u/jstrawn)\
**Post date:** [October 30, 2018, 3:27pm UTC](https://forums.kodeco.com/t/design-patterns-by-tutorials-mvvm/41939/9 "2018-10-30T15:27:01Z")

</div>

Hi Jabson,  
Let me know if this thread helps:

> [@Rating switch in MVVM chapter](https://forums.kodeco.com/t/rating-switch-in-mvvm-chapter/45623):
>
> Why is the switch on rating done in the view controller instead of the view model? My understanding is that ViewModels should do these sorts of transformations. Or am I mistaken?

You’re correct to think we should do it in a view model or somewhere else besides the viewcontroller. In the chapter after this we use the factory pattern to switch these images, so for tutorial purposes we leave it in the viewcontroller to minimize the amount of refactoring you as the reader have to do. 🙂

---

_[View the full topic](https://forums.kodeco.com/t/design-patterns-by-tutorials-mvvm/41939)._
