[Tutor] Any Suggestions?
Magnus Lycka
magnus@thinkware.se
Tue Nov 19 04:30:42 2002
At 19:38 2002-11-18 -0500, Mark Brown wrote:
>Alan,
>Thanks for the suggestions. I'd found the runit.py program somewhere on
>the web and used it to learn import, class and Tkinter so that's why it
>was split into two programs. I was trying to separate the GUI and the
>main program logic so that once the Tk GUI was working then would work
>on a wxWindows GUI interface. I'm considering changing the direction of
>the importing. Currently the main program imports the Tk GUI but do you
>think it should be reversed?
Logically, it's typically the GUI that depends on the
underlying logic, while the logic could be utilized in
a non-GUI context, maybe in a CGI-script, or as a
library module in some larger program.
Also, automated unit tests are always a good thing, and
they are much more complicated to do with a GUI.
Thus. I try to keep my logic independent from any user
interface code (be it GUI, Web UI or anything else) and
to make a thin GUI layer that imports the logic.
--
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se