• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI design, MVC question

 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have not done much GUI work in my job. So, please bear with me-
I have put all the ActionListener/TableModelListener implementation in my Controller. The Controller calls the my View telling it to update the view - even for actions that do not cause a database request in the server (i.e, a shallow request such as data validation failed, show an error message dialog.) Is this the correct way to do it or should I let the Controller handle only those requests that cause the DataAccessFacade methods to be invoked?
Thanks much!
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have put all the ActionListener/TableModelListener implementation in my Controller. The Controller calls the my View telling it to update the view - even for actions that do not cause a database request in the server (i.e, a shallow request such as data validation failed, show an error message dialog.) Is this the correct way to do it or should I let the Controller handle only those requests that cause the DataAccessFacade methods to be invoked?

What acts as a Model in your MVC, -- you didn't mention it?
Eugene.
 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DataAccessFacade and the RMI server name lookup are part of my Model.
 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm..
The more I look at this, the more I feel that there is no need for the Controller to get involved for trivial actions performed, but rather to get involved just when the Model is used.
 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I decided to have anonymous inner classes to handle trivial events that don't require Controller intervention.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic