Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC Pattern in GUI

 
John Smith
Ranch Hand
Posts: 2937
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have 3 separate GUI frames (say, main frame, connect frame, and about frame), is it better to have a single controller where I would handle actions for all frames, or one controller for each frame?
Thnaks,
Eugene Kononov.
 
Junilu Lacar
Bartender
Pie
Posts: 6532
21
Java Linux Mac Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure that you even need a controller for the connect and about frames. From what their names tell me, I would think that these frames have to do with support activities on the client side. They have nothing to do with the segregation of business logic and user interaction.
Using MVC doesn't mean that everything in your app needs to be participating in it. It's OK to handle some actions on the client side, especially those like "show application information" and "connect to Database".
IMO, the assignment doesn't have that many required actions to control so my own approach (I am just starting to work on my assignment myself) will be to start with just one controller. If it looks like it's going to be hard for a junior programmer to maintain, i.e. it turns into a Blob, I'll just refactor it.
HTH,
Junilu
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic