Can I include the Student-to-Teacher file to call some method present in this? This would break the pattern?
Yes, this does not break the MVC standard. The MVC standard only tells how the model, vision and controller layers should communicate. However, Aluno
and Professor
are objects that are both within the model layer, and therefore the MVC pattern is not broken by an interaction between them. In fact, it is quite common for several classes within the model layer to interact with each other and there is no problem in that.
As for the DAO, if you are not breaking the rule that the Aluno_DAO
contains methods of persistence of Aluno
and that Professor_DAO
contains the persistence methods of Professor
, all right. It is allowed that Aluno_DAO
may need to know something about Professor
or that Professor_DAO
may need to know something about Aluno
, provided that one does not end up worrying about the persistence of what should be the other.
Take a look at ASP Net Razor Pages, which simplifies MVC
– Tony
Which programming language?
– Victor Stafusa
@Victorstafusa PHP
– thiago xavier