Simple question: in MVC, is it okay for one model to interact with another? For example, with an Auth model…can it interact with the User model – or is there a better way to go about it?
Should the middle man be the controller?
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.
It really depends on the specifics of what you are trying to accomplish. On the surface, one model can interact with another model if it needs to. Just make sure that the reason why the model has to interact with another model is well thought out, and that the model to model interaction would’nt be better served by model to communication interaction instead.