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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.