aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Model and View relationship Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Model and View relationship" Watch "Model and View relationship" New topic
Author

Model and View relationship

Alex Sbityakov
Ranch Hand

Joined: Jul 23, 2001
Posts: 49
Fellow Ranchers,
I have a question about the relationship between the View and the Model. According to the MVC pattern the Model should notify the View of state changes. Some posters have proposed using the fireXXX... methods to take care of that, notifying JTables in the View from the TableModel in the Model. My concern is doesn't this create a strong coupling between the classes?
Is it better to use the plain old Observer pattern and just shuttle text-based data from the Model to the View.
Incidentally, some people (who have passed the assignment) did not have the Model notify the View, but used the Controller for that purpose. This sounds strange to me,

Cheers and TIA,
Alex
Robin Underwood
Ranch Hand

Joined: May 01, 2002
Posts: 117

I don't think it creates a strong coupling. The model and table model don't need to know anything about the table model listeners. The JTable is a listener just because it was constructed using the table model.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Model and View relationship
 
Similar Threads
MVC question
naive questions about mvc
MVC - How Did You Do It?
Why MVC is not one of the 23 GOF patterns?
MVC and my design