Hi, I've a small question here. Do I need to implement a mediator in a dialog box with just a couple of components. I didn't implement any design pattern in my dialog compared to a MVC with mediator for the Client GUI as I find there is not much of a need. I just add the listener accordingly to needs. Is using design pattern an absolute necessary? Or, will anyone be penalized for not using it? Thanks for any comments. Cheers.
Well, that is a big depends. Meaning what is the benefits of MVC. Lets see, Extensibility, Flexibilty, Maintainability, and easy to read. OK. stating that, your code is not wrong, it is just a matter of looking at it and determining if the above benefits of MVC, is better, and might meet more of the requirements of the assignment. So, then I would ask to you, what is your opinion on that? Now, having said all that, no you don't need it for a Dialog Box, actually if you use the JOptionPane, then you can use the following code, like I did to display all Exceptions.
Mark [ March 05, 2002: Message edited by: Mark Spritzler ]
Hi Mark, Thanks for your advice. I understand your view that if it provide better maintainability etc etc, I should do it. But let says for a dialog with 2 labels, 2 textfield and 2 button. All I add in was an listener for each of the component. (of course some code for formatting layout). Then, I think that implementing MVC here does not seem to add a huge benefit over it. Is this correct? In this case, do I really have to implement it? Maybe I'm rather inexperience in this, I'd like to know what is the industrial practice for this kind of decision rather that for the purpose of the assignment. Comments?
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!