O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loose coupling

Whenever possible, reduce coupling or dependence in your program. The following is a famous quote on this subject:

All problems in computer science can be solved by another level of indirection.                                                                                                       – David Wheeler

Let's suppose that your program has a play button. An immediate impulse may be to link it to the play method of your program. However, you can further break it up into two methods. You could probably link the play button to a method named on_play_button_clicked, which in turn calls the actual play method. The advantage of this is that you may want to handle additional things when the play button is clicked, such as displaying ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required