Can a model depend on another model? Say I have a log model that other models want to access.
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.
If it’s between models that model the same part of the domain but are intended for different purposes (you mentioned logging, others would be reporting) there should be as little coupling as possible. Not to say that there should be none.
If the models model different parts of the domain coupling should be fine. If you notice your models are overlapping you should refine your context-/model- boundaries.