This is our first time using this pattern (we’re not even sure that this pattern is suitable for this project), and me and my mates have a couple of questions.
We’re designing a simple applications for displaying files with regards to permissions.
- Suppose “Joe” is currently logged in to the system, where would be the correct place to save “Joe” as the active user?
-
What are the roles of the controller in this context? Suppose “Joe” wants to log in to the system. He enters his password and clicks log on, should the view validate the details directly with the Model? or should it ask the controller to do it for him?
-
Suppose that the login is successful, what should happen now? Should the View listen as an Observer to the model and wait for a response that the login is correct and then switch windows? or should the Controller have a method called
boolean ValidateLogin()which the view calls and acts accordingly?
As you can see we’re very confused, any help would be appreciated.
*This is because in web application, usually view cannot directly talk to model, as opposed in desktop application. This is still an MVC, only a variation called MVA.