Python4Kids New Tutorial: A Different View on Our Chess Model

Ideally, if the model, view and controller are all separated, designing and coding your application will be easier as it grows. It also allows you to vary these parts independently of each other. It is not at all unusual to want to update the look and feel of a program, without changing the underlying data on which it relies. However, if the view is entangled with the model (that is, the data), you need to understand both the view and the model before you start changing the view – it will all end in tears. If something is data (eg if it would be something you might want to write to a save file), you should put it in the model. If it has to do with what the user sees, put it in the view. Everything else (and this should just be coordination between the model and the view), put in the controller.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis