Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC pattern

 
leo donahue
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've seen a few variations of the MVC pattern when it comes to swing applications. However, my question is a little bit more general than just swing and it relates to what exactly belongs in the model.

I've adapted a sample I found online regarding the MVC pattern.

Should only the controller have access to update the View?

Is the code in Model.java considered "model" code, or does what I have in Model.java actually belong in Controller.java?

MVCDemo.java


Model.java


View.java


Controller.java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic