I have inherited a application framework from the previous developer where I now work. This framework utilizes multiple parent/child relationships. In many instances parent/parent/child occur. I asked why he WASN'T using MDI and he stated that years ago, when he had started, MDI had major shortcomings concerning the previously stated relationship scenarios. Particularly with the multiple Parents.
My actual questions are; Does MDI still have these shortcomings? & Those of you who have worked with MDI, what problems did you have and how did you overcome them?
Thank You!
One problem with MDI interfaces is that you can't register unlimited Window's within your MDI Containers anyway (see This Microsoft KB item). Thought i posted that up because i've seen many MDI applications hit that error when its heavily used.
I generally like an SDI Interface and make it share the same controls and windows over multiple instances of 'something' instead of spawning a new Window for each instance of 'something'.
I dont know the specifics of the programs interface but i've yet to find something that couldnt be reworked to an SDI interface and some modal dialogs (if really needed).
I really think it's a shortcoming of the app you've inherited that it requires the multiple parents (hello tightly coupled app!).
I once worked on an app (knock on wood that I won't have to go back to supporting it anytime soon) that was coupled probably a lot like yours is now. Had the original author simply used delegates instead of "this.Parent.Parent.Parent.functionX" we may have been able to make greater strides in fixing that app's shortcomings (and delegates may not have even been the way to go...).
As for MDI, I prefer it personally but I can't speak for the shortcomings your original developer found because I try to design around having the relationships he/she needed.
surely all MDI is, is a way of containing in one place all the windows of an application in one clearly identified area of the screen. Now if your app is an application whereby it has multiple documents and people use it and wish to "put" it away when it is not in use then MDI is probably for you. If not then no it isn't.
Tony
I have certainly seen some glitches in MDI at times, but to be honest I would probably suggest looking at WPF instead of winforms if you want something complex.
It sounds like I need to investigate MDI a little further. I am curious about the WPF comment as that would be contrary to what I have been taught so far.
Also, a point of interest, the frameworks developer calls his architecture HDI (Host Document Interface).
Thanks!
When you open a modeless child screen, and your parent screen is maximised, you can only open the child screen in maximised size, you can not open it as normal sized screen.