|
One makes a project modular for the programmer(s) and for efficiency. I'm not one of those who thinks every function should be in a separate file, but a file should be relatively comprehensible in its entirety.
For large programs (I imagine my idea of a large program is a little different from the average member's), incorporating changes is faster if source files are smaller. One only has to compile those files that have been changed, then relink.
One might consider the GUI to be a single piece, but that isn't necessarily the case. The code that represents the action for some event may have no relationship to that for another event. Code for generation a report, for instance, should not be in the same file as code for ramping up the motor speed according to some rate curve. Both, however, interface to the GUI for input and output/display.
As for GUI programming being a pain in the ass, I disagree. Try making a really slick and easy to use console app for something other than a trivial hobby-type program.
|