Don’t ask whether you can do something, but how to do it.
In the previous chapter, we explained how to handle user interactions on widgets such as buttons and text editors. We illustrated this with a complete memory game; we did not particularly pay attention to how the responsibilities were spread across the various objects involved. In a small project, this doesn’t really matter. However, as soon as you want your project to grow, it can lead to complicated code that is difficult to evolve and maintain.
• Responsibilities: | ||
• Model View Presenter: | ||
• The Three Musketeers: |