iOS Design Patterns - Part 4: MVVM | Ray Wenderlich

Why? ;]

Of all the patterns covered in this series, I found MVVM is implemented the most differently from developer to developer… and that’s okay.

Personally, I have very few “never do this mantras” in development.

In my experience, there is usually not a “best” solution to most development problems… and trying to find “the best one” is often just a waste of time.

There are a lot of good solutions, however, and a lot of bad solutions too… The trick is knowing the difference. :]

How can you tell good from bad solutions?

When I’m not sure about whether or not a design pattern (or specific implementation thereof) is right for a problem, I run it through the SOLID principles and see if it breaks any that I’m uncomfortable about or anticipate will cause big problems later…

If you’re not familiar with SOLID, I highly recommend reading Clean Code: A Handbook of Agile Software Craftsmanship.

Honestly, without these guiding principles, I’d be pretty lost in development… and from my experience, most developers that don’t know them struggle a lot more in day to day development.

:]