Encapsulation and GUIs

j_mckitrick j_mckitrick at bigfoot.com
Tue Jun 8 15:53:07 CEST 2004

I'm porting an app from tkinter to PyGTK, and I'm taking the
opportunity to refine the design.  For example, I have 3 dictionaries
of settings, or preferences, that are all adjusted in one dialog.

>From an encapsulation standpoint, am I better off extracting the
options from the dictionary, setting each to the dialog, then
gathering them all at the end and updating the options dictionaries? 
Or, is it better to pass dictionaries into the dialog, update them
there, then pass them back?

Option 1 obviously is more encapsulated, but option 2 seems more
extensible as I add options to the dictionaries.


More information about the Python-list mailing list