Scott / wrox community:
What is your feeling when 2 different model classes need to interact with each other directly? I looked in the Agathas.Storefront project and the classes within the model didn't really call other classes in the model or instantiate instances of them; only used for exposing as properties, or to use as an argument parameter.
So here is what I am getting at - let's say I have Employee and Payroll Model classes. Employee has an exposed method to provide the Employee's Pay Raise for the year, but gets this info by calling the Payroll class. Currently I make a concrete instance of Payroll from Employee, call the methods that do the calculations and get the result to expose via the Employee class. Does this create a tightly coupled situation? Should the Payroll Model class have an Interface exposing these methods, and make my Employee class work with the Interface instead? I am wondering if the Payroll class ever needs to change, I don't want the Employee class to break too.
I tried to see how you are doing this, but didn't find an exact match. Should I make Payroll implement and Interface and have Employee work with the Interface, or just allow Employee to work directly with Payroll? Or is there a better way all together to explain my simple example. Again this is all within the Model layer.
Thanks!!
