In the MVC pattern, if I have two different views, must I have two different models? Is there a one-to-one relationship between the view and the model?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MVC (Model View Controller) is a Design Pattern, is based on the principle of Do one thing and do it well…
A Single model can be used with N number of View…thats what the Specialty of MVC.
Model contains the Business Logic and Data
View is what the used to display the result to the user.
Controller is the one on which the action is done
Swing in java is based on MVC. Also know as PLAF (Pluggable Look and Feel).
A Java program where Model is separate from the View, can easily be used with different View.
Eg:
A Business Logic well written and separate from the View part, can be used in Swing as well as with JSP to show the Output…