Use cases

MVC is a very generic and useful design pattern. In fact, all popular Web frameworks (Django, Rails, and Yii) and application frameworks (iPhone SDK, Android, and QT) make use of MVC or a variation of it (Model-View-Adapter (MVA), Model-View-Presenter (MVP), and so forth). However, even if we don't use any of these frameworks, it makes sense to implement the pattern on our own because of the benefits it provides, which are as follows:

  • The separation between the view and model allows graphics designers to focus on the UI part and programmers to focus on development, without interfering with each other.
  • Because of the loose coupling between the view and model, each part can be modified/extended without affecting the other. For example, adding ...

Get Mastering Python Design Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.