How is it going? I see you are still around
Yes I've been working pretty hard, started at the begining of october and I almost finished. Just have to write the choices.txt, help for the application user and documentation for the controller, that's why I was asking about controller methods to make sure it is ok to make them all private.
Originally posted by Edisandro Bessa:
When you say : model does not know about controller and view, view does not know about controller and model, you are definitely correct !
In most of samples I have ever seen, the View simply is notified by the Model whenever the underlying data changes. It's accomplished by using the Observer Pattern where the View registers itself to the Model and implements a common interface used by the Model to notify its dependents.
Well, using Observer pattern makes the view knows about the model one way or another. It may not hold the reference to the model but it is still coupled with the model through the observer pattern. As you said this is the most common approach, but after reading Mark's posts on MVC I decided to make controller responsible for *everything*, that is: respond to user actions, map them into commands that are sent to the model, then update the view.
I have just read the topic from the second link you provided. Thank you for these. Guys that took part in that topic agree that "regular" MVC supports coupling between the three MVC parts. This is what Ken Blair wrote at the end of its message.
Originally posted by Ken Blair:
As for our current design, we have completely seperated our data from it's presentation as you would in MVC, but it's not using MVC. It's late and I'm not thinking so well, but I believe our design does fit a pattern I just can't remember the name of it, it's similar to MVC.
I'm not sure if this is the same as MVC design that Mark Spritzler was trying to convince people to use, but that is what Mark's design do. Completely separates view and the model, moreover view and model does not know about controller too. They are unaware of the outside world. And that is what supports low coupling. The less you know the better, just do your job and don't care if anyone is interested in it.
In this design any changes are made to controller only. View's purpose is just to look pretty. If I want to use different controller I can do so without touching the view and model code. If I want to change the model, I only have to change the controller, view code stays untouched and the same about model code. If I want to use different view then give it to me, I will just change the controller.
Controller controls everything as the name implies
I read Mark posts on this topic and I have to agree that this is the best approach. I'm not sure if this is ok to make all methods private, for me it's not a problem, but don't know about assesor
Thank you for your inputs Edisandro, they are always welcome and highly appreciated. Did you start with your SCJD? If so, I'll be glad to help if I can. I'm getting my B. Sc. this year and planning to write JEE application with JSF and EJB 3.0, want to finish SCJD, so I can start with it. Actually, I could have already finished, but there's always something to improve, so if you didn't start yet, please take my advice and mark your own border - what is enough to do, otherwise you will never end with adding new features
By the way, Mark where are you?
Are you still reading this forum?