I have ConnectionView and ConnectionController classes.
Connection View allows user to select local/remote mode (a radio group). After selection, user enters for ex. file name for local mode; dns name and port no for remote mode to connect to FBN system. This class has hook methods for all items those can listen for events. It also has set/get and enable/disable methods. These methods are called from ConnectionController.
ConnectionController class has implmentation for all hook method and calls
set/get and enable/disable methods on ConnectionView class.
Questions:
1. I do not have seperate model class for this. This does not have a scope for a seperate model class; does it ? Can i say that class combines view and model both ?
2. Can View have set/get methods ?
3. In some places(books or sample code) , listener has been implemented in the same file which has view class. What is good way; to seperate the controller in sepertate file, instead of in the same file having private/annonymous classes as implementation of listener ?
4. Am i right, if i say following for couplings of MVC classes.
Model does not have any reference of View and Controller.
View does not have reference of Contoller, but can have ref of Model.
Controller must have reference of View, and can have reference of Model.
Regards,
Shashi
Connection View allows user to select local/remote mode (a radio group). After selection, user enters for ex. file name for local mode; dns name and port no for remote mode to connect to FBN system. This class has hook methods for all items those can listen for events. It also has set/get and enable/disable methods. These methods are called from ConnectionController.
ConnectionController class has implmentation for all hook method and calls
set/get and enable/disable methods on ConnectionView class.
Questions:
1. I do not have seperate model class for this. This does not have a scope for a seperate model class; does it ? Can i say that class combines view and model both ?
2. Can View have set/get methods ?
3. In some places(books or sample code) , listener has been implemented in the same file which has view class. What is good way; to seperate the controller in sepertate file, instead of in the same file having private/annonymous classes as implementation of listener ?
4. Am i right, if i say following for couplings of MVC classes.
Model does not have any reference of View and Controller.
View does not have reference of Contoller, but can have ref of Model.
Controller must have reference of View, and can have reference of Model.
Regards,
Shashi