I was reviewing the code for KIGG and noticed that there are so many Interfaces. I am fairly new to MVC and do understand what an interface is, a bit.
How does Interface work in MVC, why is it used?
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.
The same reason you would implement interfaces for other applications…to abstract the implementation away from the usage.
It allows the ASP.NET MVC Framework to use your code even though the Microsoft Developers didn’t have your implementation before they wrote the Framework.
Also, like tvanfosson mentions…the use of Interfaces also greatly enhances the ability of the ASP.NET MVC team to properly Unit Test their Framework.