Quote Originally Posted by anda_skoa View Post
If that code then discovers that there is no know filename yet, it somehow has to ask the UI to ask the user for one.
I think it should return information to the UI that it can't save the file because of a missing filename, the UI should ask the user for the filename and then call the save routine again. Or the logic should explicitly offer the filename to the UI and the UI should first check if it is valid or not and then call the saving routine. Doing what you suggest if of course possible and acceptable and I would probably do that myself in many cases however in theory I would still consider it bad design because of two direction coupling of components (UI had to know about logic and logic has to know about UI).