C# Loosely coupled architecture

Jun 19 2012 1:07 PM

Can anyone please explain to me, with the aid of sample code, about implementing a loosely coupled architecture in C#?

For example I have a Employee class in UI layer. In my DTO (model) project I created Name and age properties. I am creating object of BAL and calling GetEmployeeDetails() method. In BL I am calling appropriate method in DAL to get the EmployeeDetails.

Now I want to implement loosely coupled implementation between UI and BAL and BAL to DAL. I came to know that putting interfaces and getting the references would solve the problem. But in which layer should I implement interfaces? (I mean should I create a separate project for interfaces). Kindly explain with sample code.


Regards,

T.N.Nagasundar


Answers (1)