Global Variables and Good Software Engineering

Just a quick note on the method behind the madness here. Purists will deride my hack above (making the top-level window widgets global in scope), and technically speaking, they would be correct. It is probably more correct to tightly hide all widgets and pass them around as parameters to functions; however, I have my reasons for the method I have chosen, and it has to do with hard-learned lessons from several IT shops I have worked in.

First and foremost, I believe code should have longevity, which in my opinion means it will probably have to change in the future. Some of the studies on software development indicate that the sum total of work performed to get a version 1 product out the door will ...

Get MySQL Building User Interfaces 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.